Sha256: 5a9d75cd8de987f11087ee9f2c204ae21546e6c6933288ac44d64cde3b2dede1

Contents?: true

Size: 424 Bytes

Versions: 13

Compression:

Stored size: 424 Bytes

Contents

Spree::Admin::Orders::CustomerDetailsController.class_eval do
  before_filter :check_authorization

  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

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
solidus_auth_devise-1.6.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.5.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.4.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
spree_auth_devise-3.1.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
spree_auth_devise-3.0.6 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
spree_auth_devise-3.0.5 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.3.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.2.3 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.2.2 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.2.1 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.2.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.1.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb
solidus_auth_devise-1.0.0 lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb