Reset scope

This commit is contained in:
Hemachandar
2026-01-26 00:22:29 +05:30
parent f28975117d
commit 3133572d7c
+2
View File
@@ -244,6 +244,8 @@ App::init()
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$scopes = []; // Reset scope if admin
$teamWideRoles = \array_filter($adminRoles, fn ($role) => !str_starts_with($role, "project-"));
foreach ($teamWideRoles as $teamRole) {
$scopes = \array_merge($scopes, $roles[$teamRole]['scopes']);