return match;
}
@Override
public PageUser updatePageUser(String userId, PageUser user) {
PageUser oldUser = getPageUser(userId);
if (user.getPersonId() == null) {
throw new BadRequestException("Page user status property must be defined.");
}
if(oldUser.isEditor() != user.isEditor()) {
pageService.updatePageEditingStatus(page.getId(), userId, user.isEditor());
}
if(!oldUser.getStatus().equals(user.getStatus())) {
pageService.updateSharedPageStatus(page.getId(), userId, user.getStatus());
}
return user;
}