Cho view record nếu record được assign cho group có chứa subordinate của user
Sửa trong list view model hàm getQuery():
- function getQuery() {
- $currentUser = vglobal('current_user');
- $user_record = Users_Record_Model::getInstanceById($currentUser->id,"Users");
- $queryGenerator = $this->get('query_generator');
- $listQuery = $queryGenerator->getQuery();
-
- $listQuery = str_replace( "INNER JOIN vt_tmp_u$currentUser->id","INNER JOIN (select distinct groupid as id from vtiger_users2group where userid in ($user_subordinates)
- union SELECT id from vt_tmp_u$currentUser->id) as ", $listQuery);
- return $listQuery;
- }