Skip to content

Commit

Permalink
feed the stickler
Browse files Browse the repository at this point in the history
  • Loading branch information
czue committed Sep 10, 2020
1 parent 2263690 commit 168076b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corehq/apps/users/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def permission_check(request, domain):
return True # only api keys support additional checks
elif api_key.role:
return (
api_key.role.domain == domain and
all(api_key.role.permissions.has(p, data) for p in permissions_to_check)
api_key.role.domain == domain
and all(api_key.role.permissions.has(p, data) for p in permissions_to_check)
)
elif api_key.domain:
# we've already checked for user and role permissions so all that's left is domain matching
Expand Down

0 comments on commit 168076b

Please sign in to comment.