]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Add support for domain based ACLs
[rails.git] / app / controllers / trace_controller.rb
index f206bb99f498ea5f1fc1598651d17364a9971f92..dbb8a6f2cb8ef4144e4e8d2eb47863fcb2b0d743 100644 (file)
@@ -163,7 +163,7 @@ class TraceController < ApplicationController
     trace = Trace.find(params[:id])
 
     if trace.visible? and (trace.public? or (@user and @user == trace.user))
     trace = Trace.find(params[:id])
 
     if trace.visible? and (trace.public? or (@user and @user == trace.user))
-      if Acl.address(request.remote_ip).where(:k => "no_trace_download").exists?
+      if Acl.match(request.remote_ip).where(:k => "no_trace_download").exists?
         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')
         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')