===================
ckanext-userautoadd
CKAN plugin to add new users to an existing organization automatically.
This plugin implements the user_create action to add users to an existing
organization with a given role (both specified in the configuration - See Config
Settings below).
Requirements
Tested with CKAN v2.5.2
Installation
To install ckanext-userautoadd:
Activate your CKAN virtual environment, for example::
. /usr/lib/ckan/default/bin/activate
Install the ckanext-userautoadd Python package into your virtual environment::
pip install ckanext-userautoadd
Add userautoadd to the ckan.plugins setting in your CKAN
config file (by default the config file is located at
/etc/ckan/default/production.ini).
Restart CKAN. For example if you’ve deployed CKAN with Apache on Ubuntu::
sudo service apache2 reload
Config Settings
::
# The organization to which new users are added
ckan.userautoadd.organization_name = my_organization
# The role the new users will have
ckan.userautoadd.organization_role = editor
Development Installation
To install ckanext-userautoadd for development, activate your CKAN virtualenv and
do::
git clone https://github.com/aptivate/ckanext-userautoadd.git
cd ckanext-userautoadd
python setup.py develop
pip install -r dev-requirements.txt
Running the Tests
To run the tests, do::
nosetests --nologcapture --with-pylons=test.ini
To run the tests and produce a coverage report, first make sure you have
coverage installed in your virtualenv (pip install coverage) then run::
nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.userautoadd --cover-inclusive --cover-erase --cover-tests