No project description provided
Project description
Implentation of ACL for ckan.
When extension enabled, new tab Permissions added to admin interface. Here you can manage user permissions on per-user level.
In order to add new managed permission, one should implement ckanext.acl.interfaces.IACL and define update_permission_list method in plugin and change perm - first positional argument passed into this method. perms is ckanext.acl.access_permissions.AccessPermissions object so you can check available actions there.
- Example of code that you can use in your plugin(will allow any user to create new organization)::
from ckanext.acl.interfaces import IACL
plugins.implements(IACL)
# IACL
- def update_permission_list(self, perms):
perms.create_permission(‘organization_create’)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ckanext-acl-0.1.0.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for ckanext_acl-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a3cfaad6764f918e7e4960abb7773f915e5fea531732faad58593019e0a4d26 |
|
MD5 | fff2fd18e4e6043ce39447c85536e7f2 |
|
BLAKE2b-256 | e092a98359ffbab32181ebfb1ab0ad89b1f8c3c658f57c3d2845cbb2a4f2cda5 |