diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-01-10 13:24:44 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-01-10 17:16:22 +0000 |
commit | d5641749504a8eb9295f95bac412cb3737256476 (patch) | |
tree | 7b5536582e9efe20aaf1e319947150bc3ff6b384 /templates | |
parent | dbed1557237be7a6a6ac31566b06b8ad24e2282c (diff) |
Update has_body_permission_to to allow superusers.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/admin/user-form.html | 4 | ||||
-rw-r--r-- | templates/web/base/admin/users.html | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html index 17230e940..0f5452b0a 100644 --- a/templates/web/base/admin/user-form.html +++ b/templates/web/base/admin/user-form.html @@ -47,7 +47,7 @@ [% loc("Staff users have permission to log in to the admin.") %] </p> </div> - [% loc('Staff:') %] <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.is_superuser OR c.user.has_body_permission_to('user_assign_body') %]> + [% loc('Staff:') %] <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.has_body_permission_to('user_assign_body') %]> </li> [% END %] @@ -162,7 +162,7 @@ [% FOREACH permission IN group.value %] <li> <label class="inline"> - <input type="checkbox" id="perms_[% permission.key %]" name="permissions[[% permission.key %]]" [% "checked" IF user.has_body_permission_to(permission.key) %]> + <input type="checkbox" id="perms_[% permission.key %]" name="permissions[[% permission.key %]]" [% "checked" IF NOT user.is_superuser AND user.has_body_permission_to(permission.key) %]> [% permission.value %] </label> </li> diff --git a/templates/web/base/admin/users.html b/templates/web/base/admin/users.html index 757046bcf..7bbe04e1e 100644 --- a/templates/web/base/admin/users.html +++ b/templates/web/base/admin/users.html @@ -26,7 +26,7 @@ <td>[% PROCESS value_or_nbsp value=user.name %]</td> <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> <td>[% PROCESS value_or_nbsp value=user.from_body.name %] - [% IF user.has_body_permission_to('moderate') %] * [% END %] + [% IF NOT user.is_superuser AND user.has_body_permission_to('moderate') %] * [% END %] </td> [% IF c.cobrand.moniker != 'zurich' %] <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> |