Publishing things
In the Catalog the users were allowed to directly publish their data and then had a 24-hrs window during which they could un-publish.
Revised publishing process
Instead of directly publishing datasets to the Internet we will introduce a Review step: when a user clicks Publish that will lock the dataset for editing, but will not make it available to the public.
Dataset metadata in Review state will be reviewed by Genesys Team who will provide feedback on metadata, request for clarifications or modifications, etc.
The dataset owner (and others with permissions) can click Edit when the dataset is in Review state. This action returns the record to Draft state where it can be updated again.
Accept function is available to Genesys Team and with this the dataset goes public, but it can still be "Unpublished” in the 24-hour window.
Updates to backend
This affects datasets, descriptor lists and descriptors:
- Introduce
enum
namedPublishState
with options:DRAFT(0)
,REVIEWING(-1)
andPUBLISHED(1)
with those integers attached. - Rename
private boolean published;
toprivate PublishState state;
. Update liquibase. - Add
state
filter to Filter models of affected entities - Service methods listing published datasets, descriptor lists and descriptors must return data that has
state == PUBLISHED
API actions
- Update API methods
publish***
to change state toREVIEWING
. Available to admins and whoever has permissions. - Add API methods
approve***
to change state fromREVIEWING
toPUBLISHED
. Available tohasRole('ADMINISTRATOR')
only. - Update API methods
edit***
to change state fromREVIEWING
toDRAFT
. Available to admins and whoever has permissions.
Unit tests
Make sure the tests are updated for the 3-state publish status.