Update box_ficheinter.php
External user show only is own intervention
This commit is contained in:
parent
9291544e09
commit
a3a6b6dff6
@ -72,8 +72,10 @@ class box_ficheinter extends ModeleBoxes
|
||||
$sql.= ", ".MAIN_DB_PREFIX."fichinter as f";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid ";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
if (! $user->rights->societe->client->voir)
|
||||
if (! $user->rights->societe->client->voir && !$user->societe_id)
|
||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
|
||||
|
||||
$sql.= " ORDER BY f.tms DESC";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user