Fix: Permissions manquantes
This commit is contained in:
parent
37a757d02e
commit
810f8c66ea
@ -35,7 +35,7 @@ class box_services_vendus extends ModeleBoxes {
|
||||
var $boxcode="lastproductsincontract";
|
||||
var $boximg="object_product";
|
||||
var $boxlabel;
|
||||
var $depends = array("produit");
|
||||
var $depends = array("produit","service");
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
@ -62,7 +62,7 @@ class box_services_vendus extends ModeleBoxes {
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxLastProductsInContract",$max));
|
||||
|
||||
if ($user->rights->produit->lire)
|
||||
if ($user->rights->produit->lire && $user->rights->contrat->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.idp, c.rowid, cd.rowid as cdid, p.rowid as pid, p.label, p.fk_product_type";
|
||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
|
||||
@ -84,8 +84,6 @@ class modProduit extends DolibarrModules
|
||||
$this->boxes = array();
|
||||
$this->boxes[0][0] = "Derniers produits/services enregistrés";
|
||||
$this->boxes[0][1] = "box_produits.php";
|
||||
$this->boxes[1][0] = "Derniers produits/services vendus";
|
||||
$this->boxes[1][1] = "box_services_vendus.php";
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
|
||||
@ -72,10 +72,8 @@ class modService extends DolibarrModules
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
$this->boxes[0][0] = "Derniers produits/services enregistrés";
|
||||
$this->boxes[0][1] = "box_produits.php";
|
||||
$this->boxes[1][0] = "Derniers produits/services vendus";
|
||||
$this->boxes[1][1] = "box_services_vendus.php";
|
||||
$this->boxes[0][0] = "Derniers services contractés";
|
||||
$this->boxes[0][1] = "box_services_vendus.php";
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user