Skip to content

Commit

Permalink
fix: update org_admin to also allow super_admin
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 23, 2024
1 parent b9b3230 commit 8d4f4d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/backend/app/auth/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ async def org_admin(
detail="Both org_id and project_id cannot be passed at the same time",
)

# If user is admin, skip checks
if await check_super_admin(db, user_data):
return user_data

user_id = await get_uid(user_data)

if project:
Expand Down

0 comments on commit 8d4f4d0

Please sign in to comment.