Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-06-06 17:14:34

comsec
Member
From: Bulgaria, Stara Zagora
Registered: 2015-06-04
Posts: 3
Website

FIXED : Desktop client show online visitors from all departments

Hello, sorry about my bad English ...
I have installed last web version of LHC and last desktop client QT5 and i have 2 departments each with 2 operators
Each ot operators in one department can see only online visitors from its own department and identificator in web backend, but in desktop client all operators can see all online visitors from all departments.
All other functions working perfect, just this little bug.

2 hours latter ....
I fix it editing modules/lhxml/lists.php file. Lines 20 to 23 i replaced with this code:

/**
* Append user departments filter
* */
$departmentParams = array();
$onlineUsers = array();
$userDepartments = erLhcoreClassUserDep::parseUserDepartmetnsForFilter($currentUser->getUserID());
if ($userDepartments !== true){
    $departmentParams['filterin']['id'] = $userDepartments;   
    if (!$currentUser->hasAccessTo('lhchat','sees_all_online_visitors')) {
        $filter['filterin']['dep_id'] = $userDepartments;
        $onlineUsers = erLhcoreClassModelChatOnlineUser::getList($filter);
    }
} elseif($currentUser->hasAccessTo('lhchat','use_onlineusers')){
        $departmentParams['filterin']['id'] = $userDepartments;
        $filter['filterin']['dep_id'] = $userDepartments;
        $onlineUsers = erLhcoreClassModelChatOnlineUser::getList($filter);
} else {
        $onlineUsers = erLhcoreClassModelChatOnlineUser::getList();
}

/**
* END Append user departments filter
* */

In my desktop client now all lists shown fine and correct.
Please check my code for errors and if is OK, add this change to next release.

Last edited by comsec (2015-06-06 19:16:59)


Comsec PC Service - Web software for service centres

Offline

#2 2015-06-07 18:35:30

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: FIXED : Desktop client show online visitors from all departments

Offline

Board footer