Sha256: 38b20d03a8d089a08a1ee364165b470ddb76508c344e4677596c145f3ac52301

Contents?: true

Size: 512 Bytes

Versions: 29

Compression:

Stored size: 512 Bytes

Contents

module CurationConcerns
  class EmbargoActor
    attr_reader :work

    # @param [Hydra::Works::Work] work
    def initialize(work)
      @work = work
    end

    # Update the visibility of the work to match the correct state of the embargo, then clear the embargo date, etc.
    # Saves the embargo and the work
    def destroy
      work.embargo_visibility! # If the embargo has lapsed, update the current visibility.
      work.deactivate_embargo!
      work.embargo.save!
      work.save!
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
curation_concerns-1.0.0.beta1 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.14.0 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.14.0.pre4 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.14.0.pre3 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.14.0.pre2 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.14.0.pre1 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.13.1 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.13.0 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre9 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre8 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre7 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre6 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre5 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre4 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre3 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-0.12.0.pre2 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-models-0.12.0.pre1 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-models-0.11.0 app/actors/curation_concerns/embargo_actor.rb
curation_concerns-models-0.11.0.rc1 app/actors/curation_concerns/embargo_actor.rb