feat(dacli): 迁移 BS-23 use*Permission 检查
This commit is contained in:
1 parent
957b19c89d
commit
480d41b766
1 file changed
+12
@@ -61,4 +61,16 @@ export function checkBsV2(form: FormDetail): BlindspotIssue[] {
|
||||
issues.push({ id: 'BS-V2', level: 'ERROR', path: 'dbLinkId', message: 'type≠4 必须有 dbLinkId' })
|
||||
}
|
||||
return issues
|
||||
}
|
||||
|
||||
export function checkBs23(columnDataRaw: unknown): BlindspotIssue[] {
|
||||
const issues: BlindspotIssue[] = []
|
||||
const cd = safeParse(columnDataRaw) as Record<string, unknown> | null
|
||||
if (!cd) return issues
|
||||
for (const k of ['useBtnPermission', 'useColumnPermission', 'useFormPermission', 'useDataPermission']) {
|
||||
if (!(k in cd)) {
|
||||
issues.push({ id: 'BS-23', level: 'ERROR', path: `columnData.${k}`, message: `缺 ${k} → 后端 setPcPermission NPE` })
|
||||
}
|
||||
}
|
||||
return issues
|
||||
}
|
||||
Reference in new issue
Block a user