diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index e1f257cbf8f..ba2e92fe573 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -535,12 +535,13 @@ if (empty($reshook)) } // Links with users - $salesreps = GETPOST('commercial', 'array'); - $result = $object->setSalesRep($salesreps); - if ($result < 0) - { - $error++; - setEventMessages($object->error, $object->errors, 'errors'); + if (!empty($user->rights->societe->client->voir)) { + $salesreps = GETPOST('commercial', 'array'); + $result = $object->setSalesRep($salesreps); + if ($result < 0) { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + } } // Customer categories association