[ckan-dev] package_show draft

Fabrizio Fornari ckanappoggio at gmail.com
Mon Apr 28 17:06:52 UTC 2014


Thank you Vitor!

It seems pretty obvious now, after you told me... I hadn't considered the
authorization stuff because I was used to think that anyone can do
package_show that is actually wrong in particular for packages that are in
the draft status and also for  packages that are set private inside an
organization.


On Mon, Apr 28, 2014 at 6:01 PM, Vitor Baptista <vitor at vitorbaptista.com>wrote:

> Hi Fabrizio,
>
> If a dataset is in draft state, you'll only be able to use "package_show"
> if you're authorized to update it. You're able to see it in your browser
> because you're logged in. If you weren't, you'll get the same result as in
> using wget.
>
> The code relative to this is
> https://github.com/ckan/ckan/blob/master/ckan/logic/auth/get.py#L97-L117
>
> Unfortunately, our docs (
> http://docs.ckan.org/en/latest/api/index.html#ckan.logic.action.get.package_show) doesn't
> explain these authorization rules yet. I created issue #1688 (
> https://github.com/ckan/ckan/issues/1688) to solve it.
>
> Cheers,
>
>
> 2014-04-28 11:48 GMT-03:00 Fabrizio Fornari <ckanappoggio at gmail.com>:
>
>> Hi guys,
>>
>> I encountered an error trying to do package_show of a package which
>> status is draft. Doing package_show (
>> http://mysite/api/3/action/package_show?name_or_id=packagename) from a
>> web browser works but doing it from the console (wget
>> mysite/api/3/action/package_show?name_or_id=packagename) gives me:
>>
>> "HTTP request sent, awaiting response... 403 FOrbidden
>>  ERROR 403: Forbidden."
>>
>> What do you think may be the problem? (This happens only when the package
>> is in draft status)
>>
>> Thank you!
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
>
> 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/>
>
>
> _______________________________________________
> 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/20140428/eb564092/attachment-0003.html>


More information about the ckan-dev mailing list