mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Reset scope
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user