]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Explicitly disable the layout for actions which don't want it
[rails.git] / app / controllers / trace_controller.rb
index cdfa5e3cbe76f60b460fb1e8843225b6a00a101d..0ab87f6af72ef3b7fae671375aa1872b7022a3d9 100644 (file)
@@ -163,7 +163,9 @@ class TraceController < ApplicationController
     trace = Trace.find(params[:id])
 
     if trace.visible? and (trace.public? or (@user and @user == trace.user))
-      if request.format == Mime::XML
+      if Acl.no_trace_download(request.remote_ip)
+        render :nothing => true, :status => :forbidden
+      elsif request.format == Mime::XML
         send_file(trace.xml_file, :filename => "#{trace.id}.xml", :type => Mime::XML.to_s, :disposition => 'attachment')
       else
         send_file(trace.trace_name, :filename => "#{trace.id}#{trace.extension_name}", :type => trace.mime_type, :disposition => 'attachment')