Skip to content

Commit

Permalink
Merge branch 'master' into issue_457
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jan 22, 2019
2 parents 6a30c94 + 3a1fc33 commit 5ed996d
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 59 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -17,6 +17,9 @@ Fixes
- Remove confusing and broken button to show/hide the left-hand tree pane
(`#457 <https://github.com/zopefoundation/Zope/issues/457>`_)

- Don't error out when showing permissions for a non-existent user
(`#437 <https://github.com/zopefoundation/Zope/issues/437>`_)


4.0b8 (2018-12-14)
------------------
Expand Down
123 changes: 64 additions & 59 deletions src/OFS/dtml/reportUserPermissions.dtml
Expand Up @@ -9,67 +9,72 @@
in the context of the current object.
</p>

<dtml-let result="manage_getUserRolesAndPermissions(user)">
<p>
<strong>User account </strong>: &dtml-user;<br/>
<strong>User account defined in</strong>: <dtml-var "result['user_defined_in']">
</p>
<dtml-try>
<dtml-let result="manage_getUserRolesAndPermissions(user)">
<p>
<strong>User account </strong>: &dtml-user;<br/>
<strong>User account defined in</strong>: <dtml-var "result['user_defined_in']">
</p>

<table class="table">
<thead>
<tr>
<th scope="col" class="w-50">Roles</th>
<th scope="col" class="w-50">Roles in context</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<ul class="list-group zmi-roles">
<dtml-in "result['roles']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
<td valign="top">
<ul class="list-group zmi-rolesincontext">
<dtml-in "result['roles_in_context']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
</tr>
</tbody>
</table>

<table class="table">
<thead>
<tr>
<th scope="col" class="w-50">Allowed permissions</th>
<th scope="col" class="w-50">Disallowed permissions</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<ul class="list-group zmi-allowed">
<dtml-in "result['allowed_permissions']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
<td valign="top">
<ul class="list-group zmi-disallowed">
<dtml-in "result['disallowed_permissions']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
</tr>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th scope="col" class="w-50">Roles</th>
<th scope="col" class="w-50">Roles in context</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<ul class="list-group zmi-roles">
<dtml-in "result['roles']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
<td valign="top">
<ul class="list-group zmi-rolesincontext">
<dtml-in "result['roles_in_context']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
</tr>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th scope="col" class="w-50">Allowed permissions</th>
<th scope="col" class="w-50">Disallowed permissions</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<ul class="list-group zmi-allowed">
<dtml-in "result['allowed_permissions']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
<td valign="top">
<ul class="list-group zmi-disallowed">
<dtml-in "result['disallowed_permissions']">
<li class="list-group-item">&dtml-sequence-item;
</dtml-in>
</ul>
</td>
</tr>
</tbody>
</table>

</dtml-let>
</dtml-let>

<dtml-except>
The user <i>&dtml-user;</i> does not exist.
</dtml-try>

</main>

Expand Down

0 comments on commit 5ed996d

Please sign in to comment.