Warning
This extension is still under development and not ready for production use.
The extension allows you to build a Access Control List (ACL) system within CKAN.
The extension has a 3 default roles: anonymous, authenticated and administrator. And allows you to define custom roles.
The extension provides a way to assign roles to users. Roles could be global and scoped to an organization.
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|---|
| 2.9 and earlier | no |
| 2.10+ | yes |
| 2.11+ | yes |
Using GIT Clone:
-
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/DataShades/ckanext-permissions.git cd ckanext-permissions pip install -e .
-
Add
permissions permissions_managerto theckan.pluginssetting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini). -
Initialize DB tables:
ckan -c /etc/ckan/default/ckan.ini db upgrade -p permissions
-
Initialize default Roles and add Authenticated default role to all existing Users:
ckan -c /etc/ckan/default/ckan.ini permissions assign-default-user-roles
-
Restart CKAN. For example:
sudo supervisorctl restart ckan-uwsgi
TBD
To run the tests, do:
pytest --ckan-ini=test.ini --cov=ckanext.permissions


