blob: 5da023bf43beabce8ef4d52fadaf00aa617e2712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
{%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" style="min-width: 1250px;">
{{profile_nav("roles", user_privileges)}}
<h3>View Group Role</h3>
{{flash_me()}}
<div class="container-fluid">
<div class="row">
<h3>Role Details</h3>
{%if group_role_error is defined%}
{{display_error("Group Role", group_role_error)}}
{%else%}
<table class="table">
<caption>Details for '{{group_role.role.role_name}}' Role</caption>
<thead>
<tr>
<th>Privilege</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{%for privilege in group_role.role.privileges%}
<tr>
<td>{{privilege.privilege_id}}</td>
<td>{{privilege.privilege_description}}</td>
<td>
<form action="{{url_for(
'oauth2.group.delete_privilege_from_role',
group_role_id=group_role.group_role_id)}}"
method="POST">
<input type="hidden" name="privilege_id"
value="{{privilege.privilege_id}}" />
<input type="submit" class="btn btn-danger"
value="Remove"
{%if not group_role.role.user_editable%}
disabled="disabled"
{%endif%} />
</form>
</td>
</tr>
{%endfor%}
</tbody>
</table>
{%endif%}
</div>
<div class="row">
<h3>Other Privileges</h3>
<table class="table">
<caption>Other Privileges not Assigned to this Role</caption>
<thead>
<tr>
<th>Privilege</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{%for priv in group_privileges%}
<tr>
<td>{{priv.privilege_id}}</td>
<td>{{priv.privilege_description}}</td>
<td>
<form action="{{url_for(
'oauth2.group.add_privilege_to_role',
group_role_id=group_role.group_role_id)}}"
method="POST">
<input type="hidden" name="privilege_id"
value="{{priv.privilege_id}}" />
<input type="submit" class="btn btn-warning"
value="Add to Role"
{%if not group_role.role.user_editable%}
disabled="disabled"
{%endif%} />
</form>
</td>
</tr>
{%else%}
<tr>
<td colspan="3">
<span class="glyphicon glyphicon-info-sign text-info">
</span>
<span class="text-info">All privileges assigned!</span>
</td>
</tr>
{%endfor%}
</tbody>
</table>
</div>
</div>
</div>
{%endblock%}
|