diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-01-24 09:20:35 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-01-24 09:20:35 +0000 |
commit | fd55ac237e453139f4e8feba5db2fe6e55987023 (patch) | |
tree | 134d9e566ad09976c8c667d7143e81c8af6487da /perllib/FixMyStreet/App | |
parent | 5277688f17d1f0a26ae186779bb9aa4e8c7dd391 (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')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 6 |
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 ); } |