aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm6
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}) {