| | |
| | | import de.hsadmin.core.model.Transaction; |
| | | import de.hsadmin.hostsharing.BasePacType; |
| | | import de.hsadmin.mods.dom.Domain; |
| | | import de.hsadmin.mods.dom.DomainOption; |
| | | import de.hsadmin.mods.user.UnixUser; |
| | | |
| | | public class EMailAddressModuleImpl extends AbstractModuleImpl { |
| | |
| | | qEmailAddresses.setParameter("pacId", dom.getUser().getPac().getId()); |
| | | if (qEmailAliases.getResultList().size() + qEmailAddresses.getResultList().size() >= EMAIL_PER_MULTI_OPTION * dom.getUser().getPac().getQuantityByComponentName("MULTI")) { |
| | | throw new HSAdminException("included email addresses/aliases exceeded"); |
| | | } |
| | | } |
| | | for (DomainOption opt : adr.getDomain().getDomainoptions()) { |
| | | if ("backupmxforexternalmx".equals(opt.getName())) { |
| | | throw new HSAdminException("email addresses may not be added when domain option backumxforexternalmx is active"); |
| | | } |
| | | } |
| | | return super.add(newEntity); |
| | | } |
| | | |