diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-08 20:51:03 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-11 10:43:31 +0100 |
commit | 137dcda8e489c5cbd2a777c83148d1e4a3bd1a60 (patch) | |
tree | bdcc94c7e4cf5beac1e5a0ac22edf75252b862a0 /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | 3930c5cd692580ebb99ece5af39a6ee55cb28f24 (diff) |
Fix bug if first page after restart is admin.
If the first page looked at after server launch was an admin one, the
User object was getting a different schema attached than the one used
by everything else (so e.g. the cobrand was not then available to it,
causing a crash on a body page). Using auto instead of begin prevents
this from happening, as the setup_request auto always runs first.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index f1508f0b1..5bdcb5642 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -27,7 +27,7 @@ Admin pages =cut -sub begin : Private { +sub auto : Private { my ( $self, $c ) = @_; $c->uri_disposition('relative'); @@ -44,10 +44,6 @@ sub begin : Private { if ( $c->cobrand->moniker eq 'zurich' ) { $c->cobrand->admin_type(); } -} - -sub auto : Private { - my ( $self, $c ) = @_; $c->forward('check_page_allowed'); } |