Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
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
It's done but in my way.
https://github.com/LiveHelperChat/liveh … f283d76beb
Offline