diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-10 16:38:33 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-11 10:46:02 +0100 |
commit | 8b557e11a27e00959af66ae20ee8d75d8d9de6be (patch) | |
tree | d1bb5af60a0a325498f1a3384f04d3573c21bd06 /perllib | |
parent | 266cf994a94689126f98a1987099cab079cb2180 (diff) |
Allow superusers access to update staff dropdowns.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/Update.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm index 5ad21ba48..cb9bbdb67 100644 --- a/perllib/FixMyStreet/App/Controller/Report/Update.pm +++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm @@ -343,7 +343,7 @@ sub check_for_errors : Private { my $state = $c->get_param('state'); if ( $state && $state ne $c->stash->{update}->problem->state ) { my $error = 0; - $error = 1 unless $c->user && $c->user->belongs_to_body( $c->stash->{update}->problem->bodies_str ); + $error = 1 unless $c->user && ($c->user->is_superuser || $c->user->belongs_to_body($c->stash->{update}->problem->bodies_str)); $error = 1 unless grep { $state eq $_ } FixMyStreet::DB::Result::Problem->visible_states(); if ( $error ) { $c->stash->{errors} ||= []; |