From 61c543fe50e487dc9582ecdbc5e2010abc139316 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 4 Jan 2012 16:17:01 -0800 Subject: [PATCH] bug 12645: cloudstack 3.0 new UI - account page - show add button only when it's root admin. Hide it otherwise. --- ui/scripts/accounts.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index b850c586a3c..ade413a662e 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -39,7 +39,12 @@ actions: { add: { label: 'Create account', - + preFilter: function(args) { + if(isAdmin()) + return true; + else + return false; + }, messages: { confirm: function(args) { return 'Are you sure you want to create an account?';