Files
luo 33485b137f
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m42s
fix: 优化审计
2026-08-11 16:47:58 +08:00

19 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Change: 收紧审计接口的主体访问边界
## Why
平台 `/api/admin/audit/*` 接口仅允许超级管理员和平台账号访问。当前部分业务入口未传递当前账号类型,可能让代理或企业用户构造平台资源时间线目标;平台审计页面和调查抽屉也缺少统一的前端请求拦截。
## What Changes
- 平台审计中心、平台资源时间线、资金链路、请求链路、风险和 Integration 等 `/api/admin/audit/*` 调用只允许超级管理员或平台账号发起。
- 代理账号仅通过代理主体活动接口查看其支持资源;企业账号仅通过企业主体活动接口查看卡和设备资源。
- 业务入口基于当前登录账号类型选择对应权限与调查目标,账号、店铺等不受主体活动支持的资源不向代理或企业显示平台审计入口。
- 在共享调查加载层增加防御性校验,越权目标不发起网络请求并提示不可用。
- 保持审计能力严格只读:所有相关前端 API 保持 GET不新增修改、删除、导出、恢复、重试、补偿或风险处置操作。
## Impact
- Affected specs: `audit-chain-frontend-integration`
- Affected code: `src/components/business/audit/`, `src/utils/business/auditNavigation.ts`, audit routes/views, and business pages with audit-entry buttons including account, shop, asset, order, refund and wallet views.