fix(acl): exception thrown when role not found
This commit is contained in:
parent
2c6b9babff
commit
d610297f8c
@ -33,6 +33,8 @@ export async function checkAction(ctx, next) {
|
|||||||
allowMenuItemIds: roleInstance.get('menuUiSchemas').map((uiSchema) => uiSchema.get('x-uid')),
|
allowMenuItemIds: roleInstance.get('menuUiSchemas').map((uiSchema) => uiSchema.get('x-uid')),
|
||||||
allowAnonymous: !!anonymous,
|
allowAnonymous: !!anonymous,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
throw new Error('Role not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
await next();
|
await next();
|
||||||
|
Loading…
Reference in New Issue
Block a user