cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [14/50] [abbrv] git commit: updated refs/heads/internallb to ca2fc30
Date Wed, 24 Apr 2013 16:23:38 GMT
CLOUDSTACK-1941:Cannot delete users in the default admin account within the UI


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e309a91a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e309a91a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e309a91a

Branch: refs/heads/internallb
Commit: e309a91a9b2f439cf9c35b9dcbd79889f4a72504
Parents: 987941a
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Mon Apr 22 14:19:38 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Mon Apr 22 14:19:38 2013 +0530

----------------------------------------------------------------------
 ui/scripts/accounts.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e309a91a/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index 8353d70..7e82c0f 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -1372,6 +1372,9 @@
 
     if (jsonObj.state == 'Destroyed') return [];
 
+    if( isAdmin() && jsonObj.isdefault == false)
+       allowedActions.push("remove");
+
     if(isAdmin()) {
         allowedActions.push("edit"); //updating networkdomain is allowed on any account,
including system-generated default admin account 
         if(!(jsonObj.domain == "ROOT" && jsonObj.name == "admin" && jsonObj.accounttype
== 1)) { //if not system-generated default admin account    
@@ -1393,6 +1396,10 @@
   var userActionfilter = function(args) {
     var jsonObj = args.context.item;
     var allowedActions = [];
+   
+    if( isAdmin() && jsonObj.isdefault == false)
+       allowedActions.push("remove");
+
     if(isAdmin()) {
       allowedActions.push("edit");
       allowedActions.push("changePassword");


Mime
View raw message