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 23, 2025
1 parent 31a6749 commit bb383f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/authx/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def is_site_admin(request, token=None, opa_url=OPA_URL, admin_secret=None):
return False


def get_opa_permissions(bearer_token=None, user_token=None, method=None, path=None, program=None, opa_url=OPA_URL, admin_secret=None):
def get_opa_permissions(bearer_token=None, user_token=None, method=None, path=None, program=None, opa_url=OPA_URL):
token = get_auth_token(None, token=bearer_token)
if user_token is None:
user_token = token
Expand Down Expand Up @@ -233,7 +233,7 @@ def is_action_allowed_for_program(token, method=None, path=None, program=None, o
Is the user allowed to perform this action on this program?
"""

response, status_code = get_opa_permissions(bearer_token=token, method, path, program, opa_url, admin_secret)
response, status_code = get_opa_permissions(bearer_token=token, method=method, path=path, program=program, opa_url=opa_url)
if status_code == 200:
if 'allowed' in response:
return response["allowed"]
Expand Down

0 comments on commit bb383f8

Please sign in to comment.