[ckan-dev] Authorisation - making datasets public

Rodrigo Parra rodpar07 at gmail.com
Wed May 28 13:48:35 UTC 2014


Hi Aaron,

I came across the same issue in the past week, I also needed making
datasets public to be an admin-only feature.
Currently, I think both editors and admins of an organization can create
public datasets. So I've implemented a this feature as part of a CKAN
extension I'm developing.

What I did was:

   - Remove the visibility select field from the dataset form. (for all
   users but the sysadmin).
   - Create all datasets as private (except if the dataset was created by
   the sysadmin, in which case the chosen visibility is used).
   - Show the visibility select field in the dataset edit form if the user
   is an organization admin (or the sysadmin).

So basically, users create private datasets and admins "approve and
publish" the datasets ("Manage" -> set visibility to public).
This is the github commit that includes these changes:
 https://github.com/rparrapy/ckanext-datospy/commit/92fa82141d62e96040322a7e06985a97774f5774<https://github.com/rparrapy/ckanext-datospy/commit/92fa82141d62e96040322a7e06985a97774f5774>


And here's a link to some documentation I've written about it:
http://datosparaguay.org/xwiki/bin/view/herramientas/ckan_autorizacion
I'm sorry but:

   - It is in spanish. Google translated version here: http://goo.gl/1dGsJ9
   - It references some documents that might not be publicly available yet.


Hope this helps. Regards,
Rodrigo


2014-05-27 21:10 GMT-04:00 Aaron McGlinchy <
McGlinchyA at landcareresearch.co.nz>:

> Hi,
>     Documentation for CKAN 2.2.
> http://docs.ckan.org/en/ckan-2.2/user-guide.html#users-organizations-and-authorization
>
> States "In the default setup, this dataset is initially private, and
> visible only to other users in the same organization. When it is ready for
> publication, it can be published at the press of a button. This may require
> a higher authorization level within the organization."
>
> Suggesting there may be some differentiation in what roles can make a
> dataset public.
>
> This documentation (for CKAN 2.3?) is more explicit
> http://docs.ckan.org/en/latest/maintaining/authorization.html
>
> "An organization admin can:
> ...
> - Make datasets public or private.
> ..."
>
> And this is the only role with that ability listed.
>
> In our install of CKAN 2.2 a user with role editor is able to create a
> dataset and make it public or private, they can also switch datasets that
> another user uploaded from private to public.  Is there a setting that can
> limit the ability to make datasets public to only admin users? And/or is
> this something that is coming in 2.3?
>
> Thanks
> Aaron
>
> ________________________________
>
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is
> confidential. If you receive it in error: (i) you must not read, use,
> disclose, copy or retain it; (ii) please contact the sender immediately by
> reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare Research
> New Zealand Limited. http://www.landcareresearch.co.nz
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140528/b051e201/attachment-0003.html>


More information about the ckan-dev mailing list