X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/328d47e506972fededfa1080967224928c36a4cf..e1b205913c9afd6b41684add7308cef4613112e2:/app/controllers/node_controller.rb diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb index 03ae64f41..8e8c8446d 100644 --- a/app/controllers/node_controller.rb +++ b/app/controllers/node_controller.rb @@ -36,7 +36,7 @@ class NodeController < ApplicationController def read begin node = Node.find(params[:id]) - if node.visible + if node.visible? response.headers['Last-Modified'] = node.timestamp.rfc822 render :text => node.to_xml.to_s, :content_type => "text/xml" else @@ -87,6 +87,11 @@ class NodeController < ApplicationController def delete begin node = Node.find(params[:id]) + # FIXME we no longer care about the user, (or maybe we want to check + # that the user of the changeset is the same user as is making this + # little change?) we really care about the + # changeset which must be open, and that the version that we have been + # given is the one that is currently stored in the database node.delete_with_history(@user) render :nothing => true