CLOUDSTACK-1054: When calling listDomains through the API do not restrict ADMIN users

When an admin calls this command without the ID parameter do not set the domain's ID
to the ID where the admin is in, this prevents him from doing lookups.
This commit is contained in:
Wido den Hollander 2013-01-25 14:45:08 +01:00
parent 1906f480d1
commit 301c4413bc
1 changed files with 3 additions and 1 deletions

View File

@ -368,7 +368,9 @@ public class DomainManagerImpl implements DomainManager, DomainService, Manager
}
_accountMgr.checkAccess(caller, domain);
} else {
domainId = caller.getDomainId();
if (caller.getType() != Account.ACCOUNT_TYPE_ADMIN) {
domainId = caller.getDomainId();
}
if (listAll) {
isRecursive = true;
}