Extension Protected Resources


Extension Basics

Title
Protected Resources
Name
ckanext-protected_resources
Type
Public extension
Description
A plugin for CKAN that enables a system administrator to protect dataset resources from accidental deletion
CKAN versions
Download-Url (zip)
Last commit
a year ago (2024-03-02 21:45:12)
Url to repo
Category
Specialized Tools


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 allwed 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 it’s description/data updated

CKAN < 2.9 support

As of 1.1.0 this extention has been made to work with CKAN 2.9. While attempts have been made to maintain compatibility with prior version of CKAN, there may be issues. If any issues are discovered we are happy to accept PRs. Alternatively for compatibility <2.9 the 1.0.0 tag can be used


Requirements

  1. Tested and developed for CKAN 2.9.

Installation

.. Add any additional install steps to the list below. For example installing any non-Python dependencies or adding any required config settings.

To install ckanext-protected_resources:

  1. Activate your CKAN virtual environment, for example::

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

  2. Install the ckanext-protected_resources Python package into your virtual environment::

    pip install ckanext-protected_resources

  3. Add protected_resources to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

  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 pql –set ON_ERROR_STOP=1

    # ckan < 2.9 paster –plugin=ckanext-protected_resources admin setup-protected-resources | \ sudo -u postgres pql –set ON_ERROR_STOP=1

  5. Restart CKAN. For example if you’

Version
0.1.0
Version release date
2018-07-25
Contact name
data.govt.nz - Discover and use data
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints
Plugins to configure (ckan.ini)
protected_resources
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions