about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation/resources/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-29 13:20:24 -0500
committerFrederick Muriuki Muriithi2025-07-29 13:21:56 -0500
commit4346b93c3f0b86860383e91a3df0e440e0f3066b (patch)
tree874da7685cbe4da5dc28ce7e6c98b8b4f0b9237a /gn_auth/auth/authorisation/resources/views.py
parentbfd8cefaa3e68f77c84eaf577b206377bf7fc4d5 (diff)
downloadgn-auth-4346b93c3f0b86860383e91a3df0e440e0f3066b.tar.gz
Grant sysadmins access to the resource when created.
Diffstat (limited to 'gn_auth/auth/authorisation/resources/views.py')
-rw-r--r--gn_auth/auth/authorisation/resources/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py
index 02d2b76..cee3d6c 100644
--- a/gn_auth/auth/authorisation/resources/views.py
+++ b/gn_auth/auth/authorisation/resources/views.py
@@ -84,7 +84,7 @@ def create_resource() -> Response:
                     raise MissingGroupError(# Not all resources require an owner group
                         "User with no group cannot create a resource.")
                 resource = _create_resource(
-                    cursor,
+                    conn,
                     resource_name,
                     resource_category_by_id(conn, resource_category_id),
                     the_token.user,
@@ -686,7 +686,6 @@ def delete_resource() -> Response:
         form = request_json()
         try:
             resource_id = UUID(form.get("resource_id"))
-            # TODO Update resource creation to grant privileges (system:resource:*) to admin users
             # TODO Update user-levels promotion/demotion to grant/revoke (system:resource:*) to/from admin users
             if not authorised_for_spec(
                     conn,