diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 4730c59fc4..49e9d6a23d 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -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']);