[Mageia-sysadm] [172] - redirect user on his page if we detect him to be logged ( patch from Maarten Vanraes )
root at mageia.org
root at mageia.org
Thu Dec 16 01:34:38 CET 2010
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:
--------------
identity/CatDap/trunk/lib/CatDap/Controller/Root.pm
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 );
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101216/b93deedc/attachment.html>
More information about the Mageia-sysadm
mailing list