From d7cbb598c12283d1d937a17089349510258eff4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Jun 2017 14:30:00 +0200 Subject: [PATCH] Fix permission for external users --- htdocs/core/boxes/box_clients.php | 2 +- htdocs/core/boxes/box_fournisseurs.php | 2 +- htdocs/core/boxes/box_prospect.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index e6cd2ede39e..5ef627e1ced 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -59,7 +59,7 @@ class box_clients extends ModeleBoxes // disable box for such cases if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option - $this->hidden = ! ($user->rights->societe->lire); + $this->hidden = ! ($user->rights->societe->lire && empty($user->socid)); } /** diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index bac582a4534..d9d41fd3d4f 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -55,7 +55,7 @@ class box_fournisseurs extends ModeleBoxes $this->db=$db; - $this->hidden=! ($user->rights->societe->lire); + $this->hidden=! ($user->rights->societe->lire && empty($user->socid)); } /** diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 098ea813e44..d3b24782d83 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -61,7 +61,7 @@ class box_prospect extends ModeleBoxes // disable box for such cases if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option - $this->hidden=! ($user->rights->societe->lire); + $this->hidden=! ($user->rights->societe->lire && empty($user->socid)); } /**