aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-11-02 15:31:53 +0300
committerFrederick Muriuki Muriithi2023-11-02 15:31:53 +0300
commit3f5b7ef490b82ab79e3f72ebc5546c9a4118a920 (patch)
tree0355f805a6e4a0b088f9b4bcc525cf07d7fb4f3a /gn_auth/auth
parentfee19ef6e9c5e90d9878a7cff96e761b9b92121b (diff)
downloadgn-auth-3f5b7ef490b82ab79e3f72ebc5546c9a4118a920.tar.gz
pylint: Fix linting errors.
Diffstat (limited to 'gn_auth/auth')
-rw-r--r--gn_auth/auth/authorisation/resources/inbredset/views.py1
-rw-r--r--gn_auth/auth/authorisation/resources/views.py4
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: