|
@@ -33,21 +33,17 @@
|
33
|
33
|
<th></th>
|
34
|
34
|
</tr>
|
35
|
35
|
</thead>
|
36
|
|
- % for loCurrentGroup in real_groups:
|
37
|
|
- % if loCurrentGroup.hasSomeAccess(poNode):
|
|
36
|
+ % for loGroupRightsOnNode in real_group_rights:
|
|
37
|
+ % if loGroupRightsOnNode.hasSomeAccess():
|
38
|
38
|
<tr>
|
39
|
|
- <td>${loCurrentGroup.getDisplayName()}</td>
|
|
39
|
+ <td>${loGroupRightsOnNode.display_name}</td>
|
40
|
40
|
<td>
|
41
|
|
- % for loRight in loCurrentGroup.rights:
|
42
|
|
- % if loRight.node_id==poNode.node_id:
|
43
|
|
- % if loRight.hasReadAccess():
|
44
|
|
- <span class="label label-success">R</span>
|
45
|
|
- % endif
|
46
|
|
- % if loRight.hasWriteAccess():
|
47
|
|
- <span class="label label-warning">W</span>
|
48
|
|
- % endif
|
49
|
|
- % endif
|
50
|
|
- % endfor
|
|
41
|
+ % if loGroupRightsOnNode.hasReadAccess():
|
|
42
|
+ <span class="label label-success">R</span>
|
|
43
|
+ % endif
|
|
44
|
+ % if loGroupRightsOnNode.hasWriteAccess():
|
|
45
|
+ <span class="label label-warning">W</span>
|
|
46
|
+ % endif
|
51
|
47
|
</td>
|
52
|
48
|
</tr>
|
53
|
49
|
% endif
|
|
@@ -58,21 +54,17 @@
|
58
|
54
|
<th></th>
|
59
|
55
|
</tr>
|
60
|
56
|
</thead>
|
61
|
|
- % for loCurrentGroup in user_specific_groups:
|
62
|
|
- % if loCurrentGroup.hasSomeAccess(poNode):
|
|
57
|
+ % for loGroupRightsOnNode in user_specific_group_rights:
|
|
58
|
+ % if loGroupRightsOnNode.hasSomeAccess():
|
63
|
59
|
<tr>
|
64
|
|
- <td>${loCurrentGroup.getDisplayName()}</td>
|
|
60
|
+ <td>${loGroupRightsOnNode.display_name}</td>
|
65
|
61
|
<td>
|
66
|
|
- % for loRight in loCurrentGroup.rights:
|
67
|
|
- % if loRight.node_id==poNode.node_id:
|
68
|
|
- % if loRight.hasReadAccess():
|
69
|
|
- <span class="label label-success">R</span>
|
70
|
|
- % endif
|
71
|
|
- % if loRight.hasWriteAccess():
|
72
|
|
- <span class="label label-warning">W</span>
|
73
|
|
- % endif
|
74
|
|
- % endif
|
75
|
|
- % endfor
|
|
62
|
+ % if loGroupRightsOnNode.hasReadAccess():
|
|
63
|
+ <span class="label label-success">R</span>
|
|
64
|
+ % endif
|
|
65
|
+ % if loGroupRightsOnNode.hasWriteAccess():
|
|
66
|
+ <span class="label label-warning">W</span>
|
|
67
|
+ % endif
|
76
|
68
|
</td>
|
77
|
69
|
</tr>
|
78
|
70
|
% endif
|
|
@@ -178,22 +170,23 @@
|
178
|
170
|
<th>${_('Access')}</th>
|
179
|
171
|
</tr>
|
180
|
172
|
</thead>
|
181
|
|
- % for loCurrentGroup in real_groups:
|
182
|
|
- <tr id='user-${loCurrentGroup.group_id}-rights-row'>
|
|
173
|
+ % for loGroupRightsOnNode in real_group_rights:
|
|
174
|
+
|
|
175
|
+ <tr id='user-${loGroupRightsOnNode.group_id}-rights-row'>
|
183
|
176
|
<td>
|
184
|
177
|
<a
|
185
|
178
|
class="btn btn-mini"
|
186
|
|
- onclick="updateRights(${loCurrentGroup.group_id})"
|
|
179
|
+ onclick="updateRights(${loGroupRightsOnNode.group_id})"
|
187
|
180
|
>
|
188
|
181
|
<i class="fa fa-key"></i>
|
189
|
182
|
</a>
|
190
|
183
|
</td>
|
191
|
184
|
<td class='pod-highlightable-access-management-cell'>
|
192
|
|
- ${loCurrentGroup.getDisplayName()}
|
193
|
|
- <input type="hidden" id="user-${loCurrentGroup.group_id}-value-read" name="read" value="" />
|
194
|
|
- <input type="hidden" id="user-${loCurrentGroup.group_id}-value-write" name="write" value="" />
|
|
185
|
+ ${loGroupRightsOnNode.display_name}
|
|
186
|
+ <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-read" name="read" value="" />
|
|
187
|
+ <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-write" name="write" value="" />
|
195
|
188
|
</td>
|
196
|
|
- <td id="user-${loCurrentGroup.group_id}-rights" class="pod-right-cell"></td>
|
|
189
|
+ <td id="user-${loGroupRightsOnNode.group_id}-rights" class="pod-right-cell"></td>
|
197
|
190
|
</tr>
|
198
|
191
|
% endfor
|
199
|
192
|
|
|
@@ -208,23 +201,23 @@
|
208
|
201
|
<th>${_('Access')}</th>
|
209
|
202
|
</tr>
|
210
|
203
|
</thead>
|
211
|
|
- % for loCurrentGroup in user_specific_groups:
|
|
204
|
+ % for loGroupRightsOnNode in user_specific_group_rights:
|
212
|
205
|
|
213
|
|
- <tr id='user-${loCurrentGroup.group_id}-rights-row'>
|
|
206
|
+ <tr id='user-${loGroupRightsOnNode.group_id}-rights-row'>
|
214
|
207
|
<td>
|
215
|
208
|
<a
|
216
|
209
|
class="btn btn-mini"
|
217
|
|
- onclick="updateRights(${loCurrentGroup.group_id})"
|
|
210
|
+ onclick="updateRights(${loGroupRightsOnNode.group_id})"
|
218
|
211
|
>
|
219
|
212
|
<i class="fa fa-key"></i>
|
220
|
213
|
</a>
|
221
|
214
|
</td>
|
222
|
215
|
<td class='pod-highlightable-access-management-cell'>
|
223
|
|
- ${loCurrentGroup.getDisplayName()}
|
224
|
|
- <input type="hidden" id="user-${loCurrentGroup.group_id}-value-read" name="read" value="" />
|
225
|
|
- <input type="hidden" id="user-${loCurrentGroup.group_id}-value-write" name="write" value="" />
|
|
216
|
+ ${loGroupRightsOnNode.display_name}
|
|
217
|
+ <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-read" name="read" value="" />
|
|
218
|
+ <input type="hidden" id="user-${loGroupRightsOnNode.group_id}-value-write" name="write" value="" />
|
226
|
219
|
</td>
|
227
|
|
- <td id="user-${loCurrentGroup.group_id}-rights" class="pod-right-cell"></td>
|
|
220
|
+ <td id="user-${loGroupRightsOnNode.group_id}-rights" class="pod-right-cell"></td>
|
228
|
221
|
</tr>
|
229
|
222
|
% endfor
|
230
|
223
|
</table>
|
|
@@ -348,18 +341,16 @@
|
348
|
341
|
## for read/write access management
|
349
|
342
|
##
|
350
|
343
|
|
351
|
|
- % for loCurrentGroup in real_groups + user_specific_groups:
|
352
|
|
- % if loCurrentGroup.hasSomeAccess(poNode)==False:
|
353
|
|
- updateRights(${loCurrentGroup.group_id}, 0);
|
|
344
|
+## FIXME % for loGroupRightsOnNode in real_group_rights:
|
|
345
|
+## % for loCurrentGroup in real_group_rights + user_specific_group_rights:
|
|
346
|
+ % for loGroupRightsOnNode in real_group_rights + user_specific_group_rights:
|
|
347
|
+ % if loGroupRightsOnNode.hasSomeAccess()==False:
|
|
348
|
+ updateRights(${loGroupRightsOnNode.group_id}, 0);
|
354
|
349
|
% else:
|
355
|
|
- % for loRight in loCurrentGroup.rights:
|
356
|
|
- % if loRight.node_id==poNode.node_id:
|
357
|
350
|
##
|
358
|
351
|
## The following line should build some javascript code similar to this:
|
359
|
352
|
## updateRights(-5, 3);
|
360
|
|
- updateRights(${loCurrentGroup.group_id}, ${loRight.rights});
|
361
|
|
- % endif
|
362
|
|
- % endfor
|
|
353
|
+ updateRights(${loGroupRightsOnNode.group_id}, ${loGroupRightsOnNode.rights});
|
363
|
354
|
% endif
|
364
|
355
|
% endfor
|
365
|
356
|
|