cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [18/50] [abbrv] git commit: updated refs/heads/vmsync to 3c2aa18
Date Thu, 27 Jun 2013 20:57:20 GMT
fix CLOUDSTACK-2989, do not list network offering with specifyvlan=true for non-root-admin
user


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

Branch: refs/heads/vmsync
Commit: 94254e3c2bd38573adac22d0c66817db3cfa1873
Parents: c484d8a
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Wed Jun 26 15:55:13 2013 +0800
Committer: Mice Xia <mice_xia@tcloudcomputing.com>
Committed: Wed Jun 26 15:55:32 2013 +0800

----------------------------------------------------------------------
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94254e3c/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 48728f7..26dc088 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -4519,11 +4519,12 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
         }
 
         // only root admin can list network offering with specifyVlan = true
-        if (specifyVlan != null && caller.getType() == Account.ACCOUNT_TYPE_ADMIN)
{
-            sc.addAnd("specifyVlan", SearchCriteria.Op.EQ, specifyVlan);
-        } else {
+        if(caller.getType() != Account.ACCOUNT_TYPE_ADMIN){
             specifyVlan = false;
         }
+        if (specifyVlan != null) {
+            sc.addAnd("specifyVlan", SearchCriteria.Op.EQ, specifyVlan);
+        } 
 
         if (availability != null) {
             sc.addAnd("availability", SearchCriteria.Op.EQ, availability);


Mime
View raw message