@RequestMapping("/admin_global/v_edit.do")
  public String edit(
      Integer id,
      Integer queryGroupId,
      Boolean queryDisabled,
      HttpServletRequest request,
      ModelMap model) {
    String queryUsername = RequestUtils.getQueryParam(request, "queryUsername");
    String queryEmail = RequestUtils.getQueryParam(request, "queryEmail");
    CmsUser currUser = CmsUtils.getUser(request);
    WebErrors errors = validateEdit(id, request);
    if (errors.hasErrors()) {
      return errors.showErrorPage(model);
    }
    CmsUser admin = manager.findById(id);

    List<CmsGroup> groupList = cmsGroupMng.getList();
    List<CmsSite> siteList = cmsSiteMng.getList();
    List<CmsRole> roleList = cmsRoleMng.getList();

    model.addAttribute("cmsAdmin", admin);
    model.addAttribute("siteIds", admin.getSiteIds());
    model.addAttribute("roleIds", admin.getRoleIds());
    model.addAttribute("groupList", groupList);
    model.addAttribute("siteList", siteList);
    model.addAttribute("roleList", roleList);
    model.addAttribute("currRank", currUser.getRank());

    model.addAttribute("queryUsername", queryUsername);
    model.addAttribute("queryEmail", queryEmail);
    model.addAttribute("queryGroupId", queryGroupId);
    model.addAttribute("queryDisabled", queryDisabled);
    return "admin/global/edit";
  }
  @RequestMapping("/admin_global/v_list.do")
  public String list(
      String queryUsername,
      String queryEmail,
      Integer queryGroupId,
      Boolean queryDisabled,
      Integer pageNo,
      HttpServletRequest request,
      ModelMap model) {
    CmsUser currUser = CmsUtils.getUser(request);
    Pagination pagination =
        manager.getPage(
            queryUsername,
            queryEmail,
            null,
            queryGroupId,
            queryDisabled,
            true,
            currUser.getRank(),
            cpn(pageNo),
            CookieUtils.getPageSize(request));
    model.addAttribute("pagination", pagination);

    model.addAttribute("queryUsername", queryUsername);
    model.addAttribute("queryEmail", queryEmail);
    model.addAttribute("queryGroupId", queryGroupId);
    model.addAttribute("queryDisabled", queryDisabled);

    return "admin/global/list";
  }
 @RequestMapping("/admin_global/v_add.do")
 public String add(HttpServletRequest request, ModelMap model) {
   CmsUser currUser = CmsUtils.getUser(request);
   List<CmsGroup> groupList = cmsGroupMng.getList();
   List<CmsSite> siteList = cmsSiteMng.getList();
   List<CmsRole> roleList = cmsRoleMng.getList();
   model.addAttribute("groupList", groupList);
   model.addAttribute("siteList", siteList);
   model.addAttribute("roleList", roleList);
   model.addAttribute("currRank", currUser.getRank());
   return "admin/global/add";
 }