docs: 补充合同模板与文档质量方案文档
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
## 目标
|
||||
|
||||
补齐 `contract-template` 当前阶段只读能力所需的权限蓝图,仅覆盖:
|
||||
|
||||
- 分类
|
||||
- 列表
|
||||
- 搜索
|
||||
- 详情
|
||||
|
||||
明确不包含:
|
||||
|
||||
- 起草合同
|
||||
- 草稿管理
|
||||
- 合同编辑
|
||||
|
||||
|
||||
## 建议新增权限 key
|
||||
|
||||
建议在 `fastapi_modules/fastapi_leaudit/services/impl/rbacAdminServiceImpl.py` 的 `_MANAGEABLE_PERMISSION_BLUEPRINTS` 中补充以下 3 个权限:
|
||||
|
||||
```python
|
||||
{"permission_key": "contract_template:list:read", "display_name": "查看合同模板列表", "module": "contract_template", "resource": "list", "action": "read", "api_method": "GET", "api_path": "/api/v3/contract-templates", "route_path": "/contract-template/list"},
|
||||
{"permission_key": "contract_template:search:read", "display_name": "搜索合同模板", "module": "contract_template", "resource": "search", "action": "read", "api_method": "GET", "api_path": "/api/v3/contract-templates/search", "route_path": "/contract-template/search"},
|
||||
{"permission_key": "contract_template:detail:read", "display_name": "查看合同模板详情", "module": "contract_template", "resource": "detail", "action": "read", "api_method": "GET", "api_path": "/api/v3/contract-templates/{id}", "route_path": "/contract-template/list"},
|
||||
```
|
||||
|
||||
|
||||
## 分类接口权限建议
|
||||
|
||||
接口:
|
||||
|
||||
- `GET /api/v3/contract-templates/categories`
|
||||
|
||||
建议权限策略:
|
||||
|
||||
- 允许 `contract_template:list:read`
|
||||
- 或 `contract_template:search:read`
|
||||
|
||||
原因:
|
||||
|
||||
- 分类数据同时服务于列表页和搜索页
|
||||
- 不建议单独再拆一个 `category:read` 权限,当前阶段收益不高
|
||||
|
||||
|
||||
## Controller 校验建议
|
||||
|
||||
### 分类
|
||||
|
||||
允许任一权限:
|
||||
|
||||
- `contract_template:list:read`
|
||||
- `contract_template:search:read`
|
||||
|
||||
### 列表
|
||||
|
||||
- `contract_template:list:read`
|
||||
|
||||
### 搜索
|
||||
|
||||
- `contract_template:search:read`
|
||||
|
||||
### 详情
|
||||
|
||||
建议放宽为任一权限:
|
||||
|
||||
- `contract_template:detail:read`
|
||||
- `contract_template:list:read`
|
||||
|
||||
原因:
|
||||
|
||||
- 详情通常从列表页进入
|
||||
- 允许列表权限兼容详情访问,可以减少菜单和权限配置初期的阻塞
|
||||
|
||||
|
||||
## 当前阶段不应新增的权限
|
||||
|
||||
以下权限本轮不要进入蓝图:
|
||||
|
||||
- `contract_draft:create:write`
|
||||
- `contract_draft:update:write`
|
||||
- `contract_draft:delete:delete`
|
||||
|
||||
原因:
|
||||
|
||||
- 你已经明确起草能力将重做为独立模块
|
||||
- 当前阶段只解决 `contract-template` 的只读接口迁移
|
||||
Reference in New Issue
Block a user