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:
@ -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. 找普通列 (作为字段权限)
|
||||||
|
|||||||
Reference in New Issue
Block a user