You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/12/17 23:57:33 UTC

[1/2] git commit: updated refs/heads/master to 6d6d11f

Updated Branches:
  refs/heads/master a71915c03 -> 6d6d11f7a


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

Conflicts:

	server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java


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

Branch: refs/heads/master
Commit: 78e4dd8566b7a088785e7c16bc1395000530e32a
Parents: a71915c
Author: Prachi Damle <pr...@cloud.com>
Authored: Tue Dec 17 12:22:19 2013 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Tue Dec 17 14:55:56 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/78e4dd85/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 21b873b..fce60d2 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -850,7 +850,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/78e4dd85/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 d2699eb..ca2ff42 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -474,7 +474,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
 
         // 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();
 


[2/2] git commit: updated refs/heads/master to 6d6d11f

Posted by pr...@apache.org.
CLOUDSTACK-4852: Since upgrade to 4.2 only users at the zone-attached domain level can manipulate VMs

Changes:
- Removing the trailing spaces in the file


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

Branch: refs/heads/master
Commit: 6d6d11f7a498f3dbf1d0e199d20fb6de6ea065ee
Parents: 78e4dd8
Author: Prachi Damle <pr...@cloud.com>
Authored: Tue Dec 17 14:55:29 2013 -0800
Committer: Prachi Damle <pr...@cloud.com>
Committed: Tue Dec 17 14:55:59 2013 -0800

----------------------------------------------------------------------
 .../orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d6d11f7/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 fce60d2..75ab47b 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -850,7 +850,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
                     }
                 }
 
-                Account owner = _entityMgr.findById(Account.class, vm.getAccountId());              
+                Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
                 VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template, offering, owner, params);
                 DeployDestination dest = null;
                 try {