| | |
| | | List<?> resultList = domainQuery.getResultList(); |
| | | if (resultList.size() > 0) { |
| | | Domain superDom = (Domain) resultList.get(0); |
| | | if (superDom.isPacDomain()) { |
| | | throw new HSAdminException("subdomains to pacdomain " + superDom.getName() + " are not allowed"); |
| | | } |
| | | if (loginUser.hasPacAdminRoleFor(superDom.getUser().getPac())) { |
| | | break; // same pac |
| | | } |
| | |
| | | if (dnsCheck.checkDomain(dom.getName())) { |
| | | break; |
| | | } else { |
| | | throw new HSAdminException("domain " + dom.getName() + " is not delegated to " + dom.getDnsMaster()); |
| | | throw new AuthorisationException(loginUser, "add", dom); |
| | | } |
| | | } |
| | | } |