fix error in adding new object with hostmaster privileges
| | |
| | | if (!pac.getName().equals(pacPrefix)) { |
| | | throw new HSAdminException("wrong database owner"); |
| | | } |
| | | database.setPac(pac); |
| | | return super.add(newEntity); |
| | | } |
| | | |
| | |
| | | if (pac == null || !pac.isReadAllowedFor(loginUser)) { |
| | | throw new AuthorisationException(loginUser, "add", newEntity); |
| | | } |
| | | user.setPac(pac); |
| | | return super.add(newEntity); |
| | | } |
| | | |
| | |
| | | if (!pac.getName().equals(pacPrefix)) { |
| | | throw new HSAdminException("wrong database owner"); |
| | | } |
| | | database.setPac(pac); |
| | | return super.add(newEntity); |
| | | } |
| | | |
| | |
| | | if (pac == null || !pac.isReadAllowedFor(loginUser)) { |
| | | throw new AuthorisationException(loginUser, "add", newEntity); |
| | | } |
| | | user.setPac(pac); |
| | | return super.add(newEntity); |
| | | } |
| | | |
| | |
| | | if (!name.startsWith(pac.getName())) { |
| | | throw new AuthorisationException(loginUser, "add", newEntity); |
| | | } |
| | | alias.setPac(pac); |
| | | return super.add(newEntity); |
| | | } |
| | | |