public @ResponseBody RestResponse<User> processEdit(@PathVariable("userId") int userId, @ModelAttribute User user,
BindingResult result, SessionStatus status, HttpServletRequest request, Model model) {
userService.applyChanges(user, userId);
new UserValidator(roleService).validate(user, result);
if (userService.hasRemovedAdminPermissions(user) && !userService.canDelete(user)) {
result.rejectValue("hasGlobalGroupAccess", null, null,
"This would leave users unable to access the user management portion of ThreadFix.");
}