Revision
172
Author
misc
Date
2010-12-16 01:34:38 +0100 (Thu, 16 Dec 2010)

Log Message

- redirect user on his page if we detect him to be logged ( patch from Maarten Vanraes )

Modified Paths

Modified: identity/CatDap/trunk/lib/CatDap/Controller/Root.pm
===================================================================
--- identity/CatDap/trunk/lib/CatDap/Controller/Root.pm	2010-12-16 00:34:25 UTC (rev 171)
+++ identity/CatDap/trunk/lib/CatDap/Controller/Root.pm	2010-12-16 00:34:38 UTC (rev 172)
@@ -28,7 +28,11 @@
 
 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 );
 }