Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravr committed Dec 22, 2023
1 parent 21c8b4a commit 0b99abe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apphelpers/rest/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ async def wrapper(_request, *args, **kw):

# this is authorization part
groups = set(user.groups)
if self.site_identifier in kw:
site_id = int(kw[self.site_identifier])
if site_id:
groups = groups.union(user.site_groups.get(site_id, []))

if any_group_required and groups.isdisjoint(any_group_required):
Expand Down

0 comments on commit 0b99abe

Please sign in to comment.