[ckan-changes] [ckan/ckan] 7dcb2f: [#1500] Mock pylons context object on paster comma...
GitHub
noreply at github.com
Fri Feb 28 13:22:35 UTC 2014
Branch: refs/heads/1500-mock-web-request-on-paster-commands
Home: https://github.com/ckan/ckan
Commit: 7dcb2f14f98b85f7039ce17aa965ff8d61e99756
https://github.com/ckan/ckan/commit/7dcb2f14f98b85f7039ce17aa965ff8d61e99756
Author: amercader <amercadero at gmail.com>
Date: 2014-02-28 (Fri, 28 Feb 2014)
Changed paths:
M ckan/lib/cli.py
Log Message:
-----------
[#1500] Mock pylons context object on paster commands
When calling a paster command, we create and register a Pylons context
object (c), and add to site user to it (c.user and c.auth_user_object).
This ensures that the auth will work in exactly the same way as in a web
request. Otherwise you can find problems like the harvest and DataPusher
incompatibility.
We already did a similar thing registering a MockTranslator for the
thread.
More information about the ckan-changes
mailing list