Sha256: 9dce3df4941bdd41de0921e0ad610e92287521701d608641cafdb6ce9ee1e209

Contents?: true

Size: 238 Bytes

Versions: 117

Compression:

Stored size: 238 Bytes

Contents

module Ddr
  module Auth
    class ItemAbilityDefinitions < AbilityDefinitions

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

    end
  end
end

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
ddr-models-3.0.6 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.5 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.4 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc6 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc5 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc4 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc3 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc2 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.rc1 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.beta.22 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.beta.21 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-2.4.10 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.beta.20 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-2.4.9 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-3.0.0.beta.18 lib/ddr/auth/ability_definitions/item_ability_definitions.rb
ddr-models-2.4.8 lib/ddr/auth/ability_definitions/item_ability_definitions.rb