Class: SpreeCmCommissioner::CheckInAbility
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::CheckInAbility
- Includes:
- CanCan::Ability
- Defined in:
- app/models/spree_cm_commissioner/check_in_ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ CheckInAbility
constructor
A new instance of CheckInAbility.
Constructor Details
#initialize(user) ⇒ CheckInAbility
Returns a new instance of CheckInAbility.
5 6 7 8 9 10 11 12 13 14 |
# File 'app/models/spree_cm_commissioner/check_in_ability.rb', line 5 def initialize(user) if user.has_spree_role?('operator') can :manage, CheckIn elsif user.has_spree_role?('organizer') can :manage, CheckIn can :manage, Guest else cannot :manage, CheckIn end end |