cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject git commit: updated refs/heads/master-6-17-stable to a173130
Date Tue, 02 Jul 2013 17:03:27 GMT
Updated Branches:
  refs/heads/master-6-17-stable df2b3d0ed -> a173130de


CLOUDSTACK-3242: fixed updateTemplate and updateTemplate permissions security checks for project
based templates


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

Branch: refs/heads/master-6-17-stable
Commit: a173130de0e901d06c08bdee9a1effcc7c5dd053
Parents: df2b3d0
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Jun 27 11:31:21 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Tue Jul 2 10:02:29 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/acl/DomainChecker.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a173130d/server/src/com/cloud/acl/DomainChecker.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/acl/DomainChecker.java b/server/src/com/cloud/acl/DomainChecker.java
index c778c50..8b20f3d 100755
--- a/server/src/com/cloud/acl/DomainChecker.java
+++ b/server/src/com/cloud/acl/DomainChecker.java
@@ -19,11 +19,11 @@ package com.cloud.acl;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.springframework.stereotype.Component;
-
 import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.SecurityChecker;
 import org.apache.cloudstack.api.BaseCmd;
+import org.springframework.stereotype.Component;
+
 import com.cloud.dc.DataCenter;
 import com.cloud.domain.Domain;
 import com.cloud.domain.dao.DomainDao;
@@ -95,6 +95,10 @@ public class DomainChecker extends AdapterBase implements SecurityChecker
{
                 if (BaseCmd.isRootAdmin(caller.getType()) || (owner.getId() == caller.getId()))
{
                     return true;
                 }
+                //special handling for the project case
+                if (owner.getType() == Account.ACCOUNT_TYPE_PROJECT && _projectMgr.canAccessProjectAccount(caller,
owner.getId())) {
+                    return true;
+                }
                 
                 // since the current account is not the owner of the template, check the
launch permissions table to see if the
                 // account can launch a VM from this template


Mime
View raw message