cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/4.3 to 35afd01
Date Tue, 17 Dec 2013 19:52:44 GMT
Updated Branches:
  refs/heads/4.3 21914937c -> 35afd012f


CLOUDSTACK-4852: Since upgrade to 4.2 only users at the zone-attached domain level can manipulate
VMs

Changes:
- The vmprofile owner passed in to the planner should be the VM's account and not the caller
- Do not do the access check for Root Admin


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35afd012
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35afd012
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35afd012

Branch: refs/heads/4.3
Commit: 35afd012f575a901aa452c2903d2a43e8b4044a5
Parents: 2191493
Author: Prachi Damle <prachi@cloud.com>
Authored: Tue Dec 17 11:17:34 2013 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Tue Dec 17 11:23:21 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java              | 3 ++-
 server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35afd012/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 9537d74..4a5c2cc 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -842,7 +842,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                     }
                 }
 
-                VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template,
offering, account, params);
+                Account owner = _entityMgr.findById(Account.class, vm.getAccountId());  
           
+                VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template,
offering, owner, params);
                 DeployDestination dest = null;
                 try {
                     dest = _dpMgr.planDeployment(vmProfile, plan, avoids);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35afd012/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index b528ae3..65759e0 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -460,12 +460,12 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements
Deploy
         boolean isExplicit = false;
         VirtualMachine vm = vmProfile.getVirtualMachine();
 
+
         // check if zone is dedicated. if yes check if vm owner has acess to it.
         DedicatedResourceVO dedicatedZone = _dedicatedDao.findByZoneId(dc.getId());
-        if (dedicatedZone != null) {
+        if (dedicatedZone != null && !_accountMgr.isRootAdmin(vmProfile.getOwner().getType()))
{
             long accountDomainId = vmProfile.getOwner().getDomainId();
             long accountId = vmProfile.getOwner().getAccountId();
-
             // If a zone is dedicated to an account then all hosts in this zone
             // will be explicitly dedicated to
             // that account. So there won't be any shared hosts in the zone, the


Mime
View raw message