okfn/ckan — pull request #1221 by kindly (2013-09-30 10:59:13+00:00)
Title: Preview fails on private datastore resources

When trying to preview a resource that belongs to a private dataset, the loading animation goes on forever. The request to `datastore_search` confusingly returns a 409. After some digging, it seems to be raised here:

https://github.com/okfn/ckan/blob/master/ckanext/datastore/db.py#L1126

Basically the user has no permission over the table. If that's the case, a better exception should be shown in the frontend.

(I would expect that logged in users could access the datastore resource but that's another matter)