From 0c0f19f9353c5da86415b83a8fa575f778b457d2 Mon Sep 17 00:00:00 2001 From: tobes Date: Mon, 4 Mar 2013 10:00:39 +0000 Subject: [PATCH] [#369] updating packages to deleted state had permission issues This causes the v1/2 REST package update API to fail with access denied because after successfully updating the package, the user no longer has permission to read it to generate the dict-like response. Just allow us to read the updated packeage --- ckan/logic/action/update.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index c5d8e605f46..6836fd378b1 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -286,6 +286,8 @@ def package_update(context, data_dict): return_id_only = context.get('return_id_only', False) + # we could update the dataset so we should still be able to read it. + context['ignore_auth'] = True output = data_dict['id'] if return_id_only \ else _get_action('package_show')(context, {'id': data_dict['id']})