Skip to content

Limit the Isotope/Structural modification grids to the current folder…#662

Open
vagisha wants to merge 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_panoramapublic-disable-cross-folder-query
Open

Limit the Isotope/Structural modification grids to the current folder…#662
vagisha wants to merge 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_panoramapublic-disable-cross-folder-query

Conversation

@vagisha

@vagisha vagisha commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Rationale

The modification web part title links to the full query grid, where an "All Folders" filter could be applied, leading to very slow queries. Restricting the Folder Filter menu is not enough because a hand-built query.containerFilterName=AllFolders URL still applies.

Changes

  • Added a shared PanoramaPublicSchema.limitContainerScope helper that restricts any container filter wider than the current folder and subfolders down to CurrentAndSubfolders.
  • PanoramaPublicSchema.createView calls the helper for the IsotopeModifications and StructuralModifications grids.
  • ModificationsView.getContainerFilter calls the same helper, closing the same gap on the standalone web parts. It is a no-op on the experiment details page, which already pins the scope.

Tests

  • PanoramaPublicModificationsTest.verifyModificationQueryScopeIsRestricted checks that the Folder Filter menu does not include All Folders, and that a query.containerFilterName=AllFolders URL is restricted to CurrentAndSubfolders.
  • PanoramaPublicModificationsTest.verifyModificationWebPartScopeIsRestricted drives the standalone web part URL and checks the same restriction.

Co-Authored-By: Claude noreply@anthropic.com

Copilot AI left a comment

Copy link
Copy Markdown

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 prevents Panorama Public modification grids (Isotope/Structural) from being widened to expensive cross-folder scopes via hand-crafted URLs, by clamping container filters to the current folder tree.

Changes:

  • Added PanoramaPublicSchema.limitContainerScope(...) to restrict any container filter broader than Current/CurrentAndSubfolders down to CurrentAndSubfolders.
  • Applied the restriction to the full query grids via PanoramaPublicSchema.createView(...) for the Isotope/Structural modification queries.
  • Applied the same restriction to standalone modification web parts via ModificationsView.getContainerFilter(), and added regression UI tests covering both entry points.

Reviewed changes

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

File Description
panoramapublic/src/org/labkey/panoramapublic/PanoramaPublicSchema.java Adds the shared container-scope limiting helper and applies it to the two modification query grids.
panoramapublic/src/org/labkey/panoramapublic/query/modification/ModificationsView.java Clamps container filters for standalone modification web parts to prevent URL-based widening.
panoramapublic/test/src/org/labkey/test/tests/panoramapublic/PanoramaPublicModificationsTest.java Adds UI tests ensuring both the menu and URL parameters cannot expand scope to All Folders.

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

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.

2 participants