64fe5894b2727e75cdbdf7b204a32f3e27ff0d11
[GroupUserFolder.git] / dtml / GRUF_groups.zpt
1 <h1 tal:replace="structure here/manage_page_header">Header</h1>
2 <h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
3 tal:replace="structure here/manage_tabs">Tabs</h2>
4
5 <h4>Groups sources</h4>
6 <!-- Groups source row -->
7 <ol>
8 <table cellspacing="10" width="90%" tal:define="groups here/getGroups">
9 <tr>
10 <th class="list-header">Groups source</th>
11 <td bgcolor="#EEEEEE">
12 <img src="" tal:attributes="src here/Groups/acl_users/icon">&nbsp;
13 <a href="Groups/acl_users/manage_workspace" tal:content="here/Groups/acl_users/meta_type">Type</a>
14 </td>
15 </tr>
16 </table>
17 </ol>
18
19 <h4>Groups management</h4>
20 <form action="" method="POST" tal:attributes="action here/absolute_url">
21 <ol>
22 <table cellspacing="10" width="90%" tal:define="groups here/getGroups">
23 <tr>
24 <!-- Groups selection -->
25 <td valign="top">
26 <table bgcolor="#EEEEEE" width="100%">
27 <tr class="list-header" tal:condition="groups">
28 <th>&nbsp;</th>
29 <th>Group</th>
30 <th class="list-header">Member <br>of groups</th>
31 <th class="list-header">Implicitly <br>member of*</th>
32 <th class="list-header">Has roles</th>
33 <th class="list-header">Implicitly <br>has roles**</th>
34 </tr>
35
36 <tr
37 tal:repeat="group groups" class="" tal:attributes="class python:test(path('repeat/group/odd'), 'row-hilite', 'row-normal')"
38 >
39 <div tal:define="
40 label_groups python:group.getGroups();
41 label_groups_no_recurse python:group.getImmediateGroups();
42 label_groups_recurse python:filter(lambda x: x not in label_groups_no_recurse, label_groups);
43 groups_no_recurse python:map(lambda x: here.getUser(x), label_groups_no_recurse);
44 groups_recurse python:map(lambda x: here.getUser(x), label_groups_recurse);
45 roles python:filter(lambda x: x not in ('Authenticated', 'Shared'), group.getRoles());
46 roles_no_recurse python:filter(lambda x: x not in ('Authenticated', 'Shared'), group.getUserRoles());
47 roles_recurse python:filter(lambda x: x not in roles_no_recurse, roles);"
48 tal:omit-tag="">
49 <td><div class="list-item"><input type="checkbox" name="groups:list" value="" tal:attributes="value group"></td>
50 <td>
51 <div class="list-item">
52 <img src="img_group">
53 <strong tal:content="structure group/asHTML">
54 </strong>
55 </td>
56 <td class="list-item">
57 <span tal:repeat="group groups_no_recurse" >
58 <span tal:replace="structure group/asHTML"></span><span tal:condition="not:repeat/group/end">, </span>
59 </span>
60 </td>
61 <td class="list-item">
62 <span tal:repeat="group groups_recurse" >
63 <span tal:replace="structure python:group.asHTML(implicit=1)"></span><span tal:condition="not:repeat/group/end">, </span>
64 </span>
65 </td>
66 <td class="list-item">
67 <div class="list-item">
68 <span tal:repeat="role roles_no_recurse" >
69 <font color=""
70 tal:attributes="color here/role_color">
71 <span tal:replace="role"></span><span tal:condition="not:repeat/role/end">, </span>
72 </font>
73 </span>
74 </div>
75 </td>
76 <td class="list-item">
77 <div class="list-item">
78 <span tal:repeat="role roles_recurse" >
79 <font color=""
80 tal:attributes="color here/role_color">
81 <i><span tal:replace="role"></span></i><span tal:condition="not:repeat/role/end">, </span>
82 </font>
83 </span>
84 </div>
85 </td>
86 </div>
87 </tr>
88
89 <!-- New user -->
90 <tr>
91 <td><div class="list-item">&nbsp;</div></td>
92 <td><div class="list-item">Create groups:<br /><textarea name="new_groups:lines" cols="20" rows="3"></textarea></div></td>
93 <td colspan="4">
94 <div class="list-item">
95 Newly created groups will be affected groups and roles according to the table below.
96 </div>
97 </td>
98 </tr>
99 <tr>
100 <td colspan="2" align="center">
101 <input type="submit" name="changeOrCreateGroups:method" value="Create" />
102 &nbsp;
103 <input type="submit" name="deleteGroups:method" value="Delete" />
104 </td>
105 </tr>
106 </table>
107 </td>
108 </tr>
109 <tr>
110 <td align="center">
111 <div class="list-item">
112 Select one or more users in the upper table, select one or more groups / roles in the table below
113 and click "Change" to affect groups / roles to these users.
114 </div>
115 </td>
116 </tr>
117 <tr>
118 <td valign="top" align="center" colspan="6">
119 <table bgcolor="#EEEEEE">
120 <tr>
121 <td valign="top">
122 <!-- Groups selection -->
123 <table width="100%">
124 <tr class="list-header">
125 <th colspan="2">Affect groups</th>
126 </tr>
127
128 <tr tal:repeat="group here/getGroups">
129 <td>
130 <input type="checkbox" name="nested_groups:list" value="" tal:attributes="value group">
131 </td>
132 <td>
133 <div class="list-item" tal:content="structure group/asHTML"></div>
134 </td>
135 </tr>
136
137 <!-- "(None)" item -->
138 <tr>
139 <td><div class="list-item"><input type="checkbox" name="nested_groups:list" value="__None__"></div></td>
140 <td><div class="list-item"><i>(None)</i></div></td>
141 </tr>
142 </table>
143 </td>
144 <td valign="top">
145 <!-- Roles selection -->
146 <table width="100%">
147 <tr class="list-header">
148 <th colspan="2">Affect roles</th>
149 </tr>
150
151 <tr tal:repeat="role here/valid_roles">
152 <td tal:condition="python:role not in ('Authenticated', 'Anonymous', 'Shared')">
153 <input type="checkbox" name="roles:list" value="" tal:attributes="value role">
154 </td>
155 <td tal:condition="python:role not in ('Authenticated', 'Anonymous', 'Shared')">
156 <div class="list-item"><font color="" tal:attributes="color here/role_color" tal:content="role">Role</font></div>
157 </td>
158 </tr>
159
160 <!-- "(None)" item -->
161 <tr>
162 <td><div class="list-item"><input type="checkbox" name="roles:list" value="__None__"></div></td>
163 <td><div class="list-item"><i>(None)</i></div></td>
164 </tr>
165 </table>
166 </td>
167 </tr>
168 <tr>
169 <td colspan="2" align="middle"><input type="submit" name="changeOrCreateGroups:method" value="Change" /></td>
170 </table>
171 </td>
172 </tr>
173 </table>
174
175
176
177
178 <tr tal:replace="nothing">
179 <td valign="top" bgcolor="#EEEEEE">
180 <!-- Groups selection -->
181 <table width="100%">
182 <tr class="list-header">
183 <th colspan="2">Affect groups</th>
184 </tr>
185
186 <tr tal:repeat="group here/getGroups">
187 <td>
188 <input type="checkbox" name="nested_groups:list" value="" tal:attributes="value group">
189 </td>
190 <td>
191 <div class="list-item" tal:content="structure group/asHTML"></div>
192 </td>
193 </tr>
194
195 <!-- "(None)" item -->
196 <tr>
197 <td><div class="list-item"><input type="checkbox" name="nested_groups:list" value="__None__"></div></td>
198 <td><div class="list-item"><i>(None)</i></div></td>
199 </tr>
200 </table>
201
202 <br>
203
204 <!-- Roles selection -->
205 <table width="100%">
206 <tr class="list-header">
207 <th colspan="2">Affect roles</th>
208 </tr>
209
210 <tr tal:repeat="role here/valid_roles">
211 <td tal:condition="python:role not in ('Authenticated', 'Anonymous', 'Shared')">
212 <input type="checkbox" name="roles:list" value="" tal:attributes="value role">
213 </td>
214 <td tal:condition="python:role not in ('Authenticated', 'Anonymous', 'Shared')">
215 <div class="list-item"><font color="" tal:attributes="color here/role_color" tal:content="role">Role</font></div>
216 </td>
217 </tr>
218 <!-- "(None)" item -->
219 <tr>
220 <td><div class="list-item"><input type="checkbox" name="roles:list" value="__None__"></div></td>
221 <td><div class="list-item"><i>(None)</i></div></td>
222 </tr>
223 </table>
224 </td>
225 </tr>
226
227 <p class="form-help">
228 * According to the groups inheritance, this group is also recursively member of these groups. <br />This is what we call nested groups.
229 </p>
230 <p class="form-help">
231 ** Accorded to the groups inheritance, this group also has these roles - even if they are not defined explicitly on it.
232 </p>
233
234 </ol>
235 </form>
236
237
238 <h4>Instructions</h4>
239 <ol>
240
241 <p class="form-help">
242 To change roles for one or several groups, select them in the left form, select the roles you want to give them in the form on the right and click "Change".<br />
243 You can also create one or several groups by filling the text area (one group per line). the "Change" button will create them with the roles you've selected.<br />
244 If you are fed up with some groups, you can delete them by selecting them and clicking the "Delete" button.
245 </p>
246 <p class="form-help">
247 If you do not select any role, roles won't be reseted for the selected groups.<br />
248 If you do not select any group, groups won't be reseted for the selected groups.<br />
249 To explicitly reset groups or roles, just click the "(None)" entry (and no other entry).
250 </p>
251 </ol>
252
253 <h4>Important notice / disclaimer</h4>
254
255 <ol>
256 <p class="form-help">
257 This form uses the regular Zope Security API from the underlying user folders. However, you may experience problems with some
258 of them, especially if they are not tuned to allow user adding. For example, an LDAPUserFolder can be configured to disable
259 users management. In case this form doesn't work, you'll have to do things by hand within the 'Users' and 'Groups' GRUF folders.
260 </p>
261
262 <p class="form-help">
263 This is not a GRUF limitation ! :-)
264 </p>
265 </ol>
266
267 <h1 tal:replace="structure here/manage_page_footer">Footer</h1>