fix: 操作日志详细记录权限变更
All checks were successful
Test / unit-test (push) Successful in 7s
Test / build-check (push) Successful in 6s
Test / e2e-test (push) Successful in 50s

- 修改用户权限时记录旧角色→新角色(中文)和用户名
- 日志显示"查看者 → 高级编辑"格式
- 商业认证日志显示商户名

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 20:53:22 +00:00
parent 5a34b11720
commit 3a7e52360c
2 changed files with 14 additions and 3 deletions

View File

@@ -153,9 +153,10 @@ function parsedDetail(log) {
try {
const d = JSON.parse(log.detail)
const parts = []
if (d.from_role && d.to_role) parts.push(`${d.from_role}${d.to_role}`)
if (d.from_user) parts.push(`来自: ${d.from_user}`)
if (d.reason) parts.push(`原因: ${d.reason}`)
if (d.role) parts.push(`角色: ${d.role}`)
if (d.business_name) parts.push(`商户: ${d.business_name}`)
if (d.display_name) parts.push(`显示名: ${d.display_name}`)
if (d.original_log_id) parts.push(`恢复自 #${d.original_log_id}`)
if (parts.length) return parts.join(' · ')