Exemplo n.º 1
0
 protected void doValidation() {
   validationResult = userService.validateDeleteUser(getLoggedInUser(), getUser().getName());
   if (!validationResult.isValid()) {
     addErrorCollection(validationResult.getErrorCollection());
   }
   super.doValidation();
 }
Exemplo n.º 2
0
  @RequiresXsrfCheck
  protected String doExecute() throws Exception {
    try {
      if (confirm) {
        userService.removeUser(getLoggedInUser(), validationResult);
      }
    } catch (Exception e) {
      addErrorMessage(getText("admin.errors.users.exception.trying.to.remove", e));
    }

    if (getHasErrorMessages()) {
      return ERROR;
    } else {
      return getRedirect("UserBrowser.jspa");
    }
  }