Extension Protected Resources


Extension Basics

Title
Protected Resources
Name
ckanext-protected_resources
Type
Public extension
Description
Allows system administrators to protect dataset resources from accidental deletion. Protected resources and their parent datasets cannot be deleted.
CKAN versions
Download-Url (zip)
Last commit
2 years ago (2024-03-02 22:45:12)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

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:

  1. Activate your CKAN virtual environment:

    . /usr/lib/ckan/default/bin/activate

  2. Install the ckanext-protected_resources Python package:

    pip install ckanext-protected_resources

  3. Add protected_resources to the ckan.plugins setting in your CKAN config file.

  4. 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
    
  5. Restart CKAN.

License

AGPL-3.0

Version
1.1.0
Version release date
2024-03-02
Contact name
Ersin Buckley
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Add ‘protected_resources’ to ckan.plugins. Run setup-protected-resources CLI command to create DB table.

Plugins to configure (ckan.ini)
protected_resources
CKAN Settings (ckan.ini)
# No specific environment variables documented
DB migration to be executed
protected-resources setup-protected-resources
<< back to Extensions