Sha256: 6de3e7b9245d89877abdc5a630ebfd0c498b2eac846d35b0851f1e47516f16e4

Contents?: true

Size: 265 Bytes

Versions: 43

Compression:

Stored size: 265 Bytes

Contents

module Ddr
  module Auth
    class AttachmentAbilityDefinitions < AbilityDefinitions

      def call
        can :create, Ddr::Attachment do |obj|
          obj.attached_to.present? && can?(:add_attachment, obj.attached_to)
        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/attachment_ability_definitions.rb
ddr-core-1.6.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.5.5 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.5.4 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.5.2 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.5.3 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.5.1 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.4.4 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.4.3 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.4.2 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.4.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.3.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.2.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.2.0.rc3 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.2.0.rc2 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.2.0.rc1 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.1.2 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.1.1 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.1.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-1.0.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb