Skip to content

Moving the embargo setting to the upload level, tied to the embargo_length

David Sikter requested to merge refactor-embargo into v1.0.0

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:

  1. at creation of a new upload
  2. Using Upload.set_upload_metadata (@process or local method) or the corresponding fastapi endpoint
  3. when publishing (@process + REST endpoints)
  4. when publishing to central nomad (@process + REST endpoints)
  5. when importing a bundle (@process + REST endpoints)
  6. 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

Merge request reports