Sha256: 2f8114039d3a031cd2ff4a12dcbccce345bdd78bb0cb09103c4146f091f81bad
Contents?: true
Size: 594 Bytes
Versions: 13
Compression:
Stored size: 594 Bytes
Contents
Spree::Admin::OrdersController.class_eval do before_filter :check_authorization private def load_order_action [:edit, :update, :cancel, :resume, :approve, :resend, :open_adjustments, :close_adjustments, :cart] end def check_authorization action = params[:action].to_sym if load_order_action.include?(action) load_order session[:access_token] ||= params[:token] resource = @order || Spree::Order.new authorize! action, resource, session[:access_token] else authorize! :index, Spree::Order end end end
Version data entries
13 entries across 13 versions & 2 rubygems