The Access system field could be made to rely strictly on the API "access.embargo.active" to know if an embargo is active or not and use booleans + strings from then on for the "embargo" subfield. If "access.embargo" == {} or "access.embargo" doesn't even exist, then the in memory system field can be an Access object with self.active = False (see https://en.wikipedia.org/wiki/Null_object_pattern) and on disk we can omit to save "access.embargo" completely. When reading from disk the same rules would apply.
In particular this works with the simplifying premise of disregarding "embargo.until" the moment "embargo.active" is false.
In order to get things moving, we merged https://github.com/inveniosoftware/invenio-rdm-records/pull/396, but it potentially introduces enough rope to hang ourselves via allowing to save
"access.embargo.active"
asnull
on disk.The Access system field could be made to rely strictly on the API
"access.embargo.active"
to know if an embargo is active or not and use booleans + strings from then on for the"embargo"
subfield. If"access.embargo" == {}
or"access.embargo"
doesn't even exist, then the in memory system field can be anAccess
object withself.active = False
(see https://en.wikipedia.org/wiki/Null_object_pattern) and on disk we can omit to save"access.embargo"
completely. When reading from disk the same rules would apply.In particular this works with the simplifying premise of disregarding
"embargo.until"
the moment"embargo.active"
is false.