修复root平台账户编辑角色误提交
This commit is contained in:
@@ -21,6 +21,7 @@ function assertIncludes(source, expected, message) {
|
||||
const resources = read('src/api/resources.ts');
|
||||
const display = read('src/api/resource-display.ts');
|
||||
const detailContract = read('src/api/resource-detail-contract.ts');
|
||||
const pageRules = read('src/api/resource-page-rules.ts');
|
||||
const detailPage = read('src/views/resource/ResourceDetailContent.vue');
|
||||
const listPage = read('src/views/shared/CrudListPage.vue');
|
||||
const listFieldDisplay = read('src/views/shared/resource-list-field-display.ts');
|
||||
@@ -388,6 +389,17 @@ assertIncludes(
|
||||
"f('phone', { emptyText: '未填写' })",
|
||||
'平台账户联系电话为空时必须显示业务文案',
|
||||
);
|
||||
for (const rootAccountContract of [
|
||||
"String(row.platform_role_code ?? '') === 'root'",
|
||||
"visibleKeys.add('platform_role_code')",
|
||||
"isProtectedPlatformRootAccount(definition, row)",
|
||||
]) {
|
||||
assertIncludes(
|
||||
pageRules,
|
||||
rootAccountContract,
|
||||
`root 平台账户缺少角色只读保护契约:${rootAccountContract}`,
|
||||
);
|
||||
}
|
||||
assertIncludes(
|
||||
detailPage,
|
||||
'!hasResourceFieldLabel(props.definition, actualKey)',
|
||||
|
||||
Reference in New Issue
Block a user