Sha256: f1c692986b9e1c5443c8382c526e755327ebc60cc12117c6aeab6afb34cbd589

Contents?: true

Size: 248 Bytes

Versions: 117

Compression:

Stored size: 248 Bytes

Contents

module Ddr
  module Auth
    class ComponentAbilityDefinitions < AbilityDefinitions

      def call
        can :create, ::Component 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.0.beta.17 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.16 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.15 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.14 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.13 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.12 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.11 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.7 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.6 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.5 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.10 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.9 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.8 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.7 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.4 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.6 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.3 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.2 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-3.0.0.beta.4 lib/ddr/auth/ability_definitions/component_ability_definitions.rb
ddr-models-2.4.1 lib/ddr/auth/ability_definitions/component_ability_definitions.rb