<h2>{i18n}Permissions Overview{/i18n}</h2>

<p class="descriptiveText">{i18n}A particular workflow state can override some, all, 
or none of the permissions that would normally apply to a document.  In this
way you can (for example) let the folder's permissions decide who can see
the document (with <strong>Read</strong> permissions), while having the workflow
restrict access to the "edit" permission.{/i18n}</p>

<p class="descriptiveText important">{i18n}States which control permissions have a tick in
the "Control" column.  Permissions which are not controlled by a state (e.g. which 
are controlled by the folder a document is in) are marked with a dash (&mdash;). 
Controlled permissions are marked with a tick. <strong>Click on the state name to 
specify how it controls permissions.</strong>{/i18n}</p>

<table class="kt_collection" cellspacing="0">
    <thead>
        <tr>
            <th>{i18n}States{/i18n}</th>
            <th class="centered">{i18n}Control{/i18n}</th>            
          {foreach from=$perms item=oPerm}
            <th class="centered">{i18n}{$oPerm->getHumanName()}{/i18n}</th>
          {/foreach}
        </tr>
    </thead>
    <tbody>
        {foreach from=$states item=oState}
        {assign value=$oState->getId() var=state_id}
        <tr>
            <td><a href="{addQS context=$context}action=managepermissions&fStateId={$state_id}{/addQS}">{$oState->getName()}</a></td>
            <td class="centered">{if ($controllers.$state_id)} <span class="ktAction ktAllowed">yes</span> {else} <span class="ktAction ktDenied">no</span> {/if}</td>
          {foreach from=$perms item=oPerm}
          {assign value=$oPerm->getId() var=perm_id}
            <td class="centered">{if ($perm_grid.$state_id.$perm_id)} <span class="ktAction ktAllowed">managed</span> {else} &mdash; {/if}</td>
          {/foreach}            
        </tr>
        {/foreach}
    </tbody>
</table>
