about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation/data
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-03-14 19:43:09 +0300
committerMunyoki Kilyungi2024-03-21 10:03:44 +0300
commitfbdb9b66f078122af144dabc407e4dabf3fb6483 (patch)
tree4179b0d3d2bdf350ca7aaf2718ec550af13f13ed /gn_auth/auth/authorisation/data
parent8d4ab2236b23983d58f489871d0dcd6df030e3d6 (diff)
downloadgn-auth-fbdb9b66f078122af144dabc407e4dabf3fb6483.tar.gz
Replace "the" prefix with an underscore.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn_auth/auth/authorisation/data')
-rw-r--r--gn_auth/auth/authorisation/data/views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gn_auth/auth/authorisation/data/views.py b/gn_auth/auth/authorisation/data/views.py
index 9d59a70..c40b667 100644
--- a/gn_auth/auth/authorisation/data/views.py
+++ b/gn_auth/auth/authorisation/data/views.py
@@ -88,11 +88,11 @@ def authorisation() -> Response:
     user = User(uuid.uuid4(), "anon@ymous.user", "Anonymous User")
     with db.connection(db_uri) as auth_conn:
         try:
-            with require_oauth.acquire("profile group resource") as the_token:
-                user = the_token.user
+            with require_oauth.acquire("profile group resource") as _token:
+                user = _token.user
                 resources = attach_resources_data(
-                    auth_conn, user_resources(auth_conn, the_token.user))
-                resources_roles = user_resource_roles(auth_conn, the_token.user)
+                    auth_conn, user_resources(auth_conn, _token.user))
+                resources_roles = user_resource_roles(auth_conn, _token.user)
                 privileges = {
                     resource_id: tuple(
                         privilege.privilege_id
@@ -100,7 +100,7 @@ def authorisation() -> Response:
                         for privilege in roles.privileges)#("group:resource:view-resource",)
                     for resource_id, is_authorised
                     in authorised_for(
-                        auth_conn, the_token.user,
+                        auth_conn, _token.user,
                         ("group:resource:view-resource",), tuple(
                             resource.resource_id for resource in resources)).items()
                     if is_authorised