Skip to content

Commit

Permalink
Refactor to remove RW_USERS role since the USER and ADMIN roles…
Browse files Browse the repository at this point in the history
… already define read and write access, respectively
  • Loading branch information
NeonDaniel committed Nov 19, 2024
1 parent 9095b54 commit b34492b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions neon_users_service/mq_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def parse_mq_request(self, mq_req: dict) -> dict:
auth_user = self.service.read_authenticated_user(
mq_req.auth_user_spec, mq_req.password,
mq_req.access_token)
if auth_user.permissions.users < AccessRoles.USER and \
auth_user.permissions.users != AccessRoles.RW_USERS:
if auth_user.permissions.users < AccessRoles.USER:
raise PermissionError(f"User {auth_user.username} does "
f"not have permission to read "
f"other users")
Expand Down

0 comments on commit b34492b

Please sign in to comment.