Class: GeneralAbility
- Inherits:
-
Object
- Object
- GeneralAbility
- Includes:
- CanCan::Ability
- Defined in:
- app/abilities/general_ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ GeneralAbility
constructor
A new instance of GeneralAbility.
Constructor Details
#initialize(user) ⇒ GeneralAbility
Returns a new instance of GeneralAbility.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/abilities/general_ability.rb', line 4 def initialize(user) cannot :manage, :hubspot if alpha?(user) end if beta?(user) can :manage, :learn_agenda end if in_country?(user,'Argentina') can :manage, :derose_events can :manage, :office_argentina end can :manage, :notion can :manage, :asana_com can :see, :mailchimp if petal_enabled?(user,'mailchimp') can :configure, :mailchimp end end |