Fix File Download API when Guestbook at request is true#12474
Open
qqmyers wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does / why we need it: #12110 changed the GET /api/access/datafile/{id} and related to require submission of a guestbook response id when a guestbook is enabled on the dataset. This breaks the API calls when guestbook-at-request is true for a dataset - they return an incorrect 400 response.
Which issue(s) this PR closes:
Special notes for your reviewer: This PR just adds a check to not require a gbrids check if GB at request is true. One could argue that a gbrids could still be required but
Suggestions on how to test this: Manually one can publish a restricted file, in a dataset with a guestbook and gb at request on, and then try a previewer on it. The separate page preview view will fail with a 400 response on the file access request before this PR.
I would have expected this test to be for this case, but it appears to require another guestbook response to be entered at download as well - seems like accepting a gb response in a download request should also fail when gb at request is true (another bug/aspect of this bug).
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: