aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/roles/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-02-10 14:07:41 +0300
committerFrederick Muriuki Muriithi2023-02-10 14:07:41 +0300
commita93b9599d6e342f8fd588022ca14336465f7ff7c (patch)
tree63caea29caf15f723341341026706a4601b0a7b3 /gn3/auth/authorisation/roles/views.py
parent0d2a9c130531a2786b2dd01adc172e5005f13f59 (diff)
downloadgenenetwork3-a93b9599d6e342f8fd588022ca14336465f7ff7c.tar.gz
Return empty tuple rather than Nothing
When user has no roles assigned, return an empty tuple rather than pymonad.maybe.Nothing to ease maintenance.
Diffstat (limited to 'gn3/auth/authorisation/roles/views.py')
-rw-r--r--gn3/auth/authorisation/roles/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/auth/authorisation/roles/views.py b/gn3/auth/authorisation/roles/views.py
index 975fb19..3670aab 100644
--- a/gn3/auth/authorisation/roles/views.py
+++ b/gn3/auth/authorisation/roles/views.py
@@ -13,7 +13,7 @@ from ...authentication.oauth2.resource_server import require_oauth
roles = Blueprint("roles", __name__)
@roles.route("/view/<uuid:role_id>", methods=["GET"])
-@require_oauth("role")
+@require_oauth("profile role")
def view_role(role_id: uuid.UUID) -> Response:
"""Retrieve a user role with id `role_id`"""
def __error__(exc: Exception):