Bug 12850: Allow accounts in child domains to create Vms in zones owned by parent domain

Status 12850: resolved fixed
Reviewed-By: Abhi
This commit is contained in:
kishan 2012-01-09 19:32:26 +05:30
parent 89d0e29797
commit 5dc4a70b90
2 changed files with 4 additions and 4 deletions

View File

@ -244,8 +244,8 @@ public class BareMetalVmManagerImpl extends UserVmManagerImpl implements BareMet
if (domain == null) {
throw new CloudRuntimeException("Unable to find the domain " + dc.getDomainId() + " for the zone: " + dc);
}
_accountMgr.checkAccess(caller, domain);
_accountMgr.checkAccess(owner, domain);
_configMgr.checkAccess(caller, dc);
_configMgr.checkAccess(owner, dc);
}
// check if account/domain is with in resource limits to create a new vm

View File

@ -2293,9 +2293,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
throw new CloudRuntimeException("Unable to find the domain " + zone.getDomainId() + " for the zone: " + zone);
}
// check that caller can operate with domain
_accountMgr.checkAccess(caller, domain);
_configMgr.checkAccess(caller, zone);
// check that vm owner can create vm in the domain
_accountMgr.checkAccess(owner, domain);
_configMgr.checkAccess(owner, zone);
}
// check if account/domain is with in resource limits to create a new vm