Sha256: e9b73efddeafa6f8a172a8c12ec42b4aa9c51ac158bc6859a5c6f20943aa59d1
Contents?: true
Size: 374 Bytes
Versions: 6
Compression:
Stored size: 374 Bytes
Contents
class GeneralAbility include CanCan::Ability def initialize(user) if alpha?(user) can :manage, :mailchimp can :manage, :planning end if beta?(user) end end private def alpha?(user) user.account_tester_level == 'alpha' end def beta?(user) tl = user.account_tester_level tl == 'alpha' || tl == 'beta' end end
Version data entries
6 entries across 6 versions & 1 rubygems