2 class PicturesController < ApplicationController
3 before_action :authorize_web
4 before_action :check_database_readable
6 authorize_resource :trace
9 trace = Trace.visible.imported.find(params[:trace_id])
11 if trace.public? || (current_user && current_user == trace.user)
12 redirect_to rails_blob_path(trace.image, :disposition => "inline")
16 rescue ActiveRecord::RecordNotFound