refactor: sub-table acl ignore (#2259)
This commit is contained in:
parent
137e3eb171
commit
1f8e0284fb
@ -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;
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ export const SubTable: any = observer(
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
isSubTable={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user