resolved_permissions_user.smarty
1.86 KB
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
<h2><img src="{if $config->get("ui/morphEnabled") == '1'}{$rootUrl}/skins/kts_{$config->get("ui/morphTo")}/title_bullet.png{else}{$rootUrl}/resources/graphics/title_bullet.png{/if}"/>{i18n}Resolved permissions per user{/i18n}:<br />{$context->oDocument->getName()}</h2>
<p class="descriptiveText">{i18n}This page shows the permissions that
individual users have on this document. Only the users which have permissions
assigned are shown.{/i18n}</p>
<p class="descriptiveText">{i18n}Users may have permissions on this
document due to membership of a group, or fulfilling a specific role on
this document.{/i18n}</p>
{if (empty($users)) }
<div class="ktInfoMessage"><span>{i18n}No users have permissions on this item.{/i18n}</span></div>
{else}
<table class="kt_collection"cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<th width="40%">{i18n}User{/i18n}</th>
{ foreach item=oPerm from=$permissions }
<th title="{$oPerm->getName()}" class="centered">{$oPerm->getHumanName()}{assign var=iPermId value=$oPerm->getId()}
{if ($workflow_controls.$iPermId)}<br /><span class="descriptiveText">(workflow controlled)</span>{/if}
{if ($conditions_control.$iPermId)}<br /><span class="descriptiveText">(condition affected)</span>{/if}</th>
{ /foreach }
</tr>
</thead>
<tbody>
{ foreach item=oUser from=$users }
<td><span class="descriptiveText">{i18n}User: {/i18n}</span> {$oUser->getName()}</td>
{ assign var=iUserId value=$oUser->getId() }
{ foreach item=oPerm from=$permissions }
{ assign var=iPermId value=$oPerm->getId() }
{ assign var=bHasPerm value=$aMapPermissionUser[$iPermId][$iUserId] }
{ if $bHasPerm }
<td class="centered"><span class="ktAction ktInline ktAllowed">{i18n}Allowed{/i18n}</span></td>
{ else }
<td class="centered"><span class="ktAction ktInline ktDenied">{i18n}Denied{/i18n}</span></td>
{ /if }
{ /foreach }
</tr>
{ /foreach }
</tbody>
</table>
{ /if }