Sha256: 68b2bcf9c14110366ce4df9c49e476acacfb7af99924e65dd5670ea6a386e411
Contents?: true
Size: 566 Bytes
Versions: 17
Compression:
Stored size: 566 Bytes
Contents
module Spree::Admin::Orders::CustomerDetailsControllerDecorator def self.prepended(base) base.before_action :check_authorization end private def check_authorization load_order session[:access_token] ||= params[:token] resource = @order action = params[:action].to_sym action = :edit if action == :show # show route renders :edit for this controller authorize! action, resource, session[:access_token] end end Spree::Admin::Orders::CustomerDetailsController.prepend(Spree::Admin::Orders::CustomerDetailsControllerDecorator)
Version data entries
17 entries across 17 versions & 1 rubygems