bug 13290: fixed listNetworks for the domain admin in Basic zone

status 13290: resolved fixed
This commit is contained in:
Alena Prokharchyk 2012-01-30 13:45:08 -08:00
parent c6a3a63f1f
commit 1b54901caa
1 changed files with 5 additions and 1 deletions

View File

@ -2513,6 +2513,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
permittedAccounts.add(caller.getId());
domainId = caller.getDomainId();
}
if (caller.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) {
domainId = caller.getDomainId();
}
//set project information
boolean skipProjectNetworks = true;
@ -2576,7 +2580,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
if (!permittedAccounts.isEmpty()) {
networksToReturn.addAll(listAccountSpecificNetworks(buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges), searchFilter, permittedAccounts));
} else if (domainId == null){
} else if (domainId == null || listAll){
networksToReturn.addAll(listAccountSpecificNetworksByDomainPath(buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges), searchFilter, path, isRecursive));
}
} else {