mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-26 04:05:54 +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
|
@ -27,6 +27,11 @@ export async function verifyApiKeyOrgAccess(
|
|||
);
|
||||
}
|
||||
|
||||
if (req.apiKey?.isRoot) {
|
||||
// Root keys can access any key in any org
|
||||
return next();
|
||||
}
|
||||
|
||||
if (!req.apiKeyOrg) {
|
||||
const apiKeyOrgRes = await db
|
||||
.select()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue