Sha256: 2f136eb11370f9c41bdf80d27381855b62f7923c8f589a97fe9b0858afc20663
Contents?: true
Size: 546 Bytes
Versions: 11
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true 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 Spree::Admin::Orders::CustomerDetailsController.prepend self end
Version data entries
11 entries across 11 versions & 1 rubygems