mirror of https://github.com/apache/cloudstack.git
bug 11770: throw error when account is not found in default root domain
status 11770: resolved fixed
This commit is contained in:
parent
48c1044ebe
commit
daa7d41650
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue