fix: operation permission detection for codes ending with :operation

Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
dxc
2026-02-27 11:00:44 +08:00
parent a547d6b164
commit 25487dbede

View File

@ -220,7 +220,7 @@ const transformData = (nodes: any[]): PermissionNode[] => {
const allChildren = node.children || [] const allChildren = node.children || []
// 1. 找操作列 (作为 Write 权限) // 1. 找操作列 (作为 Write 权限)
const opNode = allChildren.find((c: any) => c.type === 'element' && (c.code === 'operation' || c.code.endsWith('_op'))) const opNode = allChildren.find((c: any) => c.type === 'element' && (c.code === 'operation' || c.code.endsWith(':operation') || c.code.endsWith('_op')))
const operationCode = opNode ? opNode.code : null const operationCode = opNode ? opNode.code : null
// 2. 找普通列 (作为字段权限) // 2. 找普通列 (作为字段权限)