source: trunk/LATMOS-Accounts-Web/root/html/admin/requests/index.tt @ 1091

Last change on this file since 1091 was 1091, checked in by nanardon, 12 years ago

Add ACL support to datarequest

If the forms contains a list of validators and user match it, permissions are
granted,
If global acl config grant '@VALIDATE' over 'request' object and user match it,
permissions are granted,
and if nothing match, permissions are checked over the pointed object.

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1[% ids = \c.model('Accounts').db.list_requests %]
2
3[% IF ids.list.size %]
4
5[% FOREACH id = ids %]
6[% IF loop.first %]
7<h2>Requêtes en attentes:</h2>
8<table border=1>
9<tr>
10<th>Requêtes</th>
11<th>Objet</th>
12<th>Demandeur</th>
13<th>Date</th>
14</tr>
15[% END %]
16
17[% req = c.model('Accounts').db.get_datarequest(id) %]
18
19<tr>
20<td>
21[% IF req.check_acl %]
22OK
23[% ELSE %]
24perm denied
25[% END %]
26<a href=[% c.uri_for(id) %]>
27[% req.accreq.get_attributes('description') || req.accreq.id | truncate(20) | html %]
28</a>
29</td>
30
31<td>
32[% oobject = req.oobject %]
33[% IF oobject %]
34[% dsn = oobject.get_attributes('displayName') %]
35[% IF dsn %]
36[% dsn | truncate(20) | html %]
37([% oobject.id | html %])
38[% ELSE %]
39[% oobject.id | html %]
40[% END %]
41[% END %]
42</td>
43
44<td>
45[% user = req.o_user %]
46[% IF user %]
47[% dsn = user.get_attributes('displayName') %]
48[% IF dsn %]
49[% dsn | truncate(20) | html %]
50([% user.id | html %])
51[% ELSE %]
52[% user.id | html %]
53[% END %]
54[% END %]
55</td>
56
57<td>
58[% req.apply | html %]
59[% IF req.due %]
60<span style="color: red">*</span>
61[% END %]
62[% IF req.automated %]
63<span style="color: blue">A</span>
64[% END %]
65</td>
66
67</tr>
68
69[% IF loop.last %]
70</table>
71[% END %]
72
73[% END %]
74
75[% ELSE %]
76
77<p>Pas de requêtes en attente.</p>
78
79[% END %]
Note: See TracBrowser for help on using the repository browser.