Skip to content
Snippets Groups Projects
Commit 98f25e95 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Gestion permission manquante

parent 8e5036f5
No related branches found
No related tags found
No related merge requests found
......@@ -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"));
......
......@@ -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"));
}
......
......@@ -94,7 +94,7 @@ class MenuTop {
print '<a class="tmenu" '.($id?'id="'.$id.'" ':'').'href="'.DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").'</a>';
// Entre adherent
if ($conf->adherent->enabled)
if ($conf->adherent->enabled && $user->rights->adherent->lire)
{
$langs->load("members");
......
......@@ -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"));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment