fix: acl field whitelist

This commit is contained in:
chenos 2023-01-31 15:54:41 +08:00
parent b88adc5c11
commit 733e1ff60b

View File

@ -244,8 +244,8 @@ export const useACLFieldWhitelist = () => {
if (!fieldSchema['x-collection-field']) { if (!fieldSchema['x-collection-field']) {
return true; return true;
} }
const [, ...keys] = fieldSchema['x-collection-field'].split('.'); const [key1, key2] = fieldSchema['x-collection-field'].split('.');
return whitelist?.includes(keys.join('.')); return whitelist?.includes(key2 || key1);
}, },
}; };
}; };