aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/My.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-04-01 15:20:23 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-04-01 15:20:23 +0100
commit48fac6844f4a55c2086e17e9c75819a8ebc8c156 (patch)
treef496cc2666e4353b89d433744b5c9cb72915076e /perllib/FixMyStreet/App/Controller/My.pm
parentbd0ceef9ca66e1fc2a2e88d37165fe85eec3fe3e (diff)
Prevent access to '/my' for users who are not logged in
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 4c509ec80..1189fe901 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -20,10 +20,15 @@ Catalyst Controller.
=cut
-# FIXME - only logged in users should get to here.
-
sub my : Path : Args(0) {
my ( $self, $c ) = @_;
+
+ # FIXME - handle not being logged in more elegantly
+ unless ( $c->user ) {
+ $c->res->redirect( $c->uri_for('/auth') );
+ $c->detach;
+ }
+
}
__PACKAGE__->meta->make_immutable;