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 17, 2025
1 parent 2205d25 commit b94d938
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/authx/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ def list_role_types_in_opa():
def get_role_type_in_opa(role_type):
result, status_code = get_service_store_secret("opa", key=f"site_roles")
if status_code == 200:
logger.debug(result["site_roles"])
if role_type in result['site_roles']:
return {role_type: result['site_roles'][role_type]}, 200
return {"error": f"role type {role_type} does not exist"}, 404
Expand Down

0 comments on commit b94d938

Please sign in to comment.