Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The route guard does not normalize trailing-slash paths, allowing unauthorized /design-system/ requests to receive the admin shell instead of a 404.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This pull request gates the admin Design System by the existing inbox allowlist and centralizes case-insensitive principal matching.
Changes:
- Shares
INBOX_USERSmatching across web and admin surfaces. - Adds admin permission bootstrap and route/navigation gating.
- Expands tests for permissions, routing, and allowlist behavior.
| File | Summary |
|---|---|
plugins/web-ui/test/inbox-source.test.ts |
Tests shared inbox allowlist usage. |
plugins/web-ui/server/index.ts |
Reuses the shared matcher. |
plugins/chassis/src/principal-allowlist.ts |
Provides reusable principal matching. |
plugins/admin/test/whoami.test.ts |
Tests permission bootstrap. |
plugins/admin/test/principal-allowlist.test.ts |
Tests normalization and the all override. |
plugins/admin/test/default-view.test.ts |
Tests client-side route gating. |
plugins/admin/test/branding.test.ts |
Tests authorized and denied routes. |
plugins/admin/src/index.ts |
Adds permissions and server route authorization. |
plugins/admin/public/index.html |
Gates Design System navigation and client routing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved route authorization, permission preservation, and admin configuration findings block approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (1)
| return forward(req, res, principal, "GET", `/v1/admin/${rest}${url.search}`); | ||
| } | ||
|
|
||
| if (method === "GET" && (pathname === "/design-system" || pathname === "/design-system/")) { |

Changes
INBOX_USERSmatcher across the web inbox/calendar surfaces and the admin surface, including the existingalloverride.Screenshots
Risk assessment
INBOX_USERS, and both client routing and direct design-system routes enforce it.