Ignore:
Timestamp:
03/06/09 17:13:26 (15 years ago)
Author:
nanardon
Message:
  • add authentication part
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Controller/Ballot.pm

    r9 r13  
    3636    my $password = $c->session->{password} || $c->req->param('password'); 
    3737 
    38     if (!($uid && $password)) { 
     38    if (!$c->model('Vote')->auth_voting($id, $uid, $password)) { 
     39        $c->delete_session('invalid user/pass'); 
    3940        $c->stash->{template} = 'ballot/login.tt'; 
    4041        return; 
     
    5152    $c->stash->{sbal} = { map { $_ => 1 } $c->req->param('sbal') }; 
    5253 
    53     my $uid = 'Olivier Thauvin'; # for test now 
    5454    if ($c->req->param('confirm')) { 
    5555        $vote->register_ballot( 
Note: See TracChangeset for help on using the changeset viewer.