[ckan-dev] Blocking read access on API for anonymous users

Stefan Oderbolz stefan.oderbolz at liip.ch
Tue Feb 13 15:42:12 UTC 2018


Hi

you are probably looking for the IPermissionLabel interface (
http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IPermissionLabels),
which allows to customize what datasets a user can see/access.
You can find an example in the ckanext/example_ipermissionlabels directory
of the repository:
https://github.com/ckan/ckan/tree/master/ckanext/example_ipermissionlabels

Hope this helps.

- Stefan

On Tue, Feb 6, 2018 at 11:47 PM, Chun Chow <chchow at lbl.gov> wrote:

> Hi everyone,
>
> I keep seeing these references to disallowing API read access for
> anonymous users, i.e. always requiring an API key when accessing through
> the API.
>
> For example, "Depending on the authorization settings of the CKAN
> instance, a user may need to authenticate themselves for all operations
> including read. However, by default, CKAN allows anonymous read access and
> this setup is assumed for the API usage examples.”
>
> However, I can’t find which config option to change to implement this. Can
> y’all point me to where that is?
>
> Many thanks,
> Chun Ho
> _______________________________________________
> 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
>



-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20180213/a43a0e99/attachment-0003.html>


More information about the ckan-dev mailing list