Skip to content

Commit

Permalink
Merge pull request #1666 from ckan/1666-datastore-perms-check
Browse files Browse the repository at this point in the history
Datapusher extension throws an authorization error which it should have caught
  • Loading branch information
joetsoi committed Jun 26, 2014
2 parents 6b40b6d + 09100ba commit 00413b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ckanext/datapusher/plugin.py
Expand Up @@ -10,6 +10,8 @@
import ckan.model as model
import ckan.plugins.toolkit as toolkit

from ckan.common import _

log = logging.getLogger(__name__)
_get_or_bust = logic.get_or_bust

Expand Down Expand Up @@ -61,6 +63,8 @@ def resource_data(self, id, resource_id):
)
except logic.NotFound:
datapusher_status = {}
except logic.NotAuthorized:
base.abort(401, _('Not authorized to see this page'))

return base.render('package/resource_data.html',
extra_vars={'status': datapusher_status})
Expand Down

0 comments on commit 00413b1

Please sign in to comment.