fix error in adding new object with hostmaster privileges

This commit is contained in:
Peter Hormanns 2013-01-21 13:41:01 +01:00
parent 6b27737db6
commit 3419f107df
5 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,7 @@ public class MySqlDatabaseModuleImpl extends AbstractModuleImpl {
if (!pac.getName().equals(pacPrefix)) {
throw new HSAdminException("wrong database owner");
}
database.setPac(pac);
return super.add(newEntity);
}

View File

@ -35,6 +35,7 @@ public class MySqlUserModuleImpl extends AbstractModuleImpl {
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
throw new AuthorisationException(loginUser, "add", newEntity);
}
user.setPac(pac);
return super.add(newEntity);
}

View File

@ -52,6 +52,7 @@ public class PgSqlDatabaseModuleImpl extends AbstractModuleImpl {
if (!pac.getName().equals(pacPrefix)) {
throw new HSAdminException("wrong database owner");
}
database.setPac(pac);
return super.add(newEntity);
}

View File

@ -30,6 +30,7 @@ public class PgSqlUserModuleImpl extends AbstractModuleImpl {
if (pac == null || !pac.isReadAllowedFor(loginUser)) {
throw new AuthorisationException(loginUser, "add", newEntity);
}
user.setPac(pac);
return super.add(newEntity);
}

View File

@ -44,6 +44,7 @@ public class EMailAliasModuleImpl extends AbstractModuleImpl {
if (!name.startsWith(pac.getName())) {
throw new AuthorisationException(loginUser, "add", newEntity);
}
alias.setPac(pac);
return super.add(newEntity);
}