if (aUser.isEnabled()) {
Role role = this.roleRepository().roleNamed(aUser.tenantId(), aRoleName);
if (role != null) {
GroupMemberService groupMemberService =
new GroupMemberService(
this.userRepository(),
this.groupRepository());
authorized = role.isInRole(aUser, groupMemberService);
}