aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-05 09:58:18 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-05 09:58:18 +0000
commit7d6c549161f71670ceea286554e831369e8eb588 (patch)
tree412b8e28910966f873608ad3f5e79def465c42dd /perllib/FixMyStreet/App/Controller/Auth.pm
parent6f94fee70fb9ab86c88ff7c52d6b699ffdc355a9 (diff)
Redirect from auth to admin if already logged in on Zurich.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index f4d6d86e4..aae912ad1 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -31,7 +31,7 @@ sub general : Path : Args(0) {
my $req = $c->req;
$c->detach( 'redirect_on_signin', [ $req->param('r') ] )
- if $c->user && $req->param('r') && $req->param('r') !~ /admin/;
+ if $c->user && $req->param('r');
# all done unless we have a form posted to us
return unless $req->method eq 'POST';
@@ -182,6 +182,7 @@ 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;
$c->res->redirect( $c->uri_for( "/$redirect" ) );
}