aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-01-24 09:20:35 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-01-24 09:20:35 +0000
commitfd55ac237e453139f4e8feba5db2fe6e55987023 (patch)
tree134d9e566ad09976c8c667d7143e81c8af6487da /perllib/FixMyStreet/App/Controller/Report.pm
parent5277688f17d1f0a26ae186779bb9aa4e8c7dd391 (diff)
Redirect to shortlist if user has shortlist perms.
Assume that if they inspect and save a report, they want to go back to their shortlist.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 3c251a5cb..175db4a19 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -433,6 +433,12 @@ sub inspect : Private {
} else {
$redirect_uri = $c->uri_for( $problem->url );
}
+
+ # Or if inspector, redirect back to shortlist
+ if ($c->user->has_body_permission_to('planned_reports')) {
+ $redirect_uri = $c->uri_for_action('my/planned');
+ }
+
$c->log->debug( "Redirecting to: " . $redirect_uri );
$c->res->redirect( $redirect_uri );
}