Class: Spree::TestingSupport::AuthorizationHelpers::Request::BarAbility
- Inherits:
-
Object
- Object
- Spree::TestingSupport::AuthorizationHelpers::Request::BarAbility
- Includes:
- CanCan::Ability
- Defined in:
- lib/spree/testing_support/authorization_helpers.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ BarAbility
constructor
A new instance of BarAbility.
Constructor Details
#initialize(user) ⇒ BarAbility
Returns a new instance of BarAbility.
16 17 18 19 20 21 |
# File 'lib/spree/testing_support/authorization_helpers.rb', line 16 def initialize(user) # allow dispatch to :admin, :index, and :edit on Spree::Order can [:admin, :edit, :index, :read], Spree::Order # allow dispatch to :index, :show, :create and :update shipments on the admin can [:admin, :manage, :read, :ship], Spree::Shipment end |