diff --git a/packages/core/database/src/eager-loading/eager-loading-tree.ts b/packages/core/database/src/eager-loading/eager-loading-tree.ts index a2182d136..738e46463 100644 --- a/packages/core/database/src/eager-loading/eager-loading-tree.ts +++ b/packages/core/database/src/eager-loading/eager-loading-tree.ts @@ -242,7 +242,7 @@ export class EagerLoadingTree { for (const instance of node.instances) { const parentInstance = node.parent.instances.find( - (parentInstance) => parentInstance.get(sourceKey) == instance.get(oneFromTarget.as).get(foreignKey), + (parentInstance) => parentInstance.get(sourceKey) == instance[oneFromTarget.as].get(foreignKey), ); if (parentInstance) { diff --git a/packages/plugins/acl/src/__tests__/role-check.test.ts b/packages/plugins/acl/src/__tests__/role-check.test.ts index bacdbc8af..0355d7c55 100644 --- a/packages/plugins/acl/src/__tests__/role-check.test.ts +++ b/packages/plugins/acl/src/__tests__/role-check.test.ts @@ -24,6 +24,12 @@ describe('role check action', () => { }, }); + await role.createMenuUiSchema({ + values: { + name: 'test', + }, + }); + const user = await db.getRepository('users').create({ values: { roles: ['test'],