From 3133572d7c012673c84d6961208817d9de83245e Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Mon, 26 Jan 2026 00:22:29 +0530 Subject: [PATCH] Reset scope --- app/controllers/shared/api.php | 2 ++ 1 file changed, 2 insertions(+) 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']);