Skip to content

Commit

Permalink
refact: changes in the authorization middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
ivinayakg committed Sep 15, 2023
1 parent b22b7df commit a02b45b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/base/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def has_permission(self, request, view):

user_roles = request.user.roles
for role in roles:
if user_roles.get(role, False) is False:
return False
if user_roles.get(role, False) is True:
return True
else:
continue
return True
return False

return AuthorizationPermission

0 comments on commit a02b45b

Please sign in to comment.