]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/traces/pictures_controller.rb
Merge remote-tracking branch 'upstream/pull/4770'
[rails.git] / app / controllers / traces / pictures_controller.rb
index aeac7df868aae3bbaa7419db45720b4070a3ce18..0e0d588cb7410a8c781d41380f0fa316fc039fbb 100644 (file)
@@ -6,9 +6,9 @@ module Traces
     authorize_resource :trace
 
     def show
-      trace = Trace.find(params[:trace_id])
+      trace = Trace.visible.find(params[:trace_id])
 
-      if trace.visible? && trace.inserted?
+      if trace.inserted?
         if trace.public? || (current_user && current_user == trace.user)
           if trace.icon.attached?
             redirect_to rails_blob_path(trace.image, :disposition => "inline")