[ckan-dev] Problem (or misunderstanding?) with package_show authorization logic

michail alexakis drmalex07 at gmail.com
Fri Nov 14 20:16:58 UTC 2014


Hello everybody,

I came across a strange behavior, while trying to implement a custom
workflow based on package state.

I created some package which (because some conditions where met) entered in
a custom state (not `active` or `draft`).
This was intentional, because the newly created package had to follow a
non-trivial flow (e.g. some moderation).

I realized that the creator of the package failed to re-read the package he
had just created.
Digging into it (actually into ckan.logic.auth.get.py), i found that
packages that (a) fall into a custom state and (b) do not
belong to any organization are always failing to provide read access.

I have created a Gist to help anyone interested to re-produce this issue:
https://gist.github.com/drmalex07/b395b2671ac4f5afda34
A corresponding Pull request is also created (
https://github.com/ckan/ckan/pull/2051) with a proposed solution (if, of
course, this is considered a problem)


Best regards,
Michail Alexakis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141114/03a89c51/attachment-0002.html>


More information about the ckan-dev mailing list