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-0.3.0 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-0.2.2 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb
ddr-core-0.2.1 lib/ddr/auth/ability_definitions/attachment_ability_definitions.rb