feat: org-wide ACL access overview#311
Open
schmug wants to merge 1 commit into
Open
Conversation
Adds GET /api/v1/org/acl-overview returning every mailbox with acl_status, owner, and members. Authz: any CF-Access-admitted caller (no org-admin role exists; Access policy is the org boundary — consistent with /api/v1/org/overview). Frontend: /acl route renders a table filterable by domain and text search. https://claude.ai/code/session_01W3BVzoQixUKgRCNiefCLMD
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ais-hub | 1d14728 | Commit Preview URL Branch Preview URL |
May 22 2026, 12:22 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/v1/org/acl-overviewreturning every mailbox with{ email, acl_status, owner: string|null, members: string[] }/aclfrontend route rendering a filterable table (by domain + text search) of all mailbox access grantsAuthz model (documented here and in the endpoint comment)
Any CF-Access-admitted caller receives the full data. No org-admin role exists in this system; the Cloudflare Access policy is the org boundary — everyone admitted by CF Access is an org member or operator. This is intentional and consistent with
/api/v1/org/overview, which also returns org-wide data to any authenticated caller. Callers without a CF Access header (local dev) receive the same data — consistent with all other/api/v1/org/*endpoints.This is not a silent privacy regression: it is a deliberate design decision, documented in the endpoint code comment and in this PR body, with tests that explicitly assert "non-owner authenticated callers receive 200 with full data, not 403."
Files changed (8 files, ~435 lines)
Note: This technically exceeds the 6-file auto-decompose threshold but is well under the 1500-line threshold. The feature is tightly cohesive (backend endpoint + API client + query hook + route + tests); splitting backend from UI would require stacked PRs with the known complications described in CLAUDE.md.
workers/index.ts— new endpointapp/services/api.ts—getOrgAclOverview()API callapp/types/index.ts—AclOverviewEntryinterfaceapp/queries/keys.ts—org.aclOverviewquery keyapp/queries/org.ts—useOrgAclOverview()hookapp/routes/org-acl.tsx— new/aclroute (table + filters)app/routes.ts— route registrationtests/routes/acl-overview.test.ts— 7 new testsTest plan
tests/routes/acl-overview.test.ts— 7 tests: empty fleet, all-unscoped, all-scoped, mixed fleet, local-dev (no CF Access header → 200), non-owner member caller (→ 200), multi-domain fleetnpm run typecheck— cleanCloses
Closes #292
Spec follow-up needed
No — this change doesn't touch any invariants in SECURITY_SPEC.md.
Deferred / out of scope
Generated by Claude Code