From 98f25e958fb334488db03b76c851c4d8490c7364 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Sep 2005 18:02:16 +0000 Subject: [PATCH] Fix: Gestion permission manquante --- htdocs/comm/pre.inc.php | 12 ++++++------ htdocs/commande/pre.inc.php | 3 ++- htdocs/includes/menus/barre_top/default.php | 2 +- htdocs/pre.inc.php | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/pre.inc.php b/htdocs/comm/pre.inc.php index c1c13de1b56..8b76def8c9b 100644 --- a/htdocs/comm/pre.inc.php +++ b/htdocs/comm/pre.inc.php @@ -76,31 +76,31 @@ function llxHeader($head = "", $title = "") $menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics")); } - if ($conf->contrat->enabled) + if ($conf->contrat->enabled && $user->rights->contrat->lire) { $langs->load("contracts"); $menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts")); } - if ($conf->commande->enabled ) + if ($conf->commande->enabled && $user->rights->commande->lire) { $langs->load("orders"); $menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders")); } - if ($user->rights->mailing->lire) + if ($user->mailing->enabled && $user->rights->mailing->lire) { $langs->load("mails"); $menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings")); } - if ($conf->fichinter->enabled ) + if ($conf->fichinter->enabled && $user->rights->ficheinter->lire) { $langs->load("interventions"); $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); } - if ($conf->produit->enabled || $conf->service->enabled) + if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire) { $langs->load("products"); $chaine=""; @@ -110,7 +110,7 @@ function llxHeader($head = "", $title = "") $menu->add(DOL_URL_ROOT."/product/index.php", "$chaine"); } - if ($conf->projet->enabled ) + if ($conf->projet->enabled && $user->rights->projet->lire) { $langs->load("projects"); $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index 6b79f66b155..87caf434353 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -48,7 +48,8 @@ function llxHeader($head = "", $title="", $help_url='') $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); $menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); - if ($conf->expedition->enabled) { + if ($conf->expedition->enabled && $user->rights->expedition->lire) + { $menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings")); } diff --git a/htdocs/includes/menus/barre_top/default.php b/htdocs/includes/menus/barre_top/default.php index 9f8f8a8caf2..3e020ecc85c 100644 --- a/htdocs/includes/menus/barre_top/default.php +++ b/htdocs/includes/menus/barre_top/default.php @@ -94,7 +94,7 @@ class MenuTop { print 'atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").''; // Entrée adherent - if ($conf->adherent->enabled) + if ($conf->adherent->enabled && $user->rights->adherent->lire) { $langs->load("members"); diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index a8be3bb6ff0..f52c7c68bb7 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -56,7 +56,7 @@ function llxHeader($head = "") { $menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts")); } - if ($conf->commercial->enabled && $user->rights->societe->lire) + if ($conf->commercial->enabled && $user->rights->commercial->lire) { $langs->load("commercial"); $menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial")); @@ -71,7 +71,7 @@ function llxHeader($head = "") { } } - if ($conf->compta->enabled && $user->rights->societe->lire) + if ($conf->compta->enabled && $user->rights->general->lire) { $langs->load("compta"); $menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("Accountancy")); @@ -168,7 +168,7 @@ function llxHeader($head = "") { $menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial"); } - if ($conf->bookmark->enabled && $user->rights->mailing->lire) + if ($conf->bookmark->enabled && $user->rights->bookmark->lire) { $menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks")); }