Skip to content

CKAN plugin to allow users with 'member' role within an organization to create/edit/delete their own datasets.

Notifications You must be signed in to change notification settings

sedici/ckanext-userdatasets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ckanext-userdatasets

(This is a fork of https://github.com/NaturalHistoryMuseum/ckanext-userdatasets, and was merged with the PR NaturalHistoryMuseum#2 from https://github.com/hbunke/ckanext-userdatasets/tree/edawax)

Overview

A CKAN extension to allow organization members to create datasets, and edit or delete the datasets they have created.

This extension changes the permissions of users with the 'Member' role in an organization allowing them to create datasets, and to edit or delete the datasets they have created. Unlike users with the 'Editor' role, they cannot edit or delete datasets created by other users.

Notes:

  • This applies to the existing 'Member' role rather than creating a new one as it is currently not possible to add new roles from an extension;
  • The plugin works with custom dataset types, however it will not work with other plugins which override package/resource update/create/delete authorization functions, and package_create/update actions.

Warning: This plugin modifies CKAN's permission system. The current implementation cannot be considered fully safe and should only be used AT YOUR OWN RISK in a trusted environment. Ensure you run the tests with your plugins enabled.

Compatibility

  • v0.1 for CKAN 2.2

Configuration

The following configuration directives are available:

  • userdatasets.default_auth_module: The name of the module that holds the default implementation of the auth functions. Only change this if you know what you are doing! Defaults to ckan.logic.auth
  • userdatasets.default_action_module: The name of the module that holds the default implementation of the action functions. Only change this if you know what you are doing! Defaults to ckan.logic.actin

Usage

  1. Install the package in your ckan virtual environment:
    pip install git+https://github.com/NaturalHistoryMuseum/ckanext-userdatasets#egg=ckanext-userdatasets
  1. Add userdatasets to ckan.plugins in your configuration file.

Testing

The plugin contains both unit tests and functional tests. From the source directory, run:

    nosetests --ckan --with-pylons=test.ini ckanext/userdatasets/tests

This assumes that ckan's test.ini is in ../ckan/test.ini. Adjust accordingly.

About

CKAN plugin to allow users with 'member' role within an organization to create/edit/delete their own datasets.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%