diff options
| author | Frederick Muriuki Muriithi | 2026-04-23 12:37:31 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-04-23 12:37:31 -0500 |
| commit | eae294951f5dc1faab5f451a8926f94f0778e128 (patch) | |
| tree | b654ad0ca6380d0c72dc6fa020d50a565d41fa45 /gn_auth | |
| parent | 0a4a3f8f6d086f8692d06da1cb8026526aaa46c3 (diff) | |
| download | gn-auth-eae294951f5dc1faab5f451a8926f94f0778e128.tar.gz | |
Diffstat (limited to 'gn_auth')
| -rw-r--r-- | gn_auth/auth/authorisation/resources/views.py | 9 |
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 = { |
