diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-01-24 17:12:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-09 12:57:58 +0100 |
commit | 9da59471cd094567b214db643f2ffc471f823dca (patch) | |
tree | dd133b4a89affaa41fbd10f195a9aa8b68925f92 /perllib | |
parent | 2012321cda35654d33708e60404d33742b48ead1 (diff) |
Cobrand hook for showing all states in filter.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index f4da58d20..fb7c4e4f3 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -706,9 +706,9 @@ sub stash_report_filter_status : Private { $filter_status{unshortlisted} = 1; } - if ($c->user and ($c->user->is_superuser or ( - $c->stash->{body} and $c->user->belongs_to_body($c->stash->{body}->id) - ))) { + my $body_user = $c->user_exists && $c->stash->{body} && $c->user->belongs_to_body($c->stash->{body}->id); + my $staff_user = $c->user_exists && ($c->user->is_superuser || $body_user); + if ($staff_user || $c->cobrand->call_hook('filter_show_all_states')) { $c->stash->{filter_states} = $c->cobrand->state_groups_inspect; foreach my $state (FixMyStreet::DB::Result::Problem->visible_states()) { if ($status{$state}) { |