bug 7553: Virtual Router service offering

This commit is contained in:
Abhinandan Prateek 2011-05-20 11:22:30 +05:30
parent 1305a95efa
commit 7bb1d00d14

View File

@ -1005,12 +1005,13 @@ public class ManagementServerImpl implements ManagementServer {
Object keyword = cmd.getKeyword();
Long vmId = cmd.getVirtualMachineId();
Long domainId = cmd.getDomainId();
Boolean issystem = cmd.getIsSystem();
// Keeping this logic consistent with domain specific zones
// if a domainId is provided, we just return the so associated with this domain
if (domainId != null) {
if (account.getType() == Account.ACCOUNT_TYPE_ADMIN) {
return _offeringsDao.findServiceOfferingByDomainId(domainId);// no perm check
return _offeringsDao.findServiceOfferingByDomainIdAndIsSystem(domainId, issystem);// no perm check
} else {
// check if the user's domain == so's domain || user's domain is a child of so's domain
if (isPermissible(account.getDomainId(), domainId)) {