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());