fix user multioption test
This commit is contained in:
parent
3605f0da4b
commit
1db36a61f1
@ -135,11 +135,11 @@ public class UnixUserModuleImpl extends AbstractModuleImpl {
|
|||||||
throw new HSAdminException("not allowed for this packet type");
|
throw new HSAdminException("not allowed for this packet type");
|
||||||
}
|
}
|
||||||
//TODO: Needs better implementation
|
//TODO: Needs better implementation
|
||||||
Query qUnixUsers = em.createQuery("SELECT obj FROM UnixUsers obj WHERE obj.id = :pacId");
|
Query qUnixUsers = em.createQuery("SELECT obj FROM UnixUsers obj WHERE obj.pac.id = :pacId");
|
||||||
qUnixUsers.setParameter("pacId", pac.getId());
|
qUnixUsers.setParameter("pacId", pac.getId());
|
||||||
if (qUnixUsers.getResultList().size() >= MultiOption.UNIXUSERS_PER_OPTION * pac.getQuantityByComponentName("MULTI")) {
|
if (qUnixUsers.getResultList().size() >= MultiOption.UNIXUSERS_PER_OPTION * pac.getQuantityByComponentName("MULTI")) {
|
||||||
throw new HSAdminException("included unix users exceeded");
|
throw new HSAdminException("included unix users exceeded");
|
||||||
}
|
}
|
||||||
// don't move this up, it will update the new entity still with wrong
|
// don't move this up, it will update the new entity still with wrong
|
||||||
// userid!
|
// userid!
|
||||||
newUnixUser.setPac(pac);
|
newUnixUser.setPac(pac);
|
||||||
|
Loading…
Reference in New Issue
Block a user