aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 9405ec48c..cda569860 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -75,10 +75,12 @@ sub load_problem_or_display_error : Private {
[ _('That report has been removed from FixMyStreet.') ] #
);
} elsif ( $problem->non_public ) {
- $c->detach(
- '/page_error_403_access_denied',
- [ _('That report cannot be viewed on FixMyStreet.') ] #
- );
+ if ( !$c->user || $c->user->id != $problem->user->id ) {
+ $c->detach(
+ '/page_error_403_access_denied',
+ [ _('That report cannot be viewed on FixMyStreet.') ] #
+ );
+ }
}
$c->stash->{problem} = $problem;