Package com.denimgroup.threadfix.webapp.validator

Examples of com.denimgroup.threadfix.webapp.validator.UserValidator


  }

  @RequestMapping(method = RequestMethod.POST)
  public String processEdit(@ModelAttribute User user,
      BindingResult result, SessionStatus status, HttpServletRequest request) {
    new UserValidator(roleService).validate(user, result);
    if (result.hasErrors()) {
            ControllerUtils.addErrorMessage(request, "Error!!!");
            return "redirect:/configuration/users/password";
    } else {
     
View Full Code Here


  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.");
    }
View Full Code Here

    return roleService.loadAll();
  }

  @RequestMapping(method = RequestMethod.POST)
  public @ResponseBody RestResponse<User> processNew(@Valid @ModelAttribute User user, BindingResult result) {
    new UserValidator(roleService).validate(user, result);
    if (result.hasErrors()) {
            return FormRestResponse.failure("Errors", result);
    } else {
      User databaseUser = userService.loadUser(user.getName().trim());
      if (databaseUser != null) {
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.webapp.validator.UserValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.