Changeset 65
- Timestamp:
- 12/03/10 13:24:17 (14 years ago)
- Location:
- server/trunk/web
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/Makefile.PL
r58 r65 20 20 requires 'namespace::autoclean'; 21 21 requires 'Catalyst::Plugin::Authentication' => '0'; 22 requires 'Catalyst::Plugin::Authorization::Roles' => '0'; 22 23 requires 'Catalyst::Plugin::Session' => '0'; 23 24 requires 'Catalyst::Plugin::Session::Store::DBI' => '0'; -
server/trunk/web/Sophie.spec.in
r60 r65 21 21 BuildRequires: perl(YAML) 22 22 BuildRequires: perl(Catalyst::Plugin::Authentication) 23 BuildRequires: perl(Catalyst::Plugin::Authorization::Roles) 23 24 BuildRequires: perl(Catalyst::Plugin::Session) 24 25 BuildRequires: perl(Catalyst::Plugin::Session::State::Cookie) … … 41 42 Requires: perl(YAML) 42 43 Requires: perl(Catalyst::Plugin::Authentication) 44 Requires: perl(Catalyst::Plugin::Authorization::Roles) 43 45 Requires: perl(Catalyst::Plugin::Session) 44 46 Requires: perl(Catalyst::Plugin::Session::State::Cookie) -
server/trunk/web/lib/Sophie.pm
r42 r65 23 23 Server::XMLRPC 24 24 Authentication 25 Authorization::Roles 25 26 /; 26 27 … … 63 64 class => 'DBIx::Class', 64 65 user_model => 'Base::Users', 65 role_relation => ' UsersRoles',66 role_relation => 'Roles', 66 67 role_field => 'rolename', 67 68 id_field => 'mail', 69 # use_userdata_from_session => 1, 68 70 }, 69 71 }, -
server/trunk/web/lib/Sophie/Controller/Root.pm
r54 r65 53 53 54 54 if ($c->action =~ m/^admin\//) { 55 if (! $c->user_exists) {55 if (!($c->user_exists && $c->check_user_roles($c->user, 'Admin'))) { 56 56 $c->res->redirect($c->uri_for('/login')); 57 57 } -
server/trunk/web/lib/Sophie/Controller/User.pm
r36 r65 50 50 my ( $self, $c, $dataname ) = @_; 51 51 52 return $c->forward('fetch_user_data', [ $c->user || '', $dataname ]);52 return $c->forward('fetch_user_data', [ $c->user->mail || '', $dataname ]); 53 53 } 54 54 … … 70 70 my ( $self, $c, $dataname, $data ) = @_; 71 71 72 return $c->forward('set_user_data', [ $c->user , $dataname, $data ]);72 return $c->forward('set_user_data', [ $c->user->mail, $dataname, $data ]); 73 73 } 74 74
Note: See TracChangeset
for help on using the changeset viewer.