Skip to content

Commit

Permalink
Rename function to better fit
Browse files Browse the repository at this point in the history
  • Loading branch information
OrdiNeu committed Dec 19, 2024
1 parent 2110bb1 commit 2773da6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ingest_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ paths:
application/json:
schema:
type: object
/user/self_authorize:
/user/self/authorize:
get:
summary: List program authorizations
summary: List own program authorizations
description: List authorizations for programs for the authenticated user
operationId: ingest_operations.is_self_authorized
operationId: ingest_operations.list_programs_for_self
responses:
200:
description: Success
Expand Down
3 changes: 2 additions & 1 deletion ingest_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ def clear_pending_users():
# DAC authorization for users
####

def is_self_authorized():
@app.route('/user/self/authorize')
def list_programs_for_self():
token = connexion.request.headers['Authorization'].split("Bearer ")[1]
response, status_code = auth.get_self_in_opa(token)
if status_code == 404:
Expand Down

0 comments on commit 2773da6

Please sign in to comment.