-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi there,
We're using a fork of ckanext-restricted, thanks for the good work in preparing the repo.
I'm puzzled by the following line:
| authorized = auth.restricted_resource_show( |
Can you give some further info on it's purpose? The output of the line appears to be ignored by the code. Removing the line doesn't break any tests, and at the moment I haven't been able to see that it has any impact on the UI or api requests.
Is it's job to raise some exceptions? I can see that during execution of this line check_access is called for the "package_show" action on the resource's parent pacakge, however, any exceptions raised by this are not caught which seems slightly odd to me - I wouldn't want someone to be unauthorised to view all their search results just because they don't have access to view one of their search results.
...maybe I'm missing something obvious!
We're having problems with ckanext-requests slowing down package_search requests. By my reckoning this line is slowing down package_search requests by a factor >4x what it is without the line, so I want to be clear on why it is there.
Jonathan Berry
fjelltopp.org