feat(v2.7): 收口治理权限适配器

This commit is contained in:
2026-07-08 16:44:57 +08:00
parent 9ba9449c1a
commit f69ec83193
14 changed files with 214 additions and 16 deletions

View File

@@ -307,3 +307,22 @@ Current source-of-truth boundary:
- `products-overview` remains the primary document for the product/project/version tree until Project and Version write APIs replace it.
- V2.2 read APIs and V2.3 relation sync are compatibility infrastructure, not proof that every relation model already has a public CRUD API.
- `packages/shared` still contains early Requirement/Task status enums. Before switching frontend writes to domain APIs, align shared enums with the current workflow statuses in this document.
## V2.7 Enterprise Collaboration And Governance Layer (2026-07-08)
V2.7 adds enterprise collaboration capabilities on top of the relational source-of-truth direction. New collaboration data does not add AppData keys:
- `notifications`: per-recipient notification records with stable event types `assignment / mention / risk_alert / overdue_item`.
- `comments`: polymorphic comments for `dev_task / test_case / bug / requirement / version_plan`, with mention metadata and soft deletion.
- `project_members`: project-level Owner/Admin/Member/Viewer governance, now exposed through server-enforced APIs.
- `audit_logs`: append-only governance and collaboration audit events.
- `governance_dictionaries`: centralized requirement type/platform/source dictionaries; task categories continue to use `task_categories`.
Because the full V2.5 RBAC/audit contract is not fully materialized as a standalone backend framework yet, V2.7 uses stable server adapters:
- `RbacService`: project role and global permission assertion adapter. Feature modules call this instead of hard-coding permission checks.
- `AuditService`: append-only audit adapter. Feature modules call this instead of writing ad-hoc audit records.
When V2.5 materializes a trusted auth context, global permission sourcing should be swapped behind `RbacService`; feature modules should keep depending on the adapter boundary.
Management overview reads only relation tables and summaries. It intentionally avoids AppData so it reflects the target backend boundary rather than the compatibility document store.