diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b3205d3fb4403b6ab2f29766776ab725b8fc2f9e..12d7fcd77ef3bda76e3503623d6bfa12beaeb120 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1915,7 +1915,14 @@ class Societe extends CommonObject } $link.='>'; $linkend='</a>'; - + + global $user; + if (! $user->rights->societe->client->voir && $user->societe_id > 0 && $this->id != $user->societe_id) + { + $link=''; + $linkend=''; + } + if ($withpicto) $result.=($link.img_object(($notooltip?'':$label), 'company', ($notooltip?'':'class="classfortooltip"')).$linkend); if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto != 2) $result.=$link.($maxlen?dol_trunc($name,$maxlen):$name).$linkend;