aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-05 10:30:06 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-05 10:30:06 +0000
commit6e387850c170743ce2ba61a890e34bc9ad8ff3b8 (patch)
tree30de98d6de0f2c4fd421767ca260eb7caf11104c /perllib/FixMyStreet
parent33c7cab5e21eaa0f4aeb353f2e85768443aabe13 (diff)
Redirect better to prevent possible infinite loop, update test.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index aae912ad1..57b53a155 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -182,7 +182,10 @@ Used after signing in to take the person back to where they were.
sub redirect_on_signin : Private {
my ( $self, $c, $redirect ) = @_;
$redirect = 'my' unless $redirect;
- $redirect = 'admin' if $c->cobrand->moniker eq 'zurich' && $c->user->from_body;
+ if ( $c->cobrand->moniker eq 'zurich' ) {
+ $redirect = 'my' if $redirect eq 'admin';
+ $redirect = 'admin' if $c->user->from_body;
+ }
$c->res->redirect( $c->uri_for( "/$redirect" ) );
}