修复权限判断问题

This commit is contained in:
mtvpls
2025-12-29 01:19:28 +08:00
parent 0a9d952929
commit 56b4d47902
8 changed files with 19 additions and 42 deletions
-8
View File
@@ -36,14 +36,6 @@ export async function GET(request: NextRequest) {
const operatorInfo = await db.getUserInfoV2(authInfo.username);
if (operatorInfo) {
operatorRole = operatorInfo.role;
} else {
// 回退到配置中查找
const userEntry = adminConfig.UserConfig.Users.find(
(u) => u.username === authInfo.username
);
if (userEntry) {
operatorRole = userEntry.role;
}
}
}