Sha256: 7f82895e5dfc94f8c8fce7335b63bab262f81db80ea8d8071461857dbefbd7be

Contents?: true

Size: 251 Bytes

Versions: 43

Compression:

Stored size: 251 Bytes

Contents

module Ddr
  module Auth
    class ComponentAbilityDefinitions < AbilityDefinitions

      def call
        can :create, Ddr::Component 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/component_ability_definitions.rb
ddr-core-1.16.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.15.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.14.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.13.2 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.13.1 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.13.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.12.2 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.12.1 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.12.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.11.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.10.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.9.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.8.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.7.0 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.6.6 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.6.5 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.6.4 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.6.3 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-core-1.6.2 lib/ddr/auth/ability_definitions/component_ability_definitions.rb