From b6a2d32b12525afba6928a57a25924d795754204 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 17 Jun 2024 13:55:57 -0500 Subject: Create a new resource role. --- gn2/wqflask/templates/oauth2/create-role.html | 38 ++++++++++++++++--------- gn2/wqflask/templates/oauth2/view-resource.html | 5 ++++ 2 files changed, 30 insertions(+), 13 deletions(-) (limited to 'gn2/wqflask/templates/oauth2') diff --git a/gn2/wqflask/templates/oauth2/create-role.html b/gn2/wqflask/templates/oauth2/create-role.html index f2bff7b4..198eacdd 100644 --- a/gn2/wqflask/templates/oauth2/create-role.html +++ b/gn2/wqflask/templates/oauth2/create-role.html @@ -7,31 +7,43 @@ {{profile_nav("roles", user_privileges)}}

Create Role

- {{flash_me()}} +

Create a new role to act on resource "{{resource.resource_name}}"

{%if group_privileges_error is defined%} {{display_error("Group Privileges", group_privileges_error)}} {%else%} - {%if "group:role:create-role" in user_privileges%} -
- Create Group Role + {%if "resource:role:create-role" in (user_privileges|map(attribute="privilege_id")) %} + + create resource role + + {{flash_me()}} +
- +
+ + {{resource.resource_name|replace(" ", "_")}}:: + + +
+ + The name of the role will have the resource's name appended. +
- {%for priv in group_privileges%} + {%for priv in user_privileges%}
-
{%endfor%} diff --git a/gn2/wqflask/templates/oauth2/view-resource.html b/gn2/wqflask/templates/oauth2/view-resource.html index 25cac6ff..cfc769c4 100644 --- a/gn2/wqflask/templates/oauth2/view-resource.html +++ b/gn2/wqflask/templates/oauth2/view-resource.html @@ -246,6 +246,11 @@ {%endfor%} +
+ New Role
-- cgit v1.2.3