Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 911 → Rev 913

/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/MailAliasAction.java
69,7 → 69,7
this, request, "ak.hostcaptain.core.form.MailAliasEditForm");
 
if(aliasId == null) {
 
showForm.set("enabled", new Boolean(true));
}
else {
MailAlias alias = MailAliasManager.getInstance().get(aliasId);
86,11 → 86,11
 
showForm.set("address", alias.getAddress());
if(alias.getDomain() != null)
showForm.set("domain",
StringConverter.toString(alias.getDomain().getId()));
showForm.set("domain", StringConverter.toString(alias.getDomain().getId()));
if(alias.getOwner() != null)
showForm.set("owner",
StringConverter.toString(alias.getOwner().getId()));
showForm.set("owner", StringConverter.toString(alias.getOwner().getId()));
showForm.set("enabled", alias.getEnabled());
showForm.set("comment", alias.getComment());
}
 
initLists(request, user);
155,6 → 155,8
StringConverter.parseLong(theForm.get("domain"))));
alias.setOwner(UserManager.getInstance().get(
StringConverter.parseLong(theForm.get("owner"))));
alias.setEnabled((Boolean)theForm.get("enabled"));
alias.setComment((String)theForm.get("comment"));
 
// update alias
MailAliasManager.getInstance().save(alias);
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/UserAction.java
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;
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/SystemUserAction.java
59,7 → 59,7
this, request, "ak.hostcaptain.core.form.SystemUserEditForm");
 
if(userId == null) {
 
showForm.set("enabled", new Boolean(true));
}
else {
SystemUser u = SystemUserManager.getInstance().get(userId);
67,6 → 67,8
showForm.set("name", u.getName());
if(u.getOwner() != null)
showForm.set("owner", StringConverter.toString(u.getOwner().getId()));
showForm.set("enabled", u.getEnabled());
showForm.set("comment", u.getComment());
}
 
initUserList(request);
95,7 → 97,7
 
u.setUid(StringConverter.parseInteger(theForm.get("uid")));
u.setName((String)theForm.get("name"));
 
 
Long ownerId = StringConverter.parseLong(theForm.get("owner"));
if(ownerId == null)
u.setOwner(null);
102,6 → 104,9
else
u.setOwner(UserManager.getInstance().get(ownerId));
 
u.setEnabled((Boolean)theForm.get("enabled"));
u.setComment((String)theForm.get("comment"));
 
SystemUserManager.getInstance().save(u);
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/InetDomainAction.java
59,7 → 59,7
this, request, "ak.hostcaptain.core.form.InetDomainEditForm");
 
if(domainId == null) {
 
showForm.set("enabled", new Boolean(true));
}
else {
InetDomain domain = InetDomainManager.getInstance().get(domainId);
66,6 → 66,8
showForm.set("name", domain.getName());
if(domain.getOwner() != null)
showForm.set("owner", StringConverter.toString(domain.getOwner().getId()));
showForm.set("enabled", domain.getEnabled());
showForm.set("comment", domain.getComment());
}
 
initUserList(request);
96,6 → 98,9
domain.setOwner(UserManager.getInstance().get(
StringConverter.parseLong(theForm.get("owner"))));
 
domain.setEnabled((Boolean)theForm.get("enabled"));
domain.setComment((String)theForm.get("comment"));
 
InetDomainManager.getInstance().save(domain);
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;
/sun/hostcaptain/trunk/src/ak/hostcaptain/core/action/MailboxAction.java
60,7 → 60,7
this, request, "ak.hostcaptain.core.form.MailboxEditForm");
 
if(boxId == null) {
 
showForm.set("enabled", new Boolean(true));
}
else {
Mailbox mailbox = MailboxManager.getInstance().get(boxId);
73,6 → 73,8
showForm.set("spamcheck", mailbox.getSpamCheck());
if(mailbox.getSystemUser() != null)
showForm.set("systemuser", StringConverter.toString(mailbox.getSystemUser().getId()));
showForm.set("enabled", mailbox.getEnabled());
showForm.set("comment", mailbox.getComment());
}
 
initLists(request);
124,6 → 126,9
if(password != null && !password.equals(""))
mailbox.setNewPassword(password);
 
mailbox.setEnabled((Boolean)theForm.get("enabled"));
mailbox.setComment((String)theForm.get("comment"));
 
MailboxManager.getInstance().save(mailbox);
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;