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.17.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.16.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.15.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.14.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.13.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.13.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.13.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.12.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.12.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.12.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.11.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.10.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.9.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.8.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.7.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.6 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.5 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.4 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-core-1.6.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb