]> projects.mako.cc - selectricity/blobdiff - app/controllers/voter_controller.rb
Added funcitionality so user can change the email address associated with their accou...
[selectricity] / app / controllers / voter_controller.rb
index 5d729a6752800f7f799666b3c45d3bc38ceca375..408bdab880ec0f411a1d19f8eea0261f3b5d1d02 100644 (file)
@@ -123,8 +123,9 @@ class VoterController < ApplicationController
   end
   
   def results
   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 = \
       
       @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
 
         # 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
           or (params[:action] == 'kiosk_ready' and election.kiosk)
           @voter = OpenVoter.new unless @voter
         end

Benjamin Mako Hill || Want to submit a patch?