bug 11770: throw error when account is not found in default root domain

status 11770: resolved fixed
This commit is contained in:
kishan 2011-11-02 15:11:47 +05:30
parent 48c1044ebe
commit daa7d41650
1 changed files with 8 additions and 0 deletions

View File

@ -2106,6 +2106,14 @@ public class ManagementServerImpl implements ManagementServer {
}
} else {
domainId = ((account == null) ? DomainVO.ROOT_DOMAIN : account.getDomainId());
if (accountName != null) {
Account userAccount = _accountDao.findAccount(accountName, domainId);
if (userAccount != null) {
accountId = userAccount.getId();
} else {
throw new InvalidParameterValueException("Unable to find account " + accountName + " in domain " + domainId);
}
}
}
} else {
accountId = account.getId();