app/services/hyrax/lease_manager.rb in hyrax-3.4.2 vs app/services/hyrax/lease_manager.rb in hyrax-3.5.0
- old
+ new
@@ -88,9 +88,18 @@
def lease
resource.lease || Lease.new
end
##
+ # Drop the lease by setting its release date to `nil`.
+ #
+ # @return [void]
+ def nullify
+ return unless under_lease?
+ lease.lease_expiration_date = nil
+ end
+
+ ##
# @return [Boolean]
def release
return false if under_lease?
return true if lease.visibility_after_lease.nil?