公共 API 参考(@saas/contracts + @core/saas-kit + apps/api 对外接口)
    Preparing search index...

    租户申请/审批参考切片端点(global-tenancy S4 · FR-1/FR-11/FR-12)。

    FR-11 three-layer separation is expressed by the guard chosen PER ROUTE — none of these is tenant-scoped (you have no active tenant while applying; approval is cross-tenant):

    • POST /tenants/applications → user-level (SessionGuard): authenticated user applies.
    • POST /tenants/applications/:id/approve|reject → platform-level (PlatformOperatorGuard).

    Applying creates a pending_approval organization (self-service instant provisioning is closed at the BA layer — allowUserToCreateOrganization:false); the applicant becomes the first owner via BA (FR-12). A pending tenant binds no tenant context, so its business routes fail closed until an operator approves it (S4 middleware deny-list).

    Index