mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Force the sales representative if they don't have permissions
Force the sales representative if they don't have permissions
This commit is contained in:
parent
4e86e65624
commit
5398ba8223
|
|
@ -611,6 +611,11 @@ $sql .= " WHERE s.entity IN (".getEntity('societe').")";
|
|||
if (!$user->hasRight('fournisseur', 'lire')) {
|
||||
$sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible
|
||||
}
|
||||
|
||||
//Force the sales representative if they don't have permissions
|
||||
if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
|
||||
$search_sale = $user->id;
|
||||
}
|
||||
// Search on sale representative
|
||||
if (!empty($search_sale) && $search_sale != '-1') {
|
||||
$search_sale_req = array_filter($search_sale, function (string $value): bool {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user