app/models/hydra/access_controls/embargo.rb in hydra-access-controls-9.5.0 vs app/models/hydra/access_controls/embargo.rb in hydra-access-controls-9.6.0
- old
+ new
@@ -15,9 +15,10 @@
def active?
(embargo_release_date.present? && Date.today < embargo_release_date)
end
+ # Deactivates the embargo and logs a message to the embargo_history property
def deactivate!
return unless embargo_release_date
embargo_state = active? ? "active" : "expired"
embargo_record = embargo_history_message(embargo_state, Date.today, embargo_release_date, visibility_during_embargo, visibility_after_embargo)
self.embargo_release_date = nil