layout 'test' if MagicNumber['test_layout']
if MagicNumber['run_mode'] == 0
before_filter :authenticate_user, :only => []
+ before_filter :authenticate_author, :only => []
else
before_filter :authenticate_user, :only => []
before_filter :authenticate_resource_reader, :only => [:show, :credit, :search]
+ before_filter :authenticate_author, :only => []
end
before_filter :authenticate_admin!, :only => [:list, :browse]
def show
- @picture = Picture.show(params[:id], [@author, @admin, @demand_user])
+ @picture = Picture.show(params[:id], [@user, @admin, @demand_user])
respond_to do |format|
opt = {:type => @picture.mime_type, :disposition=>"inline"}
end
def credit
- @picture = Picture.show(params[:id], [@author, @admin, @demand_user])
+ @picture = Picture.show(params[:id], [@user, @admin, @demand_user])
respond_to do |format|
format.html { render :layout => false } # show.html.erb