后端:稳定租户链路与 VLM 图片质量检测 #9
Reference in New Issue
Block a user
Delete Branch "wren-dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
session-data过滤,但后端/api/home/entry-modules仍会按用户 RBAC 路由树过滤入口,导致 000/缺少文件管理路由的用户在接口层已经拿不到合同入口。主要改动
/documents、/documents/list、/files/upload不再要求文件管理路由授权。/documents、/documents/list、/files/upload保留可渲染无权限态的入口例外;其它无菜单路由仍会重定向无权限页。documents:list:read/documents:detail:read控制数据加载,无权限时不拉取列表并 toast “暂无文档列表查看权限”。/files/upload路由授权和documents:upload:write控制上传能力,无权限时禁用选择/提交/上传动作并 toast “暂无文件上传权限”。影响范围
/api/home/entry-modules首页入口返回逻辑。/documents、/documents/list、/files/upload的路由守卫语义。测试
python -m pytest tests/test_home_entry_visibility.py tests/release/test_role_tenant_matrix.py:5 个用例通过。python -m py_compile fastapi_modules/fastapi_leaudit/services/impl/homeServiceImpl.py tests/test_home_entry_visibility.py:通过。node --test tests/govdoc-audit/file-management-access.test.mts tests/govdoc-audit/home-entry-access.test.mts tests/govdoc-audit/home-statistics-access.test.mts tests/govdoc-audit/route-access.test.mts tests/govdoc-audit/route-permission-map.test.mts:18 个用例通过。npx tsc --noEmit --pretty false:通过。npx eslint ...:0 error,保留既有 6 个 warning。验收建议
/api/home/entry-modules响应里包含租户配置的文档类入口。