diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-17 17:39:23 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-19 14:43:26 +0000 |
commit | 91d18218d1d889f9421a4393146b5148d00c80b2 (patch) | |
tree | e32448dde637882595cdc6f78f922eb1b58b009a | |
parent | 4ca398abb51f573bbab41f9335f2c102dfc190f2 (diff) |
Zurich admin auth with front end.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Auth.pm | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 9e589b1f0..79052b9a1 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -33,6 +33,11 @@ sub begin : Private { my ( $self, $c ) = @_; $c->uri_disposition('relative'); + + if ($c->cobrand->moniker eq 'zurich') { + $c->detach( '/auth/redirect' ) unless $c->user_exists; + $c->detach( '/auth/redirect' ) unless $c->user->from_body; + } } sub summary : Path( 'summary' ) : Args(0) { diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm index 3dc25dedf..f4d6d86e4 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'); + if $c->user && $req->param('r') && $req->param('r') !~ /admin/; # all done unless we have a form posted to us return unless $req->method eq 'POST'; |