diff --git a/packages/plugins/acl/src/actions/role-check.ts b/packages/plugins/acl/src/actions/role-check.ts index dc9dc310d..88018d84e 100644 --- a/packages/plugins/acl/src/actions/role-check.ts +++ b/packages/plugins/acl/src/actions/role-check.ts @@ -32,7 +32,7 @@ export async function checkAction(ctx, next) { let role = ctx.app.acl.getRole(currentRole); if (!role) { - await ctx.app.emit('acl:writeRoleToACL', roleInstance); + await ctx.app.emitAsync('acl:writeRoleToACL', roleInstance); role = ctx.app.acl.getRole(currentRole); }