feat(api,web): org members, RBAC, invitations, and team page - #11
Conversation
Reconciliation Stage B. OSS role resolver + rbac:true, /v1/org/members (keyset list, suspend/reinstate, role update) and /v1/org/invitations on the surviving eeRoutes seam (no shared app.ts edit), member project provisioning with the access binding, link-based invitations, /team and /join. +129 tests, no agent-group code, no migration.
# Conflicts: # apps/web/src/lib/init/api.ts
What it actually doesThe first real multi-user feature: an org admin can see a member directory, suspend/reinstate members, change roles between Underneath, it flips on Why it existsUpstream ships org membership/roles only in its closed cloud product. "Open edition" implies self-hosted orgs can have more than one human without everyone being a de-facto admin. It's also the foundation for #12, #13 and #18. Reading order
Low attention: What to scrutinise
Design decisions worth questioning
Test coverage reality2,355 lines of new tests, concentrated entirely in the API/service layer — Zero tests for ~1,500 lines of new/changed web code. Nothing touches
Reviewer orientation guide — produced by analysing this PR's diff and surrounding code, not the commit messages. Claims about line numbers and behaviour are worth spot-checking as you read; where it says something is untested or risky, that was verified against the tree rather than inferred. |
62d04c3 to
9f1cae1
Compare
Organization membership backend plus the team UI. 47 files, +5,298/−36 — of which 2,355 lines are tests, so the review surface is ~2,900 lines.
org-member-service.ts,org-invitation-service.ts(+ their tests)org/members,org/invitations(+ ~1,440 lines of route tests)middleware/auth/api-key.test.ts)/teampage and components,/join/[token]invitation acceptance flowIncludes merge commit
62d04c3(reconciliation stage B), which is why this branch points there rather than atb4d3282.Stack
Split out of the original 381-file #8. Upstream catch-up (v1.42.0 → v1.44.0) already landed as #10, so
mainis now v1.44.0 and everything below is our own code.Review and merge in order, top to bottom. Roughly half of each diff is tests.