BUG-10123 The Default Administrator User could change its ROLE.

I added a validation in SaveUser function, in file 'workflow/engine/templates/users/users.js', to prevent modify the Role of the Default Administrator User.
This commit is contained in:
jennylee
2012-11-30 16:39:17 -04:00
parent 4bd22eeafe
commit 76bdb93f02

View File

@@ -1043,6 +1043,14 @@ function saveUser()
return false;
}
}
if (USR_UID == '00000000000000000000000000000001') {
if (Ext.getCmp('USR_ROLE').getValue() != 'PROCESSMAKER_ADMIN') {
Ext.Msg.alert( _('ID_ERROR'), 'The Role of this user must be PROCESSMAKER_ADMIN, because this is the default Administrator User.');
return false;
}
}
} else {
Ext.Msg.alert( _('ID_ERROR'), _('ID_MSG_ERROR_USR_USERNAME'));
return false;