Moving the embargo setting to the upload level, tied to the embargo_length
Moving the embargo setting to the upload level, controlled using the embargo_length attribute, 0 meaning no embargo.
The idea is that henceforth one should never fiddle with the with_embargo
flags on the entry level, and the embargo_length
attribute on the Upload level should be set/changed only using the following methods:
- at creation of a new upload
- Using Upload.set_upload_metadata (@process or local method) or the corresponding fastapi endpoint
- when publishing (@process + REST endpoints)
- when publishing to central nomad (@process + REST endpoints)
- when importing a bundle (@process + REST endpoints)
- through certain CLI commands, all internally invoking Upload.set_upload_metadata. Commands affected so far: chown, lift-embargo (command for automatically lifting embargo when the embargo period is over)
The attribute embargo_length
is from now on required on Upload (i.e. can't be None) and is 0 by default.
Removed:
- The possibility to lift the embargo through the flask api (nomad.app.flask.api.repo.EditRepoCalcsResource)
- the possibility to set the embargo flag through user metadata files
- the cli command nomad.cli.admin.uploads.edit, as it does not do anything very useful