Sha256: 72752654e45a6c5d81e426ffb43a83c9817473e480dcec1565b5bbfd27f4c996

Contents?: true

Size: 591 Bytes

Versions: 20

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Embargoable
    extend ActiveSupport::Concern
    include Hydra::AccessControls::Embargoable

    included do
      validates :lease_expiration_date, 'hydra/future_date': true, on: :create
      validates :embargo_release_date, 'hydra/future_date': true, on: :create
    end

    ##
    # Override aggressive Hydra::AccessControls validation
    def enforce_future_date_for_embargo?
      false
    end

    ##
    # Override aggressive Hydra::AccessControls validation
    def enforce_future_date_for_lease?
      false
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/models/concerns/hyrax/embargoable.rb
hyrax-5.0.0 app/models/concerns/hyrax/embargoable.rb
hyrax-5.0.0.rc3 app/models/concerns/hyrax/embargoable.rb
hyrax-5.0.0.rc2 app/models/concerns/hyrax/embargoable.rb
hyrax-5.0.0.rc1 app/models/concerns/hyrax/embargoable.rb
hyrax-3.6.0 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0.rc3 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0.rc2 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0.rc1 app/models/concerns/hyrax/embargoable.rb
hyrax-3.5.0 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0.beta2 app/models/concerns/hyrax/embargoable.rb
hyrax-3.4.2 app/models/concerns/hyrax/embargoable.rb
hyrax-4.0.0.beta1 app/models/concerns/hyrax/embargoable.rb
hyrax-3.4.1 app/models/concerns/hyrax/embargoable.rb
hyrax-3.4.0 app/models/concerns/hyrax/embargoable.rb
hyrax-3.3.0 app/models/concerns/hyrax/embargoable.rb
hyrax-3.2.0 app/models/concerns/hyrax/embargoable.rb
hyrax-3.1.0 app/models/concerns/hyrax/embargoable.rb
hyrax-3.0.2 app/models/concerns/hyrax/embargoable.rb