Merge pull request #23789 from glu000/16.0-issue-23787
Fix #23787 External user can see users from other companies in agenda view per user
This commit is contained in:
commit
60c750885f
@ -915,6 +915,10 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
||||
if ($usergroup > 0) {
|
||||
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
// External users should see only contacts of their company
|
||||
$sql .= " AND u.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user