]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/old_node_controller.rb
Better comments in application controller logic
[rails.git] / app / controllers / old_node_controller.rb
index 1b5ec13a310002e0248f8d7c846495d972d42370..02290ffa217b729edcafb44511e053f169d6383b 100644 (file)
@@ -17,7 +17,7 @@ class OldNodeController < ApplicationController
     
     doc = OSM::API.new.get_xml_doc
     
     
     doc = OSM::API.new.get_xml_doc
     
-    visible_nodes = if @user and @user.moderator?
+    visible_nodes = if @user and @user.moderator? and params[:show_redactions] == "true"
                       node.old_nodes
                     else
                       node.old_nodes.unredacted
                       node.old_nodes
                     else
                       node.old_nodes.unredacted
@@ -31,10 +31,10 @@ class OldNodeController < ApplicationController
   end
   
   def version
   end
   
   def version
-    if @old_node.redacted? and (@user.nil? or not @user.moderator?)
+    if @old_node.redacted? and not (@user and @user.moderator? and params[:show_redactions] == "true")
       render :nothing => true, :status => :forbidden
       render :nothing => true, :status => :forbidden
-    else
 
 
+    else
       response.last_modified = @old_node.timestamp
       
       doc = OSM::API.new.get_xml_doc
       response.last_modified = @old_node.timestamp
       
       doc = OSM::API.new.get_xml_doc