/**
* @see evolaris.framework.sys.web.action.EnterEditDuplicateAction#modify(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public ActionForward modify(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
UserEnterOrEditForm f = (UserEnterOrEditForm)form;
Group group = groupFromId(f.getGroupId());
checkAccessRights(req, group);
if (f.getId().longValue() == webUser.getId()){ // restore disabled roles
Set<Role>roles = webUser.getRoles();
String roleIds[] = new String[roles.size()];
int i = 0;
for (Iterator iter = roles.iterator(); iter.hasNext();) {
Role role = (Role) iter.next();
roleIds[i++] = role.getId() + "";
}
f.setSelectedRoleIds(roleIds);
}
UserManager userManager = new UserManager(locale,session);
User user = userManager.getUserDetails(f.getId());
if (user == null){
throw new InputException(getLocalizedMessage("SystemWeb", "sys.entryNotAvailable"));
}