Class: Spree::StockReservationAbility

Inherits:
Object
  • Object
show all
Includes:
CanCan::Ability
Defined in:
app/models/spree/stock_reservation_ability.rb

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ StockReservationAbility

Returns a new instance of StockReservationAbility.



5
6
7
8
9
# File 'app/models/spree/stock_reservation_ability.rb', line 5

def initialize(user)
  if user.has_spree_role?('admin')
    can :manage, Spree::ReservedStockItem
  end
end