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
f97b3e5c56
commit
765e46d3a7
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue