You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/08/16 00:00:43 UTC

git commit: cloudstack 3.0 UI - Instances page - VM Wizard - select network step - VPC filter - list only VPCs belonging to the current login (i.e. If the current login is root-admin, do not show VPCs belonging to regular-user/domain-admin in Instances p

Updated Branches:
  refs/heads/master 4b3af0c96 -> ccf99beae


cloudstack 3.0 UI - Instances page - VM Wizard - select network step - VPC filter - list only VPCs belonging to the current login (i.e. If the current login is root-admin, do not show VPCs belonging to regular-user/domain-admin in Instances page's VM Wizard.)


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

Branch: refs/heads/master
Commit: ccf99beaed02df497e9576d9796431b3d8160b94
Parents: 4b3af0c
Author: Jessica Wang <je...@citrix.com>
Authored: Wed Aug 15 14:58:20 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Aug 15 15:00:26 2012 -0700

----------------------------------------------------------------------
 ui/scripts/instanceWizard.js |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ccf99bea/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 31025a0..5e4423f 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -322,12 +322,10 @@
 
         var networkObjs, vpcObjs;
 
-        // Get VPCs
+        //listVPCs without account/domainid/listAll parameter will return only VPCs belonging to the current login. That's what should happen in Instances page's VM Wizard. 
+				//i.e. If the current login is root-admin, do not show VPCs belonging to regular-user/domain-admin in Instances page's VM Wizard. 
         $.ajax({
-          url: createURL('listVPCs'),
-          data: isDomainAdmin() ?
-            { account: args.context.users[0].account, domainid: args.context.users[0].domainid } :
-            { listAll: true },
+          url: createURL('listVPCs'), 
           async: false,
           success: function(json) {
             vpcObjs = json.listvpcsresponse.vpc ? json.listvpcsresponse.vpc : [];