mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 15:09:27 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
1cb0b8a18d
@ -312,7 +312,10 @@ export const ACLCollectionFieldProvider = (props) => {
|
|||||||
const { allowAll } = useACLRoleContext();
|
const { allowAll } = useACLRoleContext();
|
||||||
const { whitelist } = useACLFieldWhitelist();
|
const { whitelist } = useACLFieldWhitelist();
|
||||||
const [name] = (fieldSchema.name as string).split('.');
|
const [name] = (fieldSchema.name as string).split('.');
|
||||||
const allowed = !fieldSchema['x-acl-ignore'] && whitelist.length > 0 ? whitelist.includes(name) : true;
|
const allowed =
|
||||||
|
!fieldSchema['x-acl-ignore'] && whitelist.length > 0 && fieldSchema?.['x-collection-field']
|
||||||
|
? whitelist.includes(name)
|
||||||
|
: true;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!allowed) {
|
if (!allowed) {
|
||||||
field.required = false;
|
field.required = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user