Split from #71. The reusable platform capability behind the issue-filer's "Organization" framing is tenant switching, generic over whatever schema is marked @tenant (there is no Organization platform schema — tenancy is polymorphic: TenantMembership.tenant_type + tenant_id).
Scope
Backend
Frontend (generated admin shell)
Out of scope / depends on
Notes
- "Organization" is domain-specific naming; this surface must stay generic over the
@tenant root schema so it works for every SchemaForge product.
Split from #71. The reusable platform capability behind the issue-filer's "Organization" framing is tenant switching, generic over whatever schema is marked
@tenant(there is noOrganizationplatform schema — tenancy is polymorphic:TenantMembership.tenant_type+tenant_id).Scope
Backend
POST /api/v1/forge/auth/switch-tenant— set the caller's active tenant to one of theirTenantMembershiprows; re-mint the PASETO with the updatedactive_tenant/tenant_chainclaims. Mirrors the/auth/mecontract shipped in auth: expose /auth/me principal endpoint (user_id, tenant_chain, active_tenant) and /auth/switch-tenant #70.Frontend (generated admin shell)
active_tenant+tenant_chain(data plane already exists viaGET /auth/me, auth: expose /auth/me principal endpoint (user_id, tenant_chain, active_tenant) and /auth/switch-tenant #70).Out of scope / depends on
/auth/me).Notes
@tenantroot schema so it works for every SchemaForge product.