thehyve/ckanext-configpermission

Name: ckanext-configpermission

Owner: The Hyve

Description: A CKAN extension for managing permissions

Created: 2017-06-06 08:57:20.0

Updated: 2018-04-24 11:29:00.0

Pushed: 2017-12-04 15:20:40.0

Homepage:

Size: 172

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README


ckanext-configpermission

Adds a way for sysadmins to configure CKAN permissions via a web interface and create new organization roles.


Requirements

Tested on CKAN 2.5


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-configpermission:

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

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

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

    pip install ckanext-configpermission

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

  4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::

    sudo service apache2 reload

  5. Run database init

    paster –plugin=ckanext-configpermission init -c /etc/ckan/default/production.ini

  6. Create default data

    paster –plugin=ckanext-configpermission defaultdata -c /etc/ckan/default/production.ini

  7. Configure Permission settings on the sysadmin page.


Config Settings

Select the permissions to be managed in the ckan configuration file. Like so

ckan.configpermission.permissions = package_show member_delete group_create resource_update package_show resource_show

Development Installation

To install ckanext-configpermission for development, activate your CKAN virtualenv and do::

git clone https://github.com/thehyve/ckanext-configpermission.git
cd ckanext-configpermission
python setup.py develop
pip install -r dev-requirements.txt

Running the Tests

To run the tests, do::

nosetests --paster=ckanext-configpermission --nologcapture --with-pylons=test.ini -c /etc/ckan/default/production.ini

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.