Sha256: fd60f3dd9fe3f26d62908c7c24fa551a53ee9d698d9940b9a9f1f1896a5d2b39
Contents?: true
Size: 578 Bytes
Versions: 5
Compression:
Stored size: 578 Bytes
Contents
module Spree::Auth::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::Auth::Admin::Orders::CustomerDetailsControllerDecorator)
Version data entries
5 entries across 5 versions & 1 rubygems