Sha256: 1a1f9c818c908d4e78124a2c8722865d3e175e3b7054d47302496fb8baed4533

Contents?: true

Size: 241 Bytes

Versions: 43

Compression:

Stored size: 241 Bytes

Contents

module Ddr
  module Auth
    class ItemAbilityDefinitions < AbilityDefinitions

      def call
        can :create, Ddr::Item do |obj|
          obj.parent.present? && can?(:add_children, obj.parent)
        end
      end

    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ddr-core-1.6.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.5.5 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.5.4 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.5.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.5.3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.5.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.4.4 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.4.3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.4.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.4.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.3.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.2.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.2.0.rc3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.2.0.rc2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.2.0.rc1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.1.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.1.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.1.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.0.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb