X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/67182f824e9ace7d5f6d40691e2d3d120b8fbfea..1f9301e2e2f4253b43268eecfa9ca917a4acb6ad:/app/controllers/old_node_controller.rb?ds=sidebyside diff --git a/app/controllers/old_node_controller.rb b/app/controllers/old_node_controller.rb index 1b5ec13a3..02290ffa2 100644 --- a/app/controllers/old_node_controller.rb +++ b/app/controllers/old_node_controller.rb @@ -17,7 +17,7 @@ class OldNodeController < ApplicationController 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 @@ -31,10 +31,10 @@ class OldNodeController < ApplicationController 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 - else + else response.last_modified = @old_node.timestamp doc = OSM::API.new.get_xml_doc