Ignore:
Timestamp:
04/12/09 22:54:30 (15 years ago)
Author:
nanardon
Message:
  • set on password field by poll (#32)
Location:
trunk/lib/Vote/Controller
Files:
2 edited

Legend:

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

    r183 r186  
    129129        if ($c->req->param('decryptballot')) { 
    130130            $c->model('Vote')->poll($c->stash->{voteid})->decrypted_ballots( 
    131                 $c->session->{vpassword} 
     131                $c->session->{'vpass' . $c->stash->{voteid}} 
    132132            ); 
    133133        }    
     
    139139    my ($self, $c) = @_; 
    140140    my $vote = $c->model('Vote'); 
    141     my $password = $c->session->{vpassword} || $c->req->param('vpassword'); 
     141    my $password = $c->session->{'vpass' . $c->stash->{voteid}} || 
     142        $c->req->param('vpass' . $c->stash->{voteid}); 
    142143 
    143144    if (!$c->model('Vote')->auth_poll($c->stash->{voteid}, $password)) { 
     
    145146            $c->stash->{voteid} 
    146147        )->{label} . ': Login d\'administration'; 
    147         $c->session->{vpassword} = undef; 
     148        $c->session->{'vpass' . $c->stash->{voteid}} = undef; 
    148149        $c->stash->{template} = 'admin/login.tt'; 
    149150        return; 
    150151    } 
    151     $c->session->{vpassword} = $password; 
     152    $c->session->{'vpass' . $c->stash->{voteid}} = $password; 
    152153    return 1; 
    153154} 
  • trunk/lib/Vote/Controller/Newpoll.pm

    r181 r186  
    6868    if ($c->req->param('passwd')) { 
    6969        my $pid = $c->model('Vote')->poll_from_request($id, $c->req->param('passwd')); 
    70         $c->session->{vpassword} = $c->req->param('passwd'); # avoid auth on admin page 
     70        $c->session->{'vpass' . $pid} = $c->req->param('passwd'); # avoid auth on admin page 
    7171        $c->res->redirect($c->uri_for('/admin', $pid)); 
    7272    } 
Note: See TracChangeset for help on using the changeset viewer.