Skip to content

fix: hca-dcp matrices tab honours project access gating (#4858)#4859

Merged
NoopDog merged 1 commit into
mainfrom
fran/4858-hca-dcp-matrices-access-required-warning
Jun 4, 2026
Merged

fix: hca-dcp matrices tab honours project access gating (#4858)#4859
NoopDog merged 1 commit into
mainfrom
fran/4858-hca-dcp-matrices-access-required-warning

Conversation

@frano-m

@frano-m frano-m commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Matrices tab on hca-dcp project detail pages now applies the same access-required guard already used by Download / Export / Metadata: the PROJECT_ACCESS_WARNING alert renders when the user lacks project access, and the matrix list is not rendered behind it.
  • Implemented by introducing site-config/hca-dcp/ma-dev/entities/projects/entity/tab/matrices.ts that wraps matricesMainColumn in a ConditionalComponent gated by renderExportEntity, with PROJECT_ACCESS_WARNING spread in front.
  • detail.ts updated to use the new MATRICES config. ma-prod inherits via makeConfig.

Closes #4858.

Test plan

  • Signed-in user without access to an "Access Required" project visits /projects/<id>/project-matrices → sees the "To export this project, please sign in and, if necessary, request access." warning. No matrix rows render.
  • Same user on a project they DO have access to → matrices render normally.
  • Unsigned user → same warning (existing behaviour).
  • Build (npm run build-ma-dev:hca-dcp) succeeds.

🤖 Generated with Claude Code

image

The matrices tab on hca-dcp project detail pages rendered the
matrix list unconditionally, even when the user did not have
access to the project. Download / copy buttons in those rows
hit gated file URLs and returned 404, producing confusing
broken behaviour instead of a clear "you don't have access"
surface.

Apply the same PROJECT_ACCESS_WARNING + ConditionalComponent
pattern that Download / Export / Metadata already use:

- New site-config/hca-dcp/ma-dev/entities/projects/entity/tab/
  matrices.ts wraps the matrices main column in a
  ConditionalComponent gated by renderExportEntity, with the
  access warning spread in front.
- detail.ts now imports MATRICES instead of the raw
  matricesMainColumn.

ma-prod inherits via makeConfig, no separate edit needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes hca-dcp project Matrices tab behavior to honor project access gating, aligning it with the existing Download / Export / Metadata tabs. When a user lacks access to an “Access Required” project, the existing PROJECT_ACCESS_WARNING is shown and the matrices content is not rendered.

Changes:

  • Added a new MATRICES tab config that prepends PROJECT_ACCESS_WARNING and conditionally renders matrices content using renderExportEntity.
  • Updated the project DETAIL tab configuration to use MATRICES instead of directly rendering matricesMainColumn.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
site-config/hca-dcp/ma-dev/entities/projects/entity/tab/matrices.ts Introduces MATRICES config that applies the same access gating pattern used by Export/Metadata/Download tabs.
site-config/hca-dcp/ma-dev/entities/projects/entity/detail.ts Switches the Matrices tab to use the new gated MATRICES config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@frano-m frano-m marked this pull request as ready for review June 4, 2026 06:07
@NoopDog NoopDog merged commit aaaddc5 into main Jun 4, 2026
4 of 6 checks passed
@frano-m frano-m deleted the fran/4858-hca-dcp-matrices-access-required-warning branch June 4, 2026 10:55
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.

[HCA DX] Matrices: show "request access" warning instead of matrices for projects user can't access

3 participants