mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-109: cloudstack UI - (1) account page: fix a bug that system-generated default admin account wrongly had enalbe/disable/lock/remove option. (2) user page - fix a bug that system-generated default admin account user wrongly had enable/disable/remove option.
This commit is contained in:
parent
fe4cd5ecd0
commit
309be015ce
|
|
@ -19,12 +19,6 @@
|
|||
var domainObjs;
|
||||
var rootDomainId;
|
||||
|
||||
var systemAccountId = 1;
|
||||
var adminAccountId = 2;
|
||||
|
||||
var systemUserId = 1;
|
||||
var adminUserId = 2;
|
||||
|
||||
cloudStack.sections.accounts = {
|
||||
title: 'label.accounts',
|
||||
id: 'accounts',
|
||||
|
|
@ -1097,7 +1091,7 @@
|
|||
if (jsonObj.state == 'Destroyed') return [];
|
||||
|
||||
if(isAdmin()) {
|
||||
if(jsonObj.id != systemAccountId && jsonObj.id != adminAccountId) {
|
||||
if(!(jsonObj.domain == "ROOT" && jsonObj.name == "admin" && jsonObj.accounttype == 1)) { //if not system-generated default admin account
|
||||
//allowedActions.push("edit");
|
||||
if (jsonObj.accounttype == roleTypeUser || jsonObj.accounttype == roleTypeDomainAdmin) {
|
||||
//allowedActions.push("updateResourceLimits");
|
||||
|
|
@ -1127,7 +1121,7 @@
|
|||
allowedActions.push("edit");
|
||||
allowedActions.push("changePassword");
|
||||
allowedActions.push("generateKeys");
|
||||
if(jsonObj.id != systemUserId && jsonObj.id != adminUserId) {
|
||||
if(!(jsonObj.domain == "ROOT" && jsonObj.account == "admin" && jsonObj.accounttype == 1)) { //if not system-generated default admin account user
|
||||
if(jsonObj.state == "enabled")
|
||||
allowedActions.push("disable");
|
||||
if(jsonObj.state == "disabled")
|
||||
|
|
|
|||
Loading…
Reference in New Issue