about summary refs log tree commit diff
path: root/gn_auth/auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth')
-rw-r--r--gn_auth/auth/authorisation/resources/views.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py
index 6186cde..ab44795 100644
--- a/gn_auth/auth/authorisation/resources/views.py
+++ b/gn_auth/auth/authorisation/resources/views.py
@@ -138,10 +138,10 @@ def edit_resource(resource_id: UUID) -> Response:
                     for role in resource.get("roles", tuple()))
             for privilege in role.privileges)
         if not gn_libs.privileges.resources.can_edit(_privileges):
-            return jsonify({
+            return make_response(jsonify({
                 "error": "AuthorisationError",
                 "error_description": "You are not allowed to edit this resource."
-            }), 401
+            }), 401)
 
         name = (request_json().get("resource_name") or "").strip()
         if bool(name):
@@ -151,10 +151,10 @@ def edit_resource(resource_id: UUID) -> Response:
                 "status": "success"
             })
 
-        return jsonify({
+        return make_response(jsonify({
             "error_description": "Expected `resource_name` to be provided.",
             "error": "InvalidInput"
-        }), 400
+        }), 400)
 
 def __safe_get_requests_page__(key: str = "page") -> int:
     """Get the results page if it exists or default to the first page."""
@@ -548,7 +548,6 @@ def get_user_roles_on_resource(name) -> Response:
         response = make_response({
             # Flatten this list
             "roles": roles,
-            "silly": "ausah",
         })
         iat = int(time.time())
         jose_header = {