Changeset 186
- Timestamp:
- 04/12/09 22:54:30 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Admin.pm
r183 r186 129 129 if ($c->req->param('decryptballot')) { 130 130 $c->model('Vote')->poll($c->stash->{voteid})->decrypted_ballots( 131 $c->session->{ vpassword}131 $c->session->{'vpass' . $c->stash->{voteid}} 132 132 ); 133 133 } … … 139 139 my ($self, $c) = @_; 140 140 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}); 142 143 143 144 if (!$c->model('Vote')->auth_poll($c->stash->{voteid}, $password)) { … … 145 146 $c->stash->{voteid} 146 147 )->{label} . ': Login d\'administration'; 147 $c->session->{ vpassword} = undef;148 $c->session->{'vpass' . $c->stash->{voteid}} = undef; 148 149 $c->stash->{template} = 'admin/login.tt'; 149 150 return; 150 151 } 151 $c->session->{ vpassword} = $password;152 $c->session->{'vpass' . $c->stash->{voteid}} = $password; 152 153 return 1; 153 154 } -
trunk/lib/Vote/Controller/Newpoll.pm
r181 r186 68 68 if ($c->req->param('passwd')) { 69 69 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 page70 $c->session->{'vpass' . $pid} = $c->req->param('passwd'); # avoid auth on admin page 71 71 $c->res->redirect($c->uri_for('/admin', $pid)); 72 72 } -
trunk/root/templates/admin/login.tt
r72 r186 5 5 <form action="[% c.uri_for('/admin', voteid) %]" method="POST"> 6 6 <p>Accès à l'interface d'administration du vote <b><i>[% vote.vote_info(voteid).label | html %]</i></b></p> 7 <p>Veuillez saisir le mot de passe : <input type="password" name=" vpassword">7 <p>Veuillez saisir le mot de passe : <input type="password" name="[% 'vpass' _ voteid %]"> 8 8 <input type="submit"></p> 9 9 </form>
Note: See TracChangeset
for help on using the changeset viewer.