mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-26 20:25:42 +02:00
remove api-key-org association for root keys
This commit is contained in:
parent
6d359b6bb9
commit
7402590f49
11 changed files with 47 additions and 26 deletions
|
@ -45,6 +45,11 @@ export async function verifyApiKeyRoleAccess(
|
|||
);
|
||||
}
|
||||
|
||||
if (apiKey.isRoot) {
|
||||
// Root keys can access any key in any org
|
||||
return next();
|
||||
}
|
||||
|
||||
const orgIds = new Set(rolesData.map((role) => role.orgId));
|
||||
|
||||
for (const role of rolesData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue