File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ def compute_effective_scopes(role: Role) -> frozenset[str]:
114114 if role .workspace_id and role .workspace_role :
115115 # Org admins/owners already have workspace scopes via their org role
116116 # Regular members need their workspace role scopes
117- if role . org_role not in ( OrgRole . OWNER , OrgRole . ADMIN ) :
117+ if not role . is_org_admin :
118118 scope_set |= PRESET_ROLE_SCOPES .get (role .workspace_role , set ())
119119
120120 # Note: Group-based scopes (from group_assignment table) will be added in PR 4
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ async def admin_operation(...):
272272 required = set (scopes )
273273
274274 def check_scopes ():
275+ # Empty required scopes means no restrictions
276+ if not required :
277+ return
278+
275279 user_scopes = ctx_scopes .get ()
276280
277281 # Platform superuser has "*" scope - bypass all checks
You can’t perform that action at this time.
0 commit comments