about summary refs log tree commit diff
path: root/gn_auth
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-04-23 12:29:01 -0500
committerFrederick Muriuki Muriithi2026-04-23 12:29:01 -0500
commit0a4a3f8f6d086f8692d06da1cb8026526aaa46c3 (patch)
treec7808cdc8915d0bef2b460964b9e8c8eb1a7c361 /gn_auth
parenta78ddfa75fdf736355e9c8143d5ad9b70cd07dd4 (diff)
downloadgn-auth-0a4a3f8f6d086f8692d06da1cb8026526aaa46c3.tar.gz
Improve error messages.
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/auth/authorisation/resources/models.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/resources/models.py b/gn_auth/auth/authorisation/resources/models.py
index 9e30386..27ef183 100644
--- a/gn_auth/auth/authorisation/resources/models.py
+++ b/gn_auth/auth/authorisation/resources/models.py
@@ -333,8 +333,7 @@ def link_data_to_resource(
     """Link data to resource."""
     if not can_edit(conn, user.user_id, resource_id):
         raise AuthorisationError(
-            "You are not authorised to link data to resource with id "
-            f"{resource_id}")
+            "You are not authorised to link/unlink data to this resource.")
 
     resource = with_db_connection(partial(
         resource_by_id, user=user, resource_id=resource_id))
@@ -349,8 +348,7 @@ def unlink_data_from_resource(
     """Unlink data from resource."""
     if not can_edit(conn, user.user_id, resource_id):
         raise AuthorisationError(
-            "You are not authorised to link data to resource with id "
-            f"{resource_id}")
+            "You are not authorised to link/unlink data this resource.")
 
     resource = with_db_connection(partial(
         resource_by_id, user=user, resource_id=resource_id))