Fix: droit invalide
This commit is contained in:
parent
406ca23dd1
commit
b376fda6c6
@ -59,7 +59,7 @@ $sql .= " WHERE s.fk_stcomm = st.id AND s.client=1";
|
|||||||
|
|
||||||
if ($socidp) $sql .= " AND s.idp = $socidp";
|
if ($socidp) $sql .= " AND s.idp = $socidp";
|
||||||
if ($user->societe_id) $sql .= " AND s.idp = " .$user->societe_id;
|
if ($user->societe_id) $sql .= " AND s.idp = " .$user->societe_id;
|
||||||
if (!$user->rights->commercial->voir) $sql .= " AND s.idp = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->commercial->client->voir) $sql .= " AND s.idp = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
|
|
||||||
if ($search_nom) $sql .= " AND s.nom like '%".addslashes(strtolower($search_nom))."%'";
|
if ($search_nom) $sql .= " AND s.nom like '%".addslashes(strtolower($search_nom))."%'";
|
||||||
if ($search_ville) $sql .= " AND s.ville like '%".addslashes(strtolower($search_ville))."%'";
|
if ($search_ville) $sql .= " AND s.ville like '%".addslashes(strtolower($search_ville))."%'";
|
||||||
|
|||||||
@ -98,7 +98,7 @@ class modCommercial extends DolibarrModules
|
|||||||
$this->rights[$r][1] = 'Consulter tous les clients';
|
$this->rights[$r][1] = 'Consulter tous les clients';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'main';
|
$this->rights[$r][4] = 'client';
|
||||||
$this->rights[$r][5] = 'voir';
|
$this->rights[$r][5] = 'voir';
|
||||||
$r++;
|
$r++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user