<dtml-var manage_page_header>
<dtml-with "_(management_view='Security')">
<dtml-if  manage_tabs><dtml-var manage_tabs></dtml-if>
</dtml-with>

<p class="form-help">
This listing shows the permissions and roles for particular user
in the context of the current object.
</p>

<dtml-let result="manage_getUserRolesAndPermissions(user)">

<b>User account </b>: &dtml-user;
<br/>
<b>User account defined in</b>: <dtml-var "result['user_defined_in']">
<br/>
<br/>

<table width="50%" cellspacing="0" cellpadding="4" border="1" nowrap>
    <thead>
        <tr>
            <th>Roles</th>
            <th>Roles in context</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td valign="top">
                <ul>
                    <dtml-in "result['roles']">
                        <li>&dtml-sequence-item;
                    </dtml-in>
                </ul>
            </td>
            <td valign="top">
                <ul>
                    <dtml-in "result['roles_in_context']">
                        <li>&dtml-sequence-item;
                    </dtml-in>
                </ul>
            </td>
        </tr>
    </tbody>
</table>

<br/>

<table width="50%" cellspacing="0" cellpadding="4" border="1" nowrap>
    <thead>
        <tr>
            <th>Allowed permissions</th>
            <th>Disallowed permissions</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td valign="top">
                <ul>
                    <dtml-in "result['allowed_permissions']">
                        <li>&dtml-sequence-item;
                    </dtml-in>
                </ul>
            </td>
            <td valign="top">
                <ul>
                    <dtml-in "result['disallowed_permissions']">
                        <li>&dtml-sequence-item;
                    </dtml-in>
                </ul>
            </td>
        </tr>
    </tbody>
</table>


</dtml-let>

<dtml-var manage_page_footer>

