on domain add use default domainoptions only if no optins are given
This commit is contained in:
parent
21ae1802e3
commit
9910aeb9e0
@ -135,6 +135,7 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
dom.setUser((UnixUser) adminQuery.getSingleResult());
|
||||
needsWriteAccessOn(newEntity, "add");
|
||||
em.persist(dom);
|
||||
if (dom.getDomainoptions() == null) { // set default-domainoptions
|
||||
HashSet<DomainOption> domainOptions = new HashSet<DomainOption>();
|
||||
for (String domOpt : DEFAULT_DOMOPTS) {
|
||||
Query q = em.createQuery("SELECT opt FROM " +
|
||||
@ -149,6 +150,7 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
}
|
||||
}
|
||||
dom.setDomainoptions(domainOptions);
|
||||
}
|
||||
if (dom.isPacDomain()) {
|
||||
em.persist(new EMailAddress("owner", "", dom, dom.getUser().getPac().getCustomer().getName().substring(6) + "@hostsharing.net"));
|
||||
em.persist(new EMailAddress("admin", "", dom, dom.getUser().getPac().getName() + "@hostsharing.net"));
|
||||
|
Loading…
Reference in New Issue
Block a user