diff options
author | Struan Donald <struan@exo.org.uk> | 2018-04-17 16:38:36 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-06-19 10:21:44 +0100 |
commit | 85ae59fdd1d8690efc569a193853072eb2519c89 (patch) | |
tree | 589f4084ac35a7d05cb676547ae275a75c998cce /perllib/FixMyStreet/App/Controller/Root.pm | |
parent | 75a07fbfc7d2cd407189204a8e9a90d7fc3675cc (diff) |
cobrand hook to deny access to pages
Add a check in the root controller `auto` to a cobrand hook that denies
access if it returns true. This goes here so that cobrands and users are
set up, which is not the case for `check_login_required`. Used to do
things like deny site access unless the user is a superuser.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Root.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Root.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm index 7f70623ae..340c930c2 100644 --- a/perllib/FixMyStreet/App/Controller/Root.pm +++ b/perllib/FixMyStreet/App/Controller/Root.pm @@ -39,6 +39,7 @@ sub auto : Private { # decide which cobrand this request should use $c->setup_request(); + $c->detach('/auth/redirect') if $c->cobrand->call_hook('check_login_disallowed'); return 1; } |