Merge pull request #2280 from norahmollo/BUG-14066
BUG-14066 Admin users are able to switch the interface.
This commit is contained in:
@@ -443,6 +443,7 @@ try {
|
||||
} catch (exception $oError) {
|
||||
$uRole['ROL_NAME'] = G::loadTranslation( 'ID_DELETED' );
|
||||
}
|
||||
$row['USR_ROLE_ID'] = $row['USR_ROLE'];
|
||||
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['USR_ROLE']) : $uRole['USR_ROLE'];
|
||||
$row['DUE_DATE_OK'] = (date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE']))) ? 0 : 1;
|
||||
$row['LAST_LOGIN'] = isset($aLogin[$row['USR_UID']]) ? $aLogin[$row['USR_UID']] : '';
|
||||
@@ -450,7 +451,7 @@ try {
|
||||
$row['DEP_TITLE'] = isset($aDepart[$row['USR_UID']]) ? $aDepart[$row['USR_UID']] : '';
|
||||
$row['USR_UX'] = isset($uxList[$row['USR_UX']]) ? $uxList[$row['USR_UX']] : $uxList['NORMAL'];
|
||||
$row['USR_AUTH_SOURCE'] = isset($aAuthSources[$row['USR_UID']]) ? $aAuthSources[$row['USR_UID']] : 'ProcessMaker (MYSQL)';
|
||||
|
||||
|
||||
$rows[] = $row;
|
||||
}
|
||||
echo '{users: ' . G::json_encode($rows) . ', total_users: ' . $totalRows . '}';
|
||||
|
||||
@@ -78,6 +78,7 @@ Ext.onReady(function(){
|
||||
{name : 'USR_LASTNAME'},
|
||||
{name : 'USR_EMAIL'},
|
||||
{name : 'USR_ROLE'},
|
||||
{name : 'USR_ROLE_ID'},
|
||||
{name : 'USR_DUE_DATE'},
|
||||
{name : 'DEP_TITLE'},
|
||||
{name : 'LAST_LOGIN'},
|
||||
@@ -153,6 +154,7 @@ Ext.onReady(function(){
|
||||
//{header: '', dataIndex: 'USR_UID', width: 30, align:'center', sortable: false, renderer: photo_user},
|
||||
{header: _('ID_USER_NAME'), dataIndex: 'USR_USERNAME', width: 90, hidden:false, align:'left'},
|
||||
{header: _('ID_FULL_NAME'), dataIndex: 'USR_USERNAME', width: 50, align:'left', renderer: full_name},
|
||||
{id: 'USR_ROLE_ID', dataIndex: 'USR_ROLE_ID', hidden:true},
|
||||
{header: _('ID_ROLE'), dataIndex: 'USR_ROLE', width: 50, hidden:false, align:'left'},
|
||||
{header: _('ID_STATUS'), dataIndex: 'USR_STATUS', width: 50, hidden: true, align: 'center', renderer: render_status},
|
||||
{
|
||||
@@ -174,8 +176,8 @@ Ext.onReady(function(){
|
||||
listeners: {
|
||||
select: function(a, b) {
|
||||
var row = usersGrid.getSelectionModel().getSelected();
|
||||
role = row.get('USR_ROLE');
|
||||
|
||||
role = row.get('USR_ROLE_ID');
|
||||
|
||||
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