[ckan-dev] How to know if a resource is private

Vitor Baptista vitor at vitorbaptista.com
Thu Aug 8 21:11:06 UTC 2013


Hi Dominik,

As far as I know, you would have to get the resource's package id using
Resource.get_package_id(), get the package, and then check if it's private
or not. Not sure if there's a smarter way to do it. If not, might be useful
to add a Resource.get_package() method.

Cheers,

Vítor Baptista

Developer  |  http://vitorbaptista.com |
LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
@vitorbaptista <http://twitter.com/vitorbaptista>

The Open Knowledge Foundation <http://okfn.org>

*Empowering through Open Knowledge*

http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter/>



2013/8/8 Dominik Moritz <dominik.moritz at okfn.org>

> Hey everybody,
>
> I need to know whether a resource is private or not. The problem is that
> this is a property of a package (dataset) and not a resource. Is there a
> way to either know whether a resource is part of a private package or to
> which package a resource belongs to?
>
> Cheers,
> Dominik
>
>
> Dominik Moritz
> CKAN developer  |  skype: d.moritz  |  @doobly_doo
> The Open Knowledge Foundation
> Empowering through Open Knowledge
> http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130808/d82829da/attachment-0001.html>


More information about the ckan-dev mailing list