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

Version Path
padma-assets-0.2.5 app/abilities/general_ability.rb
padma-assets-0.2.4 app/abilities/general_ability.rb
padma-assets-0.2.3 app/abilities/general_ability.rb
padma-assets-0.2.2 app/abilities/general_ability.rb
padma-assets-0.2.1 app/abilities/general_ability.rb
padma-assets-0.2.0 app/abilities/general_ability.rb