Background and strategic fit
Our purpose is to open up the information about resources but not necessarily the data or physical resource (e.g. excel sheet with collected data or report). So in case a person wants to add dataset metadata and still upload or provide a link to his/er data but to a limited number of people, this extension will support this action. So on the data and resource page (stage 2 of creating a catalog entry), one can define the accessibility to that resource (public, logged-in users, same organization, individual users)
Installations and Requirements
To install ckanext-restricted on a production site:
Activate your CKAN virtual environment, for example:
ENV /usr/lib/ckan/default/bin/activate
Install the ckanext-restricted Python package into your virtual environment:
pip install ckanext-restricted // or pip install -e git+https://github.com/EnviDat/ckanext-restricted#egg=ckanext-restricted
Add
restricted
to theckan.plugins
setting in your CKAN config file.Restart CKAN. For example, if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
User interaction and design
The resource access restriction level can be individualy defined for every package. This requires adding an extra field to package metadata with (some of) the possible values: "public", "registered", "any_organization", "same_organization" (as the package).
The allowed user list is also defined in an additional field that includes autocomplete.
If you use ckanext-scheming and ckanext-composite, this is the field definition in JSON:
Questions and Answers
Below is a list of Q&A from user sides:
Question | Answers |
---|---|
1. Can one define a different restricted level or group? | Yes, this can be defined in the corresponding schema file. |