From ccf99beaed02df497e9576d9796431b3d8160b94 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 15 Aug 2012 14:58:20 -0700 Subject: [PATCH] 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.) --- ui/scripts/instanceWizard.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index 31025a0d822..5e4423fbf59 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 : [];