diff options
Diffstat (limited to 'gn_auth/auth')
-rw-r--r-- | gn_auth/auth/authorisation/resources/inbredset/views.py | 1 | ||||
-rw-r--r-- | gn_auth/auth/authorisation/resources/views.py | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/gn_auth/auth/authorisation/resources/inbredset/views.py b/gn_auth/auth/authorisation/resources/inbredset/views.py index c3669e6..444c442 100644 --- a/gn_auth/auth/authorisation/resources/inbredset/views.py +++ b/gn_auth/auth/authorisation/resources/inbredset/views.py @@ -3,7 +3,6 @@ from flask import jsonify, Response, Blueprint from gn_auth.auth.db import sqlite3 as db from gn_auth.auth.db.sqlite3 import with_db_connection -from gn_auth.auth.authentication.oauth2.resource_server import require_oauth iset = Blueprint("inbredset", __name__) diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py index 60c751c..c5da257 100644 --- a/gn_auth/auth/authorisation/resources/views.py +++ b/gn_auth/auth/authorisation/resources/views.py @@ -341,14 +341,14 @@ def resources_authorisation(): res.resource_id for res in with_db_connection(public_resources) if res.resource_id in resource_ids) with require_oauth.acquire("profile resource") as the_token: - resources = with_db_connection(lambda conn: user_roles_on_resources( + the_resources = with_db_connection(lambda conn: user_roles_on_resources( conn, the_token.user, resource_ids)) resp = jsonify({ str(resid): { "public-read": resid in pubres, "roles": tuple( dictify(rol) for rol in - resources.get(resid, {}).get("roles", tuple())) + the_resources.get(resid, {}).get("roles", tuple())) } for resid in resource_ids }) except _HTTPException as _httpe: |