Class: Spina::Ability
- Inherits:
-
Object
- Object
- Spina::Ability
- Includes:
- CanCan::Ability
- Defined in:
- app/models/spina/ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ Ability
constructor
A new instance of Ability.
Constructor Details
#initialize(user) ⇒ Ability
Returns a new instance of Ability.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/models/spina/ability.rb', line 5 def initialize(user) if user.admin? can :manage, :all else can :manage, Page can :manage, Photo can :manage, Attachment can :manage, Account # Spina.config.plugins.each do |plugin| # can :manage, "#{plugin.class_name}".constantize # end end end |