From ee6dc038f2724408a0b639750bbc7deca3caf669 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 23 Feb 2012 12:14:47 -0800 Subject: [PATCH] bug 13965 For regular user, don't do list physical networks API call on instance wizard --- ui/scripts/instances.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index f79df3545e9..018d0c57058 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -306,17 +306,19 @@ }); - //get network offerings (begin) *** - $.ajax({ - url: createURL('listPhysicalNetworks'), - data: { - zoneid: args.currentData.zoneid - }, - async: false, - success: function(json) { - physicalNetworkObjs = json.listphysicalnetworksresponse.physicalnetwork; - } - }); + //get network offerings (begin) *** + if (isAdmin()) { + $.ajax({ + url: createURL('listPhysicalNetworks'), + data: { + zoneid: args.currentData.zoneid + }, + async: false, + success: function(json) { + physicalNetworkObjs = json.listphysicalnetworksresponse.physicalnetwork; + } + }); + } var apiCmd = "listNetworkOfferings&guestiptype=Isolated&supportedServices=sourceNat&state=Enabled&specifyvlan=false"; var array1 = [];