[ckan-dev] package_show draft

Vitor Baptista vitor at vitorbaptista.com
Mon Apr 28 16:01:52 UTC 2014


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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140428/7c322dad/attachment-0003.html>


More information about the ckan-dev mailing list