From 365be7242dffdeb4181fe2b318a5769958a8310a Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 12 Sep 2005 13:35:43 +0000 Subject: [PATCH] Modif permissions --- htdocs/telephonie/client/pre.inc.php | 3 ++- htdocs/telephonie/contrat/pre.inc.php | 3 ++- htdocs/telephonie/distributeurs/pre.inc.php | 3 ++- htdocs/telephonie/facture/index.php | 7 +++---- htdocs/telephonie/facture/liste.php | 1 + htdocs/telephonie/ligne/pre.inc.php | 3 ++- htdocs/telephonie/ligne/stat.php | 13 ++++++++----- htdocs/telephonie/pre.inc.php | 3 ++- htdocs/telephonie/tarifs/pre.inc.php | 3 ++- 9 files changed, 24 insertions(+), 15 deletions(-) diff --git a/htdocs/telephonie/client/pre.inc.php b/htdocs/telephonie/client/pre.inc.php index 50c23356fcd..9e18a821639 100644 --- a/htdocs/telephonie/client/pre.inc.php +++ b/htdocs/telephonie/client/pre.inc.php @@ -59,7 +59,8 @@ function llxHeader($head = "", $title="") { if ($user->rights->telephonie->stats->lire) $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques"); - $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); diff --git a/htdocs/telephonie/contrat/pre.inc.php b/htdocs/telephonie/contrat/pre.inc.php index e50d30f6341..a886a8f762f 100644 --- a/htdocs/telephonie/contrat/pre.inc.php +++ b/htdocs/telephonie/contrat/pre.inc.php @@ -60,7 +60,8 @@ function llxHeader($head = "", $title="") { if ($user->rights->telephonie->stats->lire) $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques"); - $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); diff --git a/htdocs/telephonie/distributeurs/pre.inc.php b/htdocs/telephonie/distributeurs/pre.inc.php index dea1f532f17..c8f09de892b 100644 --- a/htdocs/telephonie/distributeurs/pre.inc.php +++ b/htdocs/telephonie/distributeurs/pre.inc.php @@ -70,7 +70,8 @@ function llxHeader($head = "", $title="") { if ($user->rights->telephonie->ligne_commander) $menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes"); - $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); if ($user->rights->telephonie->stats->lire) { diff --git a/htdocs/telephonie/facture/index.php b/htdocs/telephonie/facture/index.php index 3d9d3964c9c..afcbc5e2110 100644 --- a/htdocs/telephonie/facture/index.php +++ b/htdocs/telephonie/facture/index.php @@ -21,13 +21,12 @@ */ require("./pre.inc.php"); +if (!$user->rights->telephonie->facture->lire) accessforbidden(); + $page = $_GET["page"]; $sortorder = $_GET["sortorder"]; -if (!$user->rights->telephonie->lire) - accessforbidden(); - -llxHeader('','Telephonie'); +llxHeader('','Telephonie - Factures'); /* * Sécurité accés client diff --git a/htdocs/telephonie/facture/liste.php b/htdocs/telephonie/facture/liste.php index 9ff641222c5..ff7784d8488 100644 --- a/htdocs/telephonie/facture/liste.php +++ b/htdocs/telephonie/facture/liste.php @@ -21,6 +21,7 @@ */ require("./pre.inc.php"); +if (!$user->rights->telephonie->facture->lire) accessforbidden(); $page = $_GET["page"]; $sortorder = $_GET["sortorder"]; diff --git a/htdocs/telephonie/ligne/pre.inc.php b/htdocs/telephonie/ligne/pre.inc.php index d148f034025..c797bec5ff0 100644 --- a/htdocs/telephonie/ligne/pre.inc.php +++ b/htdocs/telephonie/ligne/pre.inc.php @@ -68,7 +68,8 @@ function llxHeader($head = "", $title="") { if ($user->rights->telephonie->stats->lire) $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques"); - $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); diff --git a/htdocs/telephonie/ligne/stat.php b/htdocs/telephonie/ligne/stat.php index 200149319c3..e1401cc9a17 100644 --- a/htdocs/telephonie/ligne/stat.php +++ b/htdocs/telephonie/ligne/stat.php @@ -58,11 +58,14 @@ if ($_GET["id"] or $_GET["numero"]) $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/fiche.php?id=".$ligne->id; $head[$h][1] = $langs->trans("Ligne"); $h++; - - $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/factures.php?id=".$ligne->id; - $head[$h][1] = $langs->trans('Factures'); - $h++; - + + if ($user->rights->telephonie->facture->lire) + { + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/factures.php?id=".$ligne->id; + $head[$h][1] = $langs->trans('Factures'); + $h++; + } + $head[$h][0] = DOL_URL_ROOT."/telephonie/ligne/infoc.php?id=".$ligne->id; $head[$h][1] = $langs->trans('Infos'); $h++; diff --git a/htdocs/telephonie/pre.inc.php b/htdocs/telephonie/pre.inc.php index d720ef701d4..84c4aec129e 100644 --- a/htdocs/telephonie/pre.inc.php +++ b/htdocs/telephonie/pre.inc.php @@ -58,7 +58,8 @@ function llxHeader($head = "", $title="") { if ($user->rights->telephonie->ligne_commander) $menu->add(DOL_URL_ROOT."/telephonie/ligne/commande/", "Commandes"); - $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); if ($user->rights->telephonie->stats->lire) $menu->add(DOL_URL_ROOT."/telephonie/stats/", "Statistiques"); diff --git a/htdocs/telephonie/tarifs/pre.inc.php b/htdocs/telephonie/tarifs/pre.inc.php index da89e36d38c..abdbea95847 100644 --- a/htdocs/telephonie/tarifs/pre.inc.php +++ b/htdocs/telephonie/tarifs/pre.inc.php @@ -58,7 +58,8 @@ function llxHeader($head = "", $title="") { $menu->add(DOL_URL_ROOT."/telephonie/facture/", "Factures"); - $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); + if ($user->rights->telephonie->facture->lire) + $menu->add(DOL_URL_ROOT."/telephonie/tarifs/", "Tarifs"); $menu->add_submenu(DOL_URL_ROOT."/telephonie/tarifs/grilles.php", "Grilles");