From 6d4c5da9ee61e63281364510520cca1c9e8b03c7 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 22 Sep 2023 10:30:58 +0300 Subject: Update role view: Add link to resource. --- wqflask/wqflask/oauth2/roles.py | 4 +++- wqflask/wqflask/templates/oauth2/role.html | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/oauth2/roles.py b/wqflask/wqflask/oauth2/roles.py index ee9d8377..2fe35f9b 100644 --- a/wqflask/wqflask/oauth2/roles.py +++ b/wqflask/wqflask/oauth2/roles.py @@ -39,7 +39,9 @@ def user_roles(): @require_oauth2 def role(role_id: uuid.UUID): def __success__(the_role): - return render_ui("oauth2/role.html", role=the_role) + return render_ui("oauth2/role.html", + role=the_role[0], + resource_id=uuid.UUID(the_role[1])) return oauth2_get(f"auth/role/view/{role_id}").either( request_error, __success__) diff --git a/wqflask/wqflask/templates/oauth2/role.html b/wqflask/wqflask/templates/oauth2/role.html index a77d5f23..c33c93ee 100644 --- a/wqflask/wqflask/templates/oauth2/role.html +++ b/wqflask/wqflask/templates/oauth2/role.html @@ -39,6 +39,14 @@ + -- cgit v1.2.3