/
access.dtml
155 lines (142 loc) · 4.75 KB
/
access.dtml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<dtml-var manage_page_header>
<dtml-with "_(management_view='Security')">
<dtml-if manage_tabs>
<dtml-var manage_tabs>
</dtml-if>
</dtml-with>
<p>
The listing below shows the current security settings for this item.
Permissions are rows and roles are columns. Checkboxes are used to
indicate where roles are assigned permissions. You can also assign
<strong><a href="manage_listLocalRoles">local roles</a></strong> to
users, which give users extra roles in the context of this object and
its subobjects.
</p>
<p>
When a role is assigned to a permission, users with the given role
will be able to perform tasks associated with the permission on this
item. When the <em>Acquire permission settings</em> checkbox is selected
then the containing objects's permission settings are used. Note: the
acquired permission settings may be augmented by selecting Roles for
a permission in addition to selecting to acquire permissions.
</p>
<form action="manage_reportUserPermissions"
method="GET"
class="form-inline">
<div class="form-group mb-2">
<label for="username" class="form-label mr-sm-2">
Username:
</label>
<input type="text"
class="form-control mr-sm-2"
id="username"
name="user"
size="20" />
<input type="submit"
class="form-control btn btn-outline-info mr-sm-2"
value="Show me the user permissions and roles in the context of the current object" />
</div>
</form>
<dtml-with expr="_.namespace(valid_roles=valid_roles())">
<form action="manage_changePermissions" method="post">
<table class="table table-striped table-hover" nowrap>
<thead>
<tr class="table-secondary">
<dtml-unless isTopLevelPrincipiaApplicationObject>
<th scope="col"> </th>
</dtml-unless>
<th scope="col">
Permission
</th>
<th scope="col" colspan="<dtml-var expr="_.len(valid_roles)">">
Roles
</th>
</tr>
<dtml-in permission_settings mapping>
<dtml-if "not (_['sequence-index']%10)">
<tr>
<dtml-unless isTopLevelPrincipiaApplicationObject>
<td>
<strong>
<a href="manage_acquiredForm">Acquire<dtml-unless sequence-index><BR>permission<BR>settings</dtml-unless></a>?
</strong>
</td>
</dtml-unless>
<td></td>
<dtml-in valid_roles>
<td>
<a href="manage_roleForm?role_to_manage=&dtml.url_quote-sequence-item;">
&dtml-sequence-item;
</a>
</td>
</dtml-in valid_roles>
</tr>
</dtml-if>
</thead>
<tbody>
<tr>
<dtml-unless isTopLevelPrincipiaApplicationObject>
<td>
<input type="checkbox" name="acquire_&dtml-hashed_name;" &dtml-acquire; />
</td>
</dtml-unless>
<td nowrap>
<a href="manage_permissionForm?permission_to_manage=&dtml.url_quote-name;">&dtml-name;</a>
</td>
<dtml-in roles mapping>
<td>
<input type="checkbox" name="&dtml-name;" &dtml-checked; />
</td>
</dtml-in>
</tr>
</dtml-in permission_settings>
<tr>
<dtml-if isTopLevelPrincipiaApplicationObject>
<td colspan="<dtml-var expr="_.len(valid_roles)+1">">
<dtml-else>
<td colspan="<dtml-var expr="_.len(valid_roles)+2">">
</dtml-if>
<input type="submit"
class="btn btn-outline-secondary"
name="submit"
value="Save Changes" />
</td>
</tr>
</tbody>
</table>
</form>
</dtml-with>
<dtml-if "_['id'] != 'acl_users'">
<p>
You can define new roles by entering a role name and clicking the
"Add Role" button.
</p>
<form action="manage_defined_roles"
method="post">
User defined roles:
<div class="form-group mb-2 form-inline">
<input type="text"
class="form-control mr-sm-2 col-4"
name="role"
size="20" />
<input type="submit"
class="form-control btn btn-outline-info mr-sm-2"
name="submit"
value="Add Role" />
</div>
<dtml-if userdefined_roles>
<div class="form-group mb-2 form-inline">
<select name="roles:list" class="form-control col-4 mr-sm-2" >
<dtml-in userdefined_roles>
<option value="&dtml-sequence-item;">&dtml-sequence-item;</option>
</dtml-in userdefined_roles>
</select>
<input type="submit"
class="btn btn-outline-danger mr-sm-2"
name="submit"
value="Delete Role" />
</div>
</dtml-if userdefined_roles>
</form>
</dtml-if>
<dtml-var manage_page_footer>