mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1941:Cannot delete users in the default admin account within the UI
This commit is contained in:
parent
987941a5b0
commit
e309a91a9b
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue