ADX-968 Bypass auth when checking if fork is synced #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sierra Leone dataset was throwing a 404 not found error / authorization error when trying to simply view it. See the Jira ticket for more details of the bug symptoms.
The bug was caused by ckanext-fork logic:
The proposed solution is to simply bypass auth when checking if a fork is synced with upstream. So that wherever a forked resource exists, it is possible for everyone (not just those with access to the upstream resource) to know if the fork is synced with upstream or not.
Chas and I have discussed and both feel this is ok. But we would value @fulior's thoughts as well. Bypassing auth always feels a little tricksy.
Testing
A regression test is written that simply checks the user can view a resource forked from a private dataset. It breaks without the fix and passes with the fix.
Checklist
Put an
x
in the boxes that apply to this pull request (you can also fill these out after opening the pull request).You may not need to check all boxes.