Skip to content

Commit

Permalink
[#369] updating packages to deleted state had permission issues
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tobes committed Mar 4, 2013
1 parent 15c23b2 commit 0d67c12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/logic/action/update.py
Expand Up @@ -288,6 +288,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']})

Expand Down

0 comments on commit 0d67c12

Please sign in to comment.