Skip to content

[DT-4061] Add study registration asset read endpoints - #3056

Open
otchet-broad wants to merge 1 commit into
otchet-dt-4061-study-asset-fieldsfrom
otchet-dt-4061-study-asset-endpoints
Open

[DT-4061] Add study registration asset read endpoints#3056
otchet-broad wants to merge 1 commit into
otchet-dt-4061-study-asset-fieldsfrom
otchet-dt-4061-study-asset-endpoints

Conversation

@otchet-broad

Copy link
Copy Markdown
Contributor

Base: branch 6 · 14 files, +524 · Migration: no · UI impact: none

Adds GET /api/dataset/study/{studyId}/assets/{type} for publications,
models, workspaces, presentations, clinicalTrials,
intellectualProperty, and fundingResources, so the study page can read
one asset list at a time instead of pulling the whole registration payload
and picking keys out of the client-managed assets object.

Each endpoint returns the promoted study_property for that type, falling
back to the legacy assets object for a study whose registration has not
been rewritten since the promotion, and returns an empty list for an absent
or malformed value rather than a server error.

Reads go through verifyStudyVisibilityAccess, so assets on a study that is
not publicly visible are readable only by its creator, its custodians, and
admins.

Purely additive: new read-only endpoints, no migration, no change to any
existing response.

Depends on: branch 6 (the StudyAssets helper) and branch 1
(StudyAssetService calls verifyStudyVisibilityAccess).


Where this sits in the DT-4061 stack

otchet-dt-3990-study-ratings-pi-details was too large to review meaningfully
(95 files, +8168), so it was split into eight PRs. This PR targets otchet-dt-4061-study-asset-fields,
not develop
, so its diff shows only its own work.

# Branch Base
1 otchet-dt-4061-study-visibility-authz develop
1b otchet-dt-4061-study-patch-ownership otchet-dt-4061-study-visibility-authz
2 otchet-dt-4061-study-pi-details otchet-dt-4061-study-visibility-authz
3 otchet-dt-4061-study-comments otchet-dt-4061-study-pi-details
4 otchet-dt-4061-study-dar-metrics otchet-dt-4061-study-comments
5 otchet-dt-4061-study-recommendations otchet-dt-4061-study-dar-metrics
6 otchet-dt-4061-study-asset-fields otchet-dt-4061-study-recommendations
7 otchet-dt-4061-study-asset-endpointsthis PR otchet-dt-4061-study-asset-fields

Branch 1b is a sibling rather than a link in the chain: nothing depends on it,
so it can be held or dropped without blocking the others. Land the numbered
chain in order — merging out of order, or squash-merging, will require rebasing
the descendants.

The split is verified lossless: branch 7 plus 1b reproduces the original branch
exactly, apart from five scripts/verify-study-*.sh helper scripts that were
dropped at the author's request. ./mvnw test-compile passes on each branch
independently.

🤖 Generated with Claude Code

@otchet-broad
otchet-broad marked this pull request as ready for review September 8, 2026 20:56
@otchet-broad
otchet-broad requested a review from a team as a code owner September 8, 2026 20:56
@otchet-broad
otchet-broad requested review from fboulnois and rushtong and removed request for a team September 8, 2026 20:56
Adds GET /api/dataset/study/{studyId}/assets/{type} for publications,
models, workspaces, presentations, clinicalTrials, intellectualProperty,
and fundingResources, so the study page can read one asset list at a time
instead of pulling the whole registration payload and picking keys out of
the client-managed assets object.

Each endpoint returns the promoted study_property for that type, falling
back to the legacy assets object for a study whose registration has not
been rewritten since the promotion, and returns an empty list for an
absent or malformed value rather than a server error.

Reads go through DatasetService#verifyStudyVisibilityAccess, so assets on
a study that is not publicly visible are only readable by its creator, its
custodians, and admins — the same rule the study itself uses.

Purely additive: new read-only endpoints, no migration, and no change to
any existing response.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@otchet-broad
otchet-broad force-pushed the otchet-dt-4061-study-asset-endpoints branch from 4903c06 to 176fac0 Compare September 8, 2026 21:58
@otchet-broad
otchet-broad force-pushed the otchet-dt-4061-study-asset-fields branch from d169eed to cd0fa78 Compare September 8, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant