From ec24f223b5f137c30ea1f1672f64c60ce75bf9a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Jun 2017 12:55:57 +0200 Subject: [PATCH] Fix permission on widget --- htdocs/core/boxes/box_produits_alerte_stock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 8a6044583d5..50a4abd320a 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -64,7 +64,7 @@ class box_produits_alerte_stock extends ModeleBoxes $this->info_box_head = array('text' => $langs->trans("BoxTitleProductsAlertStock",$max)); - if ($user->rights->produit->lire || $user->rights->service->lire) + if (($user->rights->produit->lire || $user->rights->service->lire) && $user->rights->stock->lire) { $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte, p.entity,"; $sql.= " SUM(".$db->ifsql("s.reel IS NULL","0","s.reel").") as total_stock";