aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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 );
}