From 99c28a58f687578b457b1a6b9bfd04a6089c8a6a Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 11 Jul 2012 16:26:57 -0700 Subject: [PATCH] cloudstack 3.0 UI - VPC - gateways - regular user and domain admin are not allowed to Add Gateway. --- ui/scripts/vpc.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index d21ddce55f6..35a753f3f24 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -433,7 +433,13 @@ }, actions: { add: { - label: 'Add new gateway', + label: 'Add new gateway', + preFilter: function(args) { + if(isAdmin()) + return true; + else + return false; + }, createForm: { title: 'Add new gateway', desc: 'Please specify the information to add a new gateway to this VPC.',