Skip to content

Commit

Permalink
avoid admin permissions to access everything as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mkangia committed Dec 17, 2018
1 parent 0fb9573 commit 1518a4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions corehq/apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ def has_permission(self, domain, permission, data=None, restrict_global_admin=Fa

dm = self.get_domain_membership(domain)
if dm:
# an admin has access to all features by default, restrict that if needed
if dm.is_admin and restrict_global_admin:
return False
return dm.has_permission(permission, data)
else:
return False
Expand Down

0 comments on commit 1518a4a

Please sign in to comment.