Sha256: 54dd4e43cf9eb6bd6f9944a157df301f2cdfd1c2fc2c3b3c109b02a20bf0e106

Contents?: true

Size: 452 Bytes

Versions: 16

Compression:

Stored size: 452 Bytes

Contents

# Wrap core level specific CanCan rules.  Should be included in the main app's
# Ability class.
#------------------------------------------------------------------------------
module DmCore
  module Concerns
    module Ability
      def dm_core_abilities(user)
        if user
          if user.is_admin? || user.has_role?(:manager)
            can :manage, :all
            can :access_admin, :all
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_core-4.2.3.10 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.9 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.8 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.7 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.6 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.5 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.4 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.3 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.2 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3.1 app/models/dm_core/concerns/ability.rb
dm_core-4.2.3 app/models/dm_core/concerns/ability.rb
dm_core-4.2.2.3 app/models/dm_core/concerns/ability.rb
dm_core-4.2.2.2 app/models/dm_core/concerns/ability.rb
dm_core-4.2.2.1 app/models/dm_core/concerns/ability.rb
dm_core-4.2.2 app/models/dm_core/concerns/ability.rb
dm_core-4.2.1.5 app/models/dm_core/concerns/ability.rb