about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authorisation')
-rw-r--r--gn_auth/auth/authorisation/resources/common.py6
-rw-r--r--gn_auth/auth/authorisation/resources/views.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/resources/common.py b/gn_auth/auth/authorisation/resources/common.py
index 1842982..5a48704 100644
--- a/gn_auth/auth/authorisation/resources/common.py
+++ b/gn_auth/auth/authorisation/resources/common.py
@@ -1,10 +1,10 @@
 """Utilities common to more than one resource."""
 import uuid
 
-from sqlite3 import Cursor
+from gn_auth.auth.db import sqlite3 as db
 
 def assign_resource_owner_role(
-        cursor: Cursor,
+        cursor: db.DbCursor,
         resource_id: uuid.UUID,
         user_id: uuid.UUID
 ) -> dict:
@@ -25,7 +25,7 @@ def assign_resource_owner_role(
 
 
 def grant_access_to_sysadmins(
-        cursor: Cursor,
+        cursor: db.DbCursor,
         resource_id: uuid.UUID,
         system_resource_id: uuid.UUID
 ):
diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py
index c4774dc..f39cc59 100644
--- a/gn_auth/auth/authorisation/resources/views.py
+++ b/gn_auth/auth/authorisation/resources/views.py
@@ -678,7 +678,7 @@ def user_resource_roles(resource_id: UUID, user_id: UUID):
 
 @resources.route("/delete", methods=["POST"])
 @require_oauth("profile group resource")
-def delete_resource() -> Response:
+def delete_resource():
     """Delete the specified resource, if possible."""
     with (require_oauth.acquire("profile group resource") as the_token,
           db.connection(app.config["AUTH_DB"]) as conn):