Skip to content

Fix File Download API when Guestbook at request is true#12474

Open
qqmyers wants to merge 1 commit into
IQSS:developfrom
QualitativeDataRepository:GbAtRequestFix
Open

Fix File Download API when Guestbook at request is true#12474
qqmyers wants to merge 1 commit into
IQSS:developfrom
QualitativeDataRepository:GbAtRequestFix

Conversation

@qqmyers

@qqmyers qqmyers commented Jun 17, 2026

Copy link
Copy Markdown
Member

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:

  • 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

  • while /api/access/datafile/{id}/requestAccess now accepts a gb response, it does not return the id
  • presumably requestAccess would have failed/access not granted if the gb response doesn't exist
  • the time-based check would have to be revised as the access request could have been far in the past

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:

@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for Triage

Development

Successfully merging this pull request may close these issues.

1 participant