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 f97b3e5c56
commit 765e46d3a7
1 changed files with 8 additions and 0 deletions

View File

@ -1659,6 +1659,14 @@ public class ManagementServerImpl implements ManagementServer {
}
} else {
domainId = ((caller == null) ? DomainVO.ROOT_DOMAIN : caller.getDomainId());
if (accountName != null) {
Account userAccount = _accountDao.findAccount(accountName, domainId);
if (userAccount != null) {
permittedAccounts.add(userAccount.getId());
} else {
throw new InvalidParameterValueException("DomainId is not specified. Unable to find account " + accountName + " in default root domain " + domainId);
}
}
}
} else {
permittedAccounts.add(caller.getId());