diff options
author | dakkar <dakkar@luxion> | 2006-02-09 12:35:14 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2006-02-09 12:35:14 +0000 |
commit | ce0dd6514a8b77da30d03542500847b9bbec6962 (patch) | |
tree | 5d8373820e620654b5ae6627dc92f9c4fb1af316 /GroLUG/lib/GroLUG.pm | |
parent | funge il modello... ca**o (diff) | |
download | IscrittiGroLUG-ce0dd6514a8b77da30d03542500847b9bbec6962.tar.gz IscrittiGroLUG-ce0dd6514a8b77da30d03542500847b9bbec6962.tar.bz2 IscrittiGroLUG-ce0dd6514a8b77da30d03542500847b9bbec6962.zip |
login e lista iscritti
git-svn-id: svn://luxion/repos/IscrittiGroLUG/trunk@171 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'GroLUG/lib/GroLUG.pm')
-rw-r--r-- | GroLUG/lib/GroLUG.pm | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/GroLUG/lib/GroLUG.pm b/GroLUG/lib/GroLUG.pm index 404fde1..267231f 100644 --- a/GroLUG/lib/GroLUG.pm +++ b/GroLUG/lib/GroLUG.pm @@ -1,19 +1,30 @@ package GroLUG; - use strict; use warnings; -use Catalyst qw/-Debug ConfigLoader Static::Simple DefaultEnd Session Session::Store::DBI Session::State::Cookie/; +use Catalyst qw{ + -Debug + ConfigLoader Static::Simple DefaultEnd + Session Session::Store::DBI Session::State::Cookie + Authentication Authentication::Store::Htpasswd Authentication::Credential::Password + Authorization::Roles + }; +use Catalyst::Log::Log4perl; our $VERSION = '0.01'; __PACKAGE__->setup; +#__PACKAGE__->log(Catalyst::Log::Log4perl->new(__PACKAGE__->path_to("logger.conf")->stringify)); -sub default : Private { +sub index : Private { my ( $self, $c ) = @_; - # Hello World - $c->response->body( $c->welcome_message ); + if ($c->user_exists) { + $c->res->redirect($c->uri_for('/iscritti')); + } + else { + $c->res->redirect($c->uri_for('/login')) + } } 1; |