Fix: Gestion permission manquante
This commit is contained in:
parent
8e5036f5d5
commit
98f25e958f
@ -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>';
|
||||
|
||||
// Entrée 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"));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user