feat(risk): Enhance risk management functionality and access control
- Updated `RiskListAccess` and `ThresholdWriteAccess` to enforce access control in the risk repository and threshold repository, ensuring only authorized roles can perform sensitive operations. - Introduced new methods in `RiskRepository` for counting pending alerts and listing alerts with access checks, improving data security and compliance. - Enhanced the `chat.py` and `deps.py` files to integrate compliance roles into the risk management matrix, allowing for more granular access control. - Updated documentation to reflect the new testing baseline of 825 passed tests, indicating improved stability and functionality across the application. This update significantly strengthens the risk management capabilities, ensuring robust access control and compliance with organizational policies.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
| S2 接缝 | `auth_adapter.module_auth_from_host()` 已接线 |
|
||||
| trace 中间件 | ApiError / AppError / PermissionDenied / RequestValidationError / StarletteHTTPException **re-raise**;仅未捕获 → 500 |
|
||||
| 边界测试 | `tests/test_module_boundary.py` 全绿(宿主 D 类文件排除跨层扫描) |
|
||||
| 测试基线 | **`python -m pytest` → 530 passed, 0 skipped** |
|
||||
| 测试基线 | **`python -m pytest` → 530 passed, 0 skipped**(AL-09 当时快照)· **当前 merger 全量见 `docs/memory/MEMORY.md` §0(825)** |
|
||||
|
||||
**架构结论:** 宿主 `gateway/` 与模块 `deps.py` **双栈并存**;对外 token 统一;模块 API 禁止 import `app/gateway/`。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user