You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/04/24 18:23:38 UTC

[14/50] [abbrv] git commit: updated refs/heads/internallb to ca2fc30

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 <pr...@citrix.com>
Authored: Mon Apr 22 14:19:38 2013 +0530
Committer: Pranav Saxena <pr...@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");