UBER-887 Space security: allow system account see all spaces (#3722)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2023-09-20 23:28:09 +07:00
committed by GitHub
parent 5c51f95c6f
commit 450cdec288
3 changed files with 14 additions and 8 deletions
+4
View File
@@ -54,3 +54,7 @@ export async function getUser (storage: ServerStorage, ctx: SessionContext): Pro
export function isOwner (account: Account): boolean {
return account.role === AccountRole.Owner || account._id === core.account.System
}
export function isSystem (account: Account): boolean {
return account._id === core.account.System
}