fix(acl): exception thrown when role not found

This commit is contained in:
chenos 2022-11-25 09:31:57 +08:00
parent 2c6b9babff
commit d610297f8c

View File

@ -33,6 +33,8 @@ export async function checkAction(ctx, next) {
allowMenuItemIds: roleInstance.get('menuUiSchemas').map((uiSchema) => uiSchema.get('x-uid')),
allowAnonymous: !!anonymous,
};
} else {
throw new Error('Role not found');
}
await next();