Multi-tenant model
- Workspace
Top-level isolation boundary. Every row carries `workspaceId`; every API enforces membership before it touches the DB.
- Plan
Feature-gated capabilities (custom scanners, audit export, policy versioning, channel fan-out). Centralized in `lib/plan-features.ts`.
- Roles
OWNER → ADMIN → REVIEWER → DEVELOPER. Platform-level: USER → CFO/CISO → ADMIN → SUPER_ADMIN. Centralized in `lib/authz.ts`.
- Impersonation
Super-admins can scope a time-bounded support session into a workspace. Every impersonated action carries an `impersonatedBy` audit field.