From 13fd9c97742049b1138386f1da1d119575beaa21 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 16 Jul 2012 16:00:53 -0700 Subject: [PATCH] cloudstack 3.0 UI - VPC - private gateway - only root-admin is allowed to delete a private gateway. --- ui/scripts/vpc.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index f411d1108a0..ac101afc2e4 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -561,7 +561,16 @@ }, success: function(json) { var item = json.listprivategatewaysresponse.privategateway[0]; - args.response.success({ data: item }); + args.response.success({ + data: item, + actionFilter: function(args) { + var allowedActions = []; + if(isAdmin()) { + allowedActions.push("remove"); + } + return allowedActions; + } + }); } }); }