X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/5637ec97922038fa7a7cfe9f8aa13b1e3002abcd..bef19cbd240e996414af3e5c84fb1f8d8357340f:/app/controllers/voter_controller.rb?ds=sidebyside diff --git a/app/controllers/voter_controller.rb b/app/controllers/voter_controller.rb index 5d729a6..408bdab 100644 --- a/app/controllers/voter_controller.rb +++ b/app/controllers/voter_controller.rb @@ -123,8 +123,9 @@ class VoterController < ApplicationController end def results - if @voter.election.early_results? \ - or @voter.election.enddate < Time.now + if authenticate and + (@voter.election.early_results? \ + or @voter.election.enddate < Time.now) @election = @voter.election @sidebar_content = \ @@ -195,7 +196,7 @@ class VoterController < ApplicationController # when (a) there is no voter or (b) when there is a voter but # it's kiosk mode on the right page, rewrite with a blank voter - if not(@voter) \ + if ((not @voter) and (election.enddate < Time.now)) \ or (params[:action] == 'kiosk_ready' and election.kiosk) @voter = OpenVoter.new unless @voter end