fix error in adding new object with hostmaster privileges
This commit is contained in:
parent
6b27737db6
commit
3419f107df
@ -54,6 +54,7 @@ public class MySqlDatabaseModuleImpl extends AbstractModuleImpl {
|
|||||||
if (!pac.getName().equals(pacPrefix)) {
|
if (!pac.getName().equals(pacPrefix)) {
|
||||||
throw new HSAdminException("wrong database owner");
|
throw new HSAdminException("wrong database owner");
|
||||||
}
|
}
|
||||||
|
database.setPac(pac);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ public class MySqlUserModuleImpl extends AbstractModuleImpl {
|
|||||||
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
|
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
|
||||||
throw new AuthorisationException(loginUser, "add", newEntity);
|
throw new AuthorisationException(loginUser, "add", newEntity);
|
||||||
}
|
}
|
||||||
|
user.setPac(pac);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ public class PgSqlDatabaseModuleImpl extends AbstractModuleImpl {
|
|||||||
if (!pac.getName().equals(pacPrefix)) {
|
if (!pac.getName().equals(pacPrefix)) {
|
||||||
throw new HSAdminException("wrong database owner");
|
throw new HSAdminException("wrong database owner");
|
||||||
}
|
}
|
||||||
|
database.setPac(pac);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ public class PgSqlUserModuleImpl extends AbstractModuleImpl {
|
|||||||
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
|
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
|
||||||
throw new AuthorisationException(loginUser, "add", newEntity);
|
throw new AuthorisationException(loginUser, "add", newEntity);
|
||||||
}
|
}
|
||||||
|
user.setPac(pac);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ public class EMailAliasModuleImpl extends AbstractModuleImpl {
|
|||||||
if (!name.startsWith(pac.getName())) {
|
if (!name.startsWith(pac.getName())) {
|
||||||
throw new AuthorisationException(loginUser, "add", newEntity);
|
throw new AuthorisationException(loginUser, "add", newEntity);
|
||||||
}
|
}
|
||||||
|
alias.setPac(pac);
|
||||||
return super.add(newEntity);
|
return super.add(newEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user