59,7 → 59,7 |
this, request, "ak.hostcaptain.core.form.UserEditForm"); |
|
if(userId == null) { |
|
showForm.set("enabled", new Boolean(true)); |
} |
else { |
User u = UserManager.getInstance().get(userId); |
67,6 → 67,8 |
if(u.getBoss() != null) |
showForm.set("boss", StringConverter.toString(u.getBoss().getId())); |
showForm.set("superuser", u.getSuperuser()); |
showForm.set("enabled", u.getEnabled()); |
showForm.set("comment", u.getComment()); |
} |
|
initUserList(request); |
107,6 → 109,8 |
|
Long bossId = StringConverter.parseLong(theForm.get("boss")); |
if(bossId == null) |
u.setBoss(null); |
else |
u.setBoss(UserManager.getInstance().get(bossId)); |
|
if(!user.equals(u)) // do not allow user to change own superuser status |
115,6 → 119,9 |
if(password != null && !password.equals("")) |
u.setNewPassword(password); |
|
u.setEnabled((Boolean)theForm.get("enabled")); |
u.setComment((String)theForm.get("comment")); |
|
UserManager.getInstance().save(u); |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |