Skip to content

Commit

Permalink
Force the sales representative if they don't have permissions
Browse files Browse the repository at this point in the history
Force the sales representative if they don't have permissions
  • Loading branch information
joseplluis authored and eldy committed Dec 31, 2024
1 parent 1e0479d commit f91aadf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions htdocs/societe/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@
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 ($search_sale && $search_sale != '-1') {
if ($search_sale == -2) {
Expand Down

1 comment on commit f91aadf

@PascalB67
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you
The problem is fixed. (Dolibarr 20.02)

Please sign in to comment.