diff --git a/packages/core/client/src/acl/ACLProvider.tsx b/packages/core/client/src/acl/ACLProvider.tsx index 13d494234..ffb378a3d 100644 --- a/packages/core/client/src/acl/ACLProvider.tsx +++ b/packages/core/client/src/acl/ACLProvider.tsx @@ -233,7 +233,10 @@ export const useACLFieldWhitelist = () => { .concat(params?.appends || []); return { whitelist, - schemaInWhitelist(fieldSchema: Schema) { + schemaInWhitelist(fieldSchema: Schema, isSkip?) { + if (isSkip) { + return true; + } if (whitelist.length === 0) { return true; } diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index 1be5f1e05..0853a793a 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -97,6 +97,7 @@ export const SubTable: any = observer( ) } + isSubTable={true} /> ); diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx index 8a2fe6977..e215e0ef4 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx @@ -37,7 +37,7 @@ const useTableColumns = (props) => { const { exists, render } = useSchemaInitializer(schema['x-initializer']); const columns = schema .reduceProperties((buf, s) => { - if (isColumnComponent(s) && schemaInWhitelist(Object.values(s.properties || {}).pop())) { + if (isColumnComponent(s) && schemaInWhitelist(Object.values(s.properties || {}).pop(), props?.isSubTable)) { return buf.concat([s]); } return buf;