Sha256: 44b99e056bf63a3af817ba1eff57fe9b67663bb8404dd55c5594cc568d55d6a1

Contents?: true

Size: 435 Bytes

Versions: 12

Compression:

Stored size: 435 Bytes

Contents

module Spina
  class Ability
    include CanCan::Ability

    def initialize(user)
      if user.admin?
        can :manage, :all
      else
        can :manage, Page
        can :manage, Photo
        can :manage, Attachment
        can :manage, Account
        can :manage, Inquiry

        # Engine.config.plugins.each do |plugin|
        #   can :manage, "#{plugin.class_name}".constantize
        # end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spina-0.7.3 app/models/spina/ability.rb
spina-0.7.2 app/models/spina/ability.rb
spina-0.7.0 app/models/spina/ability.rb
spina-0.6.29 app/models/spina/ability.rb
spina-0.6.28 app/models/spina/ability.rb
spina-0.6.27 app/models/spina/ability.rb
spina-0.6.26 app/models/spina/ability.rb
spina-0.6.25 app/models/spina/ability.rb
spina-0.6.24 app/models/spina/ability.rb
spina-0.6.23 app/models/spina/ability.rb
spina-0.6.22 app/models/spina/ability.rb
spina-0.6.21 app/models/spina/ability.rb