aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-05-08 13:20:07 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-05-08 13:20:07 +0100
commit5231c0cda1b90c172dd65c3e0d19c4c4bb84e508 (patch)
tree79518a0e4c59c54166f95647f1b3783634fa9911
parentde24857f0b0c440cad69974c7c1d7f91fbb79a21 (diff)
Redirect to login page if not logged in.
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index 74588df36..6c327d479 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -27,6 +27,8 @@ Checks if we can view this page, and if not redirect to 404.
sub check_page_allowed : Private {
my ( $self, $c ) = @_;
+ $c->detach( '/auth/redirect' ) unless $c->user_exists;
+
$c->detach( '/page_error_404_not_found' )
unless $c->user_exists && $c->user->from_council;