diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 4 | ||||
-rw-r--r-- | templates/web/base/admin/user-form.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index b643c9633..a312a4399 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -1218,7 +1218,7 @@ sub user_edit : Path('user_edit') : Args(1) { my $user = $c->cobrand->users->find( { id => $id } ); $c->detach( '/page_error_404_not_found', [] ) unless $user; - unless ( $c->user->is_superuser || $c->user->has_body_permission_to('user_edit') ) { + unless ( $c->user->is_superuser || $c->user->has_body_permission_to('user_edit') || $c->cobrand->moniker eq 'zurich' ) { $c->detach('/page_error_403_access_denied', []); } @@ -1253,7 +1253,7 @@ sub user_edit : Path('user_edit') : Args(1) { $user->is_superuser( ( $c->user->is_superuser && $c->get_param('is_superuser') ) || 0 ); # Superusers can set from_body to any value, but other staff can only # set from_body to the same value as their own from_body. - if ( $c->user->is_superuser ) { + if ( $c->user->is_superuser || $c->cobrand->moniker eq 'zurich' ) { $user->from_body( $c->get_param('body') || undef ); } elsif ( $c->user->has_body_permission_to('user_assign_body') && $c->get_param('body') && $c->get_param('body') eq $c->user->from_body->id ) { diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html index 8a9ba5a77..38191e095 100644 --- a/templates/web/base/admin/user-form.html +++ b/templates/web/base/admin/user-form.html @@ -23,7 +23,7 @@ <li><label for="phone">[% loc('Phone:') %]</label> <input type='text' id='phone' name='phone' value='[% user.phone | html %]'></li> - [% IF c.user.is_superuser %] + [% IF c.user.is_superuser || c.cobrand.moniker == 'zurich' %] <li> <div class="admin-hint"> <p> @@ -53,7 +53,7 @@ </li> [% END %] - [% IF areas %] + [% IF areas AND c.cobrand.moniker != 'zurich' %] <li> <div class="admin-hint"> <p> |