From 4597cd44e55ac484a7f6c0a0de9b4d5211b4bc6c Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 20 Sep 2018 17:52:44 +0200 Subject: [PATCH] FIX #9432 --- htdocs/societe/card.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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