Sha256: 87b4fb384bdb1b813c428fb7134633317829910b2a427927ad0586979de4bee4

Contents?: true

Size: 382 Bytes

Versions: 32

Compression:

Stored size: 382 Bytes

Contents

module Ddr
  module Auth
    class EmbargoAbilityDefinitions < AbilityDefinitions

      def call
        cannot :read, [::SolrDocument, Ddr::Resource] do |obj|
          obj.embargoed? && cannot?(:update, obj)
        end

        cannot :download, [::SolrDocument, Ddr::Resource] do |obj|
          obj.embargoed? && cannot?(:update, obj)
        end

      end

    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ddr-core-1.17.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.16.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.15.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.14.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.13.2 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.13.1 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.13.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.12.2 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.12.1 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.12.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.11.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.10.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.9.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.8.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.7.0 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.6.6 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.6.5 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.6.4 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.6.3 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb
ddr-core-1.6.2 lib/ddr/auth/ability_definitions/embargo_ability_definitions.rb