aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-10 15:56:47 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commitc63a898563cc6ddbdabf1ec84156e95ce373c21e (patch)
treec71f87ffa481732e7e28ce1b7e8245f666f3ef74 /gn2/wqflask/templates
parenta22e30491d04aed31416b3e2edc40c9e2b0d348c (diff)
downloadgenenetwork2-c63a898563cc6ddbdabf1ec84156e95ce373c21e.tar.gz
Unassign privilege from resource role.
Diffstat (limited to 'gn2/wqflask/templates')
-rw-r--r--gn2/wqflask/templates/oauth2/confirm-resource-role-unassign-privilege.html34
-rw-r--r--gn2/wqflask/templates/oauth2/view-resource-role.html7
2 files changed, 39 insertions, 2 deletions
diff --git a/gn2/wqflask/templates/oauth2/confirm-resource-role-unassign-privilege.html b/gn2/wqflask/templates/oauth2/confirm-resource-role-unassign-privilege.html
new file mode 100644
index 00000000..988cf3b4
--- /dev/null
+++ b/gn2/wqflask/templates/oauth2/confirm-resource-role-unassign-privilege.html
@@ -0,0 +1,34 @@
+{%extends "base.html"%}
+{%from "oauth2/profile_nav.html" import profile_nav%}
+{%from "oauth2/display_error.html" import display_error%}
+{%block title%}View User{%endblock%}
+{%block content%}
+<div class="container">
+ {{profile_nav(uipages, user_privileges)}}
+ {{flash_me()}}
+
+ <form id="frm_confirm_resource_role_unassign_privilege"
+ method="POST"
+ action="{{url_for('oauth2.resource.unassign_privilege_from_resource_role',
+ resource_id=resource.resource_id,
+ role_id=role.role_id)}}">
+ <p>
+ Are you sure you want to unassign the privilege to
+ '{{privilege.privilege_description}}' from the role '{{role.role_name}}'
+ on resource '{{resource.resource_name}}'?</p>
+ <input type="hidden"
+ name="privilege_id"
+ value="{{privilege.privilege_id}}" />
+
+ <input type="submit"
+ name="confirm"
+ value="Cancel"
+ class="btn btn-success" />
+
+ <input type="submit"
+ name="confirm"
+ value="Unassign"
+ class="btn btn-danger" />
+ </form>
+</div>
+{%endblock%}
diff --git a/gn2/wqflask/templates/oauth2/view-resource-role.html b/gn2/wqflask/templates/oauth2/view-resource-role.html
index 05df41d6..a1aa8676 100644
--- a/gn2/wqflask/templates/oauth2/view-resource-role.html
+++ b/gn2/wqflask/templates/oauth2/view-resource-role.html
@@ -5,8 +5,10 @@
{%block content%}
{%macro unassign_button(resource_id, role_id, privilege_id)%}
-<form method="POST"
- action="#"
+<form method="GET"
+ action="{{url_for('oauth2.resource.unassign_privilege_from_resource_role',
+ resource_id=resource_id,
+ role_id=role_id)}}"
id="frm_unlink_privilege_{{privilege_id}}">
<input type="hidden" name="resource_id" value="{{resource_id}}" />
<input type="hidden" name="role_id" value="{{role_id}}" />
@@ -17,6 +19,7 @@
<div class="container">
{{profile_nav(uipages, user_privileges)}}
+ {{flash_me()}}
{%if resource_error is defined%}
{{display_error("Resource", resource_error)}}
{%else%}