aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-12-16 00:34:38 +0000
committerMichael Scherer <misc@mageia.org>2010-12-16 00:34:38 +0000
commit8e1dc986e1415501696429bd2d3b58f727e23251 (patch)
treeb85f28cf8284095a7d90da3a3bb100968ae2c7cf /lib
parentdc5082636791477d51e8077067f92cfec64d119a (diff)
downloadidentity-8e1dc986e1415501696429bd2d3b58f727e23251.tar
identity-8e1dc986e1415501696429bd2d3b58f727e23251.tar.gz
identity-8e1dc986e1415501696429bd2d3b58f727e23251.tar.bz2
identity-8e1dc986e1415501696429bd2d3b58f727e23251.tar.xz
identity-8e1dc986e1415501696429bd2d3b58f727e23251.zip
- redirect user on his page if we detect him to be logged ( patch from Maarten Vanraes )
Diffstat (limited to 'lib')
-rw-r--r--lib/CatDap/Controller/Root.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/Root.pm b/lib/CatDap/Controller/Root.pm
index 550cd61..4cf7fd7 100644
--- a/lib/CatDap/Controller/Root.pm
+++ b/lib/CatDap/Controller/Root.pm
@@ -28,7 +28,11 @@ The root page (/)
sub index :Path :Args(0) {
my ( $self, $c ) = @_;
-
+ # if user is defined, redirect to /user and let the /user page handle the authentication
+ if (defined $c->user) {
+ $c->log->debug('Redirecting to /user');
+ $c->res->redirect('/user');
+ }
# Hello World
#$c->response->body( $c->welcome_message );
}