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.0.tar.gz (34.4 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.0-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ckanext_permissions-0.3.0.tar.gz
  • Upload date:
  • Size: 34.4 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.0.tar.gz
Algorithm Hash digest
SHA256 52e95c4142f30435028a3ee6758be708c7c2b41e81154304aaac8806fc81bdae
MD5 a1c39a919dcc370c18c5e2c2efc94bca
BLAKE2b-256 7d93be77a49da880e884a24732d143fc4aade42455250830f96ef3fece42bdc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ckanext_permissions-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ffcbb48781324d5054aca341bd0d92c282285b2c2288056e38e9df9ebbd2364
MD5 1508bd9910f6498d1a86815014cd82a1
BLAKE2b-256 f8f1f4519a3df58f8204b39b796e6a71be137af5646f83d75822379c75eef462

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