BUG 8919 La opción "user experience" se puede aplicar al usuario Admin SOLVED
- en la pestaña de grupos, si admitia asignar "Simplified" en "User Experience" a grupos que tienen algun usuario administrador - se añadio un case que filtre esos usuarios.
This commit is contained in:
@@ -150,6 +150,28 @@ try {
|
|||||||
echo $aValues['USR_FIRSTNAME'] . ' ' . $aValues['USR_LASTNAME'] . '<br>';
|
echo $aValues['USR_FIRSTNAME'] . ' ' . $aValues['USR_LASTNAME'] . '<br>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
//This case is used to check if any of the user group has as role 'PROCESSMAKER_ADMIN',
|
||||||
|
case 'usersAdminGroupExtJS':
|
||||||
|
G::LoadClass('groups');
|
||||||
|
$oGroup = new Groups();
|
||||||
|
$aGroup = $oGroup->getUsersOfGroup($_POST['GRP_UID']);
|
||||||
|
$responseUser = 'false';
|
||||||
|
$usersAdmin = '';
|
||||||
|
foreach ($aGroup as $iIndex => $aValues) {
|
||||||
|
if ($aValues['USR_ROLE'] == 'PROCESSMAKER_ADMIN') {
|
||||||
|
$responseUser = 'true';
|
||||||
|
$usersAdmin .= $aValues['USR_FIRSTNAME'] . ' ' . $aValues['USR_LASTNAME'].', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$usersAdmin = substr($usersAdmin, 0, -2);
|
||||||
|
|
||||||
|
$result = new stdClass();
|
||||||
|
$result->reponse = $responseUser;
|
||||||
|
$result->users = $usersAdmin;
|
||||||
|
|
||||||
|
echo G::json_encode($result);
|
||||||
|
break;
|
||||||
case 'canDeleteUser':
|
case 'canDeleteUser':
|
||||||
G::LoadClass('case');
|
G::LoadClass('case');
|
||||||
$oProcessMap = new Cases();
|
$oProcessMap = new Cases();
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ Ext.onReady(function(){
|
|||||||
editor: new Ext.form.ComboBox({
|
editor: new Ext.form.ComboBox({
|
||||||
listClass: 'x-combo-list-small',
|
listClass: 'x-combo-list-small',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
|
id:'GRP_UXCombo',
|
||||||
displayField:'name',
|
displayField:'name',
|
||||||
lazyRender: true,
|
lazyRender: true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
@@ -287,30 +288,21 @@ Ext.onReady(function(){
|
|||||||
data : uxTypes
|
data : uxTypes
|
||||||
}),
|
}),
|
||||||
listeners: {
|
listeners: {
|
||||||
select: function(a, b) {
|
select: function(a, b) {
|
||||||
var nameGroup = groupsGrid.getSelectionModel().selection['record'].data['CON_VALUE'];
|
var uidGroup = groupsGrid.getSelectionModel().selection['record'].data['GRP_UID'];
|
||||||
var uidGroup = groupsGrid.getSelectionModel().selection['record'].data['GRP_UID'];
|
|
||||||
|
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: '../users/users_Ajax?function=usersGroupAllFieldsExtJS',
|
url: '../users/users_Ajax?function=usersAdminGroupExtJS',
|
||||||
params: { GRP_UID: uidGroup },
|
params: { GRP_UID: uidGroup },
|
||||||
success: function(result, request) {
|
success: function(result, request) {
|
||||||
var res = Ext.decode(result.responseText);
|
var res = Ext.decode(result.responseText);
|
||||||
|
if ((res.reponse == 'true') && (Ext.getCmp('GRP_UXCombo').getValue()!='SWITCHABLE') && (Ext.getCmp('GRP_UXCombo').getValue()!='NORMAL')) {
|
||||||
console.log(res.data);
|
PMExt.warning(_('ID_WARNING'), _('ID_ADMINS_CANT_USE_UXS')+'<br/> <b>'+_('ID_USERS_LIST')+':</b> '+res.users);
|
||||||
|
Ext.getCmp('GRP_UXCombo').setValue('NORMAL');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*var row = usersGrid.getSelectionModel().getSelected();
|
|
||||||
role = row.get('USR_ROLE');
|
|
||||||
|
|
||||||
if (role == 'PROCESSMAKER_ADMIN' && (this.value == 'SIMPLIFIED' || this.value == 'SINGLE')) {
|
|
||||||
PMExt.warning(_('ID_WARNING'), _('ID_ADMINS_CANT_USE_UXS'));
|
|
||||||
this.setValue('NORMAL');
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user