An extension which enforces private visibility of a dataset until it has been reviewed and approved by an organisation admin.
To install ckanext-datasetapproval:
Note: if you're using ckanext_scheming extension, add new field to the schema configuration YAML file.
- field_name : publishing_status
label : Publishing Status
form_snippet : null
display_snippet : null
validators : ignore_missing
- field_name : chosen_visibility
label : Visibility
form_snippet : visibility.html
display_snippet : null
validators : ignore_empty unicode_safe
default : true
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Clone the source and install it on the virtualenv
git clone https://github.com//ckanext-datasetapproval.git cd ckanext-datasetapproval pip install -e . pip install -r requirements.txt
-
Add
dataset_approvalto theckan.pluginssetting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini). -
Add
ckanext.approval.turn_on_email_notificationsto the config file, to turn on/off review mail (this is set totrueby default)
Note: if you are using a dockerised CKAN environment add this environment variable to your .env fileCKANEXT__APPROVAL__TURN_ON_EMAIL_NOTIFICATIONS=false -
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
- On create/update of a dataset, all editors can save their datasets as in progress to work on datasets without submitting for review.
- Only editors within any given organisation can submit a dataset for review.
Note: All organisation admins are able to create and update datasets without having to submit for review.
- When a dataset is submitted for review, an email is sent to all admins (reviewers) of the specified organisation.
- Users are able to view both their own datasets pending review and any submitted datasets they need to review
An editor can see datasets they have requested for review
An admin can see datasets that they need to review

- To review, an admin of the organisation can choose to approve or reject the dataset
a. on reject they can add a rejection reason

b. user is emailed their review outcome

-
All datasets are enforced private until the dataset is approved. During in progress or on rejection, the dataset will remain private a. this means in progress and rejected datasets are only visible to organisation members
-
At any point (during or after dataset review), an editor can go back into the dataset, make changes, and submit for review again
