BUG 11980. Change the Administrator User Role to Operator Rol.

On Admin > Users > Roles > choose Operator or Manager Role > Users > Assign Users, click on Administrator from the Available Users List and then assign this to the Assigned Users List, PM allowed you assign the Administrator user to the Operator/Manager Role. Now PM shows a notification popup saying this is not allowed.
This commit is contained in:
jennylee
2013-06-04 13:26:06 -04:00
parent 9bba933e46
commit 5a727de203
2 changed files with 17 additions and 1 deletions

View File

@@ -162,6 +162,12 @@ switch ($REQUEST) {
foreach ($aUserIuds as $key => $val) {
$sData['USR_UID'] = $val;
$sData['ROL_UID'] = $ROL_UID;
if ($sData['USR_UID'] == '00000000000000000000000000000001') {
if ($sData['ROL_UID'] != 'PROCESSMAKER_ADMIN') {
echo '{userRole: true}';
break;
}
}
$RBAC->assignUserToRole( $sData );
}

View File

@@ -753,7 +753,17 @@ SaveUsersRole = function(arr_usr, function_success, function_failure){
Ext.Ajax.request({
url: 'roles_Ajax',
params: {request: 'assignUserToRole', ROL_UID: ROLES.ROL_UID, aUsers: arr_usr.join(',')},
success: function(){
success: function( result, request ){
var data = Ext.util.JSON.decode(result.responseText);
if( data.userRole ) {
Ext.Msg.show({
title: _('ID_WARNING'),
msg: _('ID_ADMINISTRATOR_ROLE_CANT_CHANGED'),
animEl: 'elId',
icon: Ext.MessageBox.WARNING,
buttons: Ext.MessageBox.OK
});
}
viewport.getEl().unmask();
function_success();
},