remove api-key-org association for root keys

This commit is contained in:
miloschwartz 2025-08-01 15:55:47 -07:00
parent 6d359b6bb9
commit 7402590f49
No known key found for this signature in database
11 changed files with 47 additions and 26 deletions

View file

@ -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) {