Skip to content

Commit

Permalink
Update auth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Jan 11, 2025
1 parent 9d00e17 commit 96804ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/authx/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,12 @@ def remove_user_from_opa(user_name):
#####

def add_pending_user_to_opa(user_token):
# check to see if this user has already been rejected:
response, status_code = get_service_store_secret("opa", key=f"rejected_users")
if status_code != 200:
return response, status_code
if user_name in response["rejected_users"]:
return {"error": "This user has already been rejected by CanDIG"}, 403
# # check to see if this user has already been rejected:
# response, status_code = get_service_store_secret("opa", key=f"rejected_users")
# if status_code != 200:
# return response, status_code
# if user_name in response["rejected_users"]:
# return {"error": "This user has already been rejected by CanDIG"}, 403

# NB: any user that has been authenticated by the IDP should be able to add themselves to the pending user list
response, status_code = get_service_store_secret("opa", key=f"pending_users")
Expand Down

0 comments on commit 96804ee

Please sign in to comment.