diff options
author | Frederick Muriuki Muriithi | 2023-09-22 10:30:58 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-10-26 05:00:28 +0300 |
commit | 6d4c5da9ee61e63281364510520cca1c9e8b03c7 (patch) | |
tree | be3c566b27b897fce0e984055d4c6405d82537f6 | |
parent | 6d9cce7729d23f06e0ae2612629ddc0e168fb4bc (diff) | |
download | genenetwork2-6d4c5da9ee61e63281364510520cca1c9e8b03c7.tar.gz |
Update role view: Add link to resource.
-rw-r--r-- | wqflask/wqflask/oauth2/roles.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/templates/oauth2/role.html | 8 |
2 files changed, 11 insertions, 1 deletions
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 @@ </tbody> </table> </div> + <div class="panel-footer"> + <p> + This role acts on the resource with ID: + <a href="{{url_for('oauth2.resource.view_resource', resource_id=resource_id)}}"> + {{resource_id}} + </a> + </p> + </div> </div> </div> |