Hi everyone,
I noticed an issue on the GeoServer Welcome Page (/web/) when different workspaces contain layers with identical local names (multi-tenant setup):
Steps to reproduce:
- Have two workspaces (e.g. “workspaceA” and “workspaceB”).
- Create a layer with the same local name (e.g. “dop_2025”) in both workspaces.
- On the Welcome Page (/web/), select “dop_2025” under “workspaceA” in the left sidebar tree.
- The page opens with URL: ?workspace=workspaceA&layer=dop_2025
Issue:
While the sidebar and breadcrumb show “workspaceA”, the page content, abstract, and administrative action links (“Edit Layer”, “Edit Store”, “Workspace REST API”) point to “workspaceB:dop_2025”.
Technical cause:
The page receives both “workspace” and “layer” parameters, but appears to perform an unqualified catalog lookup:
catalog.getLayerByName(layerName)
instead of scoping it to the workspace:
catalog.getLayerByName(workspace, layerName)
Because the name is unqualified, it returns the first global match from the catalog. Manually qualifying the URL (&layer=workspaceA:dop_2025) resolves the correct layer.
Could this be tracked in Jira?
Thanks!