ckanext-protected_resources
protected_resources is a simple plugin for allowing system administrators the capability to stop deletes from happening.
- When a resource is protected, all users will not be allowed to delete the resource
- A dataset with a protected resource will not be able to be deleted
- Only a sysadmin can update the protected status of a resource
- A protected resource can still have its description/data updated
CKAN < 2.9 support
As of 1.1.0 this extension has been made to work with CKAN 2.9. While attempts have been made to maintain compatibility with prior versions of CKAN, there may be issues. For compatibility <2.9 the 1.0.0 tag can be used.
Requirements
Tested and developed for CKAN 2.9.
Installation
To install ckanext-protected_resources:
Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-protected_resources Python package:
pip install ckanext-protected_resources
Add protected_resources to the ckan.plugins setting in your CKAN config file.
Add the resource_protected table to your ckan database:
# ckan >= 2.9
ckan -c /PATH_TO_YOUR_INI_FILE/FILENAME.ini protected-resources setup-protected-resources | sudo -u postgres psql --set ON_ERROR_STOP=1
# ckan < 2.9
paster --plugin=ckanext-protected_resources admin setup-protected-resources | sudo -u postgres psql --set ON_ERROR_STOP=1
Restart CKAN.
License
AGPL-3.0