Class: Hyrax::Embargo
- Inherits:
-
Valkyrie::Resource
- Object
- Valkyrie::Resource
- Hyrax::Embargo
- Defined in:
- app/models/hyrax/embargo.rb
Overview
Note:
Embargo and Lease can, in principle, be collapsed into a single model with a #visibility_during, #visibility_after, #end_date, and #history. We haven’t made this transition in order to simplify legacy support for Hydra::AccessControls.
The Valkyrie model for embargoes.
Instance Method Summary collapse
-
#active? ⇒ Boolean
Fix releasing embargos on the day they are expired - this solves a 1 second bug around how midnights are calculated, which causes day of embargos to incorrectly set the permissions to private.
Instance Method Details
#active? ⇒ Boolean
Fix releasing embargos on the day they are expired - this solves a 1 second bug around how midnights are calculated, which causes day of embargos to incorrectly set the permissions to private
19 20 21 |
# File 'app/models/hyrax/embargo.rb', line 19 def active? (.present? && Date.yesterday.end_of_day < ) end |