Skip to main content

Permission system for CKAN

Project description

Tests

ckanext-permissions

[!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.

acl.png

Roles

The extension has a 3 default roles: anonymous, authenticated and administrator. And allows you to define custom roles.

roles.png

Assigning roles to users

The extension provides a way to assign roles to users. Roles could be global and scoped to an organization.

role-assignment.png

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.9 and earlier no
2.10+ yes
2.11+ yes

Installation

Using GIT Clone:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate
    
  2. Clone the source and install it on the virtualenv:

    git clone https://github.com/DataShades/ckanext-permissions.git
    cd ckanext-permissions
    pip install -e .
    
  3. Add permissions permissions_manager to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  4. Initialize DB tables:

    ckan -c /etc/ckan/default/ckan.ini db upgrade -p permissions
    
  5. Initialize default Roles and add Authenticated default role to all existing Users:

    ckan -c /etc/ckan/default/ckan.ini permissions assign-default-user-roles
    
  6. Restart CKAN. For example:

    sudo supervisorctl restart ckan-uwsgi
    

Config settings

TBD

Tests

To run the tests, do:

pytest --ckan-ini=test.ini --cov=ckanext.permissions

License

AGPL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext_permissions-0.3.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_permissions-0.3.1-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file ckanext_permissions-0.3.1.tar.gz.

File metadata

  • Download URL: ckanext_permissions-0.3.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ckanext_permissions-0.3.1.tar.gz
Algorithm Hash digest
SHA256 52ce9edf129195e3c7b2ccc83aef1f840376781dd7cbb178d0884da55d7425b1
MD5 65ed270c81fc49a49f1ec028b7bd7ce7
BLAKE2b-256 9d8c44f823828cba8e42ec9adc715e657b25baffdc97934209b017a53afa2a25

See more details on using hashes here.

File details

Details for the file ckanext_permissions-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_permissions-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22815a02930827d0218157de912d4ea911ed63b5b8fc9480b39d56f2406690f9
MD5 d6e7f1e8f8a0e61a1255d6964dce66d8
BLAKE2b-256 053e7272a7f5ec8807baef0ee4132cdea555c33d13d3edfcc84ab77fad4dcf20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page