if (result.hasErrors()) {
return new ModelAndView(EDIT_PROFILE, EDITED_USER, editedProfileDto);
}
long editedUserId = editedProfileDto.getUserNotificationsDto().getUserId();
checkPermissionForEditNotificationsOrSecurity(editedUserId);
JCUser user = saveEditedProfileWithLockHandling(editedUserId, editedProfileDto, NOTIFICATIONS);
//redirect to the view profile page
return new ModelAndView("redirect:/users/" + user.getId() + "/" + NOTIFICATIONS);
}