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
@stevenwinship stevenwinship self-assigned this Jun 22, 2026
@stevenwinship stevenwinship moved this from Ready for Triage to In Review 🔎 in IQSS Dataverse Project Jun 22, 2026
@stevenwinship stevenwinship added FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) Original size: 3 labels Jun 22, 2026
@stevenwinship

Copy link
Copy Markdown
Contributor

Approving since this guestbook responses are required either for request access or download but not both.

Per the docs:
By default, users are asked to fill out a configured Guestbook when they down download files from a dataset. If enabled for a given Dataverse instance (see XYZ), users may instead be asked to fill out a Guestbook only when they request access to restricted files.

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Jun 22, 2026
@stevenwinship stevenwinship removed their assignment Jun 22, 2026
@stevenwinship stevenwinship added this to the 6.12 milestone Jun 22, 2026
@cmbz cmbz added the FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) Original size: 3

Projects

Status: Ready for QA ⏩

Development

Successfully merging this pull request may close these issues.

3 participants