mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-28 19:59:54 +00:00
Fix #1423
This commit is contained in:
parent
5845ddbdda
commit
64722617c1
1 changed files with 5 additions and 5 deletions
|
|
@ -19,6 +19,11 @@ export async function verifyApiKeySetResourceUsers(
|
|||
);
|
||||
}
|
||||
|
||||
if (apiKey.isRoot) {
|
||||
// Root keys can access any key in any org
|
||||
return next();
|
||||
}
|
||||
|
||||
if (!req.apiKeyOrg) {
|
||||
return next(
|
||||
createHttpError(
|
||||
|
|
@ -32,11 +37,6 @@ export async function verifyApiKeySetResourceUsers(
|
|||
return next(createHttpError(HttpCode.BAD_REQUEST, "Invalid user IDs"));
|
||||
}
|
||||
|
||||
if (apiKey.isRoot) {
|
||||
// Root keys can access any key in any org
|
||||
return next();
|
||||
}
|
||||
|
||||
if (userIds.length === 0) {
|
||||
return next();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue