bug 12001: fixed resource limit check for domain - treat -1 as unlimited

status 12001: resolved fixed
This commit is contained in:
Alena Prokharchyk 2011-12-21 15:13:10 -08:00
parent 8f969846d4
commit 2b37568a87
1 changed files with 1 additions and 1 deletions

View File

@ -378,7 +378,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
Long domainId = account.getDomainId();
while (domainId != null) {
ResourceLimitVO domainLimit = _resourceLimitDao.findByDomainIdAndType(domainId, type);
if (domainLimit != null) {
if (domainLimit != null && domainLimit.getMax().longValue() != -1) {
long domainCount = _resourceCountDao.getDomainCount(domainId, type);
if ((domainCount + numResources) > domainLimit.getMax().longValue()) {
return true;