if @dashboard.editable_by?(current_user)
render :partial => 'edit_form', :resource => params[:resource]
else
- redirect_to :action => 'index', :resource => params[:resource]
+ redirect_to :action => 'index', :resource => params[:resource], :status => 401
end
end
render :partial => 'dashboards/edit_form', :status => 400, :resource => params[:resource]
end
else
- # TODO - notify error ?
- render :text => @dashboard.id.to_s, :resource => params[:resource], :status => 200
+ render :text => @dashboard.id.to_s, :resource => params[:resource], :status => 401
end
end