diff --git a/dev/skeletons/pre.inc.php b/dev/skeletons/pre.inc.php new file mode 100644 index 00000000000..d63f301dba2 --- /dev/null +++ b/dev/skeletons/pre.inc.php @@ -0,0 +1,53 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + \file htdocs/dev/skeletons/pre.inc.php + \brief File to manage left menu by default + \version $Id$ +*/ + +// Include environment and check authentification +require ("../../main.inc.php"); // This include must use a relative link to the main.inc.php file + + +/** + \brief Function called by page to show menus (top and left) +*/ +function llxHeader($head = "") +{ + global $user, $conf, $langs; + + top_menu($head); + + $menu = new Menu(); + + // Create default menu. + + // No code here is required if you already added menu entries in + // the module descriptor (recommanded). + // If not you must manually add menu entries here (not recommanded). + /* + $langs->load("mylangfile"); + $menu->add(DOL_URL_ROOT."/mylink.php", $langs->trans("MyMenuLabel")); + } + */ + + left_menu($menu->liste); +} +?> diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 654edff8896..e665d464dab 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -25,27 +25,21 @@ \author Put author name here \remarks Put here some comments */ - require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/../dev/skeletons/skeleton_class.class.php"); -// Load traductions files +// Load traductions files requiredby by page $langs->load("companies"); $langs->load("other"); -// Load permissions -$user->getrights("commercial"); - // Get parameters -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$myparam = isset($_GET["myparam"])?$_GET["myparam"]:''; -// Protection quand utilisateur externe +// Protection if external user if ($user->societe_id > 0) { - $action = ''; - $socid = $user->societe_id; + //accessforbidden(); } -if ($socid == '') accessforbidden(); @@ -81,9 +75,9 @@ if ($_REQUEST["action"] == 'add') * Put here all code to build page ****************************************************/ -llxHeader(); +llxHeader('MyPageName'); -$html=new Form($db); +$form=new Form($db); // Put here content of your page diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9345d887dd5..7639599bddb 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -41,8 +41,6 @@ $langs->load("members"); $langs->load("users"); $langs->load("mails"); -$user->getrights('adherent'); - $adh = new Adherent($db); $adho = new AdherentOptions($db); $adht = new AdherentType($db); diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index d809c309177..de68b8f5855 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -33,9 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); -$user->getrights('adherent'); -$user->getrights('banque'); - $langs->load("members"); $sortorder=$_GET["sortorder"]; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 232a82f1c85..19f1d0b3b7b 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -39,8 +39,6 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); -$user->getrights('adherent'); - // Defini si peux creer un utilisateur ou gerer groupe sur un utilisateur $canadduser=$user->rights->adherent->creer; // Defini si peux lire/modifier info user ou mot de passe diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index d612ff84f5a..850547f4088 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -34,8 +34,6 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); -$user->getrights('adherent'); - $adh = new Adherent($db); $subscription = new Cotisation($db); $errmsg=''; diff --git a/htdocs/adherents/info.php b/htdocs/adherents/info.php index d63b15ba53d..62f718fde5e 100644 --- a/htdocs/adherents/info.php +++ b/htdocs/adherents/info.php @@ -36,7 +36,6 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); -$user->getrights('adherent'); if (!$user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/adherents/info_subscription.php b/htdocs/adherents/info_subscription.php index cdf8613c742..a50bc7e9f9b 100644 --- a/htdocs/adherents/info_subscription.php +++ b/htdocs/adherents/info_subscription.php @@ -34,7 +34,6 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); -$user->getrights('adherent'); if (!$user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 7b916e24599..1fe70449523 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php"); -$user->getrights('commercial'); - $langs->load("companies"); $langs->load("members"); $langs->load("ldap"); diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 157f7e19ca8..d924a855a7d 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); $langs->load("members"); $langs->load("companies"); -$user->getrights('adherent'); - /* * Affiche liste diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index aed6658e6df..35c1cb0ee8c 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT.'/adherents/adherent.class.php'); $action=isset($_GET["action"])?$_GET["action"]:(isset($_POST["action"])?$_POST["action"]:""); $id=isset($_GET["id"])?$_GET["id"]:(isset($_POST["id"])?$_POST["id"]:""); -$user->getrights('adherent'); - $langs->load("companies"); $langs->load("members"); $langs->load("bills"); diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 261332db67f..b05d041247e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php"); $langs->load("members"); -$user->getrights('adherent'); - $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; diff --git a/htdocs/admin/import/index.php b/htdocs/admin/import/index.php index aa5c8c25303..2a50fbb2287 100644 --- a/htdocs/admin/import/index.php +++ b/htdocs/admin/import/index.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/admin/import/dolibarrimport.class.php"); $langs->load("exports"); -$user->getrights(); - if (! $user->societe_id == 0) accessforbidden(); diff --git a/htdocs/admin/menus/pre.inc.php b/htdocs/admin/menus/pre.inc.php index e793e99abb4..bbdcd5ae0bb 100644 --- a/htdocs/admin/menus/pre.inc.php +++ b/htdocs/admin/menus/pre.inc.php @@ -24,7 +24,6 @@ */ require ("../../main.inc.php"); -$user->getrights(); function llxHeader($head = "") { diff --git a/htdocs/categories/docreate.php b/htdocs/categories/docreate.php index 02d19461548..9d572a55c74 100644 --- a/htdocs/categories/docreate.php +++ b/htdocs/categories/docreate.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -29,8 +28,6 @@ require "./pre.inc.php"; -$user->getrights('categorie'); - $langs->load("categories"); diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index a9bec31337e..7e5006f9558 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -30,8 +30,6 @@ require "./pre.inc.php"; -$user->getrights(); - if (!$user->rights->categorie->lire) accessforbidden(); diff --git a/htdocs/categories/pre.inc.php b/htdocs/categories/pre.inc.php index 9a8a12e0fe0..13795799a3f 100644 --- a/htdocs/categories/pre.inc.php +++ b/htdocs/categories/pre.inc.php @@ -33,7 +33,6 @@ require "../main.inc.php"; require_once DOL_DOCUMENT_ROOT."/categories/categorie.class.php"; $langs->load("categories"); -$user->getrights("categorie"); function llxHeader ($head = "", $urlp = "", $title="") { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 8b0bf0e5f0b..506bf20ae26 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -37,7 +37,6 @@ if ($_REQUEST['id'] == "") $type=$_GET['type']; // Securite -$user->getrights('categorie'); if (! $user->rights->categorie->lire) { accessforbidden(); diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 80c7e09a2ef..8e04f89edcf 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -42,11 +42,6 @@ $langs->load("companies"); $langs->load("bills"); $langs->load("orders"); -$user->getrights('propale'); -$user->getrights('fichinter'); -$user->getrights('commande'); -$user->getrights('projet'); - llxHeader(); diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 9e52a9d8d4a..cf232de04d3 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -31,8 +31,6 @@ require("./pre.inc.php"); $langs->load("mails"); -$user->getrights("mailing"); - if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden(); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 6bcafd6d79c..aa57014d78a 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -32,8 +32,6 @@ require("./pre.inc.php"); $langs->load("commercial"); $langs->load("orders"); -$user->getrights("mailing"); - if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden(); diff --git a/htdocs/comm/mailing/pre.inc.php b/htdocs/comm/mailing/pre.inc.php index 49d5e2bf8db..8959ac1470c 100644 --- a/htdocs/comm/mailing/pre.inc.php +++ b/htdocs/comm/mailing/pre.inc.php @@ -30,7 +30,6 @@ require("../../main.inc.php"); require_once DOL_DOCUMENT_ROOT.'/comm/mailing/mailing.class.php'; -$user->getrights(); $langs->load("companies"); $langs->load("mails"); $langs->load("exports"); diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index edfe390e976..4b3f206a056 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -32,10 +31,6 @@ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); -$user->getrights('propale'); -$user->getrights('commande'); -$user->getrights('projet'); - $langs->load("orders"); $langs->load("companies"); diff --git a/htdocs/comm/pre.inc.php b/htdocs/comm/pre.inc.php index 8b76def8c9b..a74df6ba49a 100644 --- a/htdocs/comm/pre.inc.php +++ b/htdocs/comm/pre.inc.php @@ -17,8 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ /** @@ -27,10 +25,8 @@ \brief Fichier de gestion du menu gauche de l'espace commercial \version $Revision$ */ - require("../main.inc.php"); -$user->getrights(); function llxHeader($head = "", $title = "") { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 4dd71731678..57b62f2b6d8 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php"); require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php"); -$user->getrights('propale'); - $langs->load('companies'); $langs->load('propal'); $langs->load('compta'); diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index c1e089bb841..4dad131ba83 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -35,12 +35,6 @@ $langs->load('companies'); $langs->load('projects'); $langs->load('propal'); -$user->getrights('propale'); -$user->getrights('fichinter'); -$user->getrights('commande'); -$user->getrights('projet'); -$user->getrights("commercial"); - $socid = isset($_GET["id"])?$_GET["id"]:$_GET["socid"]; // Fonctionne si on passe id ou socid if ($socid == '') accessforbidden(); diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index a55ce6e0ee2..3cf729de8cf 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -32,8 +32,6 @@ require("./pre.inc.php"); $langs->load("propal"); -$user->getrights('propale'); - if ($user->societe_id > 0) { diff --git a/htdocs/comm/prospect/pre.inc.php b/htdocs/comm/prospect/pre.inc.php index f9eed8cf790..c4c0588009e 100644 --- a/htdocs/comm/prospect/pre.inc.php +++ b/htdocs/comm/prospect/pre.inc.php @@ -34,7 +34,6 @@ function llxHeader($head = "", $urlp = "") { global $user, $conf, $langs; - $user->getrights(); $langs->load("companies"); $langs->load("commercial"); diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index a4fbfa32065..8cf622cfe0b 100644 --- a/htdocs/comm/prospect/prospects.php +++ b/htdocs/comm/prospect/prospects.php @@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/prospect.class.php"); $langs->load("propal"); -$user->getrights(); - // Sécurité accés client $socid=0; if ($user->societe_id > 0) diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index dc62a1ce4ef..05ab9b943f3 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -42,8 +42,6 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } -$user->getrights('facture'); - /* diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index ed083b60ba7..cf878e209b0 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -31,11 +31,6 @@ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); -$user->getrights('propale'); -$user->getrights('commande'); -$user->getrights('projet'); - - $langs->load("companies"); $langs->load("orders"); $langs->load("bills"); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index d7d8e28bb71..0c173eaf241 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -30,10 +30,6 @@ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/facture.class.php"); -$user->getrights('propale'); -$user->getrights('commande'); -$user->getrights('projet'); - $langs->load("orders"); $langs->load("bills"); $langs->load("companies"); diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index a5afe8ce908..8f667d8848d 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -32,9 +32,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); -$user->getrights('commande'); -$user->getrights('expedition'); - if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index a345fecc2de..d6fbf966172 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -32,7 +32,6 @@ require('./pre.inc.php'); require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php'); require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); -$user->getrights('commande'); if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 7907f4f6833..78a57aeaf93 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -47,9 +47,6 @@ $langs->load('propal'); $langs->load('deliveries'); $langs->load('products'); -$user->getrights('commande'); -$user->getrights('expedition'); - if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 9cf2553433b..40857ccbd5d 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -34,7 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); $langs->load("orders"); $langs->load("sendings"); -$user->getrights('commande'); if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index f8dde0b4677..d3c41e109c5 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php'); $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; -$user->getrights('commande'); if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index 8d2fb5c9b9a..7928e1c5147 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -31,8 +31,6 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); -$user->getrights('commande'); - $langs->load("orders"); diff --git a/htdocs/commande/stats/pre.inc.php b/htdocs/commande/stats/pre.inc.php index e3fdb59be72..d7bbf326cf3 100644 --- a/htdocs/commande/stats/pre.inc.php +++ b/htdocs/commande/stats/pre.inc.php @@ -29,8 +29,6 @@ require("../../main.inc.php"); -$user->getrights('commande'); - $langs->load("orders"); diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index 624ebdbb246..08e6b6875d8 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); $langs->load("banks"); -$user->getrights('banque'); - if (!$user->admin && !$user->rights->banque) accessforbidden(); diff --git a/htdocs/compta/bank/bplc.php b/htdocs/compta/bank/bplc.php index aa20d993617..f3fa472622f 100644 --- a/htdocs/compta/bank/bplc.php +++ b/htdocs/compta/bank/bplc.php @@ -17,14 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); -$user->getrights('compta'); - if (!$user->rights->banque->lire) accessforbidden(); llxHeader(); diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index d8adf3d64a1..c6ffdcacea8 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); $langs->load("banks"); -$user->getrights('banque'); - if (!$user->admin && !$user->rights->banque) accessforbidden(); diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 3b753addf36..8223a65c344 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -33,9 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php"); $langs->load("banks"); -$user->getrights('compta'); -$user->getrights('banque'); - if (!$user->rights->banque->lire) accessforbidden(); diff --git a/htdocs/compta/bank/pre.inc.php b/htdocs/compta/bank/pre.inc.php index 5fc0d0211f1..89249ccb739 100644 --- a/htdocs/compta/bank/pre.inc.php +++ b/htdocs/compta/bank/pre.inc.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); $langs->load("banks"); -$user->getrights('banque'); - function llxHeader($head = "") { global $db, $user, $conf, $langs; diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 70fa8fbd29a..a8819216f1e 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -31,8 +31,6 @@ require("./pre.inc.php"); $langs->load("banks"); $langs->load("bills"); -$user->getrights('compta'); - if (! $user->rights->banque->consolidate) accessforbidden(); diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index f4177961748..3c3efa4e783 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); -$user->getrights('banque'); - if (!$user->rights->banque->lire) accessforbidden(); diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index f79f226fd6f..74aefb39313 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/societe.class.php"); $langs->load("banks"); $langs->load("bills"); -$user->getrights('banque'); - if (!$user->admin && !$user->rights->banque) accessforbidden(); diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 3099e2213cb..f1587f95556 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); $langs->load("banks"); -$user->getrights('banque'); - if (! $user->rights->banque->transfer) accessforbidden(); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 3029f7ce1d7..caa66dcfc05 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -30,9 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/tva.class.php"); -$user->getrights('compta'); -$user->getrights('tax'); - if (!$user->admin && !$user->rights->tax->charges->lire) accessforbidden(); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 2e9b341c1a2..f82d8761bcd 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -28,8 +28,6 @@ require_once("./pre.inc.php"); -$user->getrights("societe"); - if (! $user->rights->societe->lire) accessforbidden(); diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index c69df007552..b66c2c8a677 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -38,8 +38,6 @@ $langs->load("companies"); $langs->load("bills"); $langs->load('deliveries'); -$user->getrights('commande'); - if (! $user->rights->commande->lire) accessforbidden(); // Sécurité accès client diff --git a/htdocs/compta/commande/pre.inc.php b/htdocs/compta/commande/pre.inc.php index 3301cae13ea..0bf7bc706a6 100644 --- a/htdocs/compta/commande/pre.inc.php +++ b/htdocs/compta/commande/pre.inc.php @@ -31,15 +31,11 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); $langs->load("orders"); -$user->getrights('commande'); - function llxHeader($head = "", $title="", $help_url='') { global $user, $conf, $langs; - $user->getrights('banque'); - top_menu($head, $title); $menu = new Menu(); diff --git a/htdocs/compta/export/pre.inc.php b/htdocs/compta/export/pre.inc.php index fff455fc943..a5918c877af 100644 --- a/htdocs/compta/export/pre.inc.php +++ b/htdocs/compta/export/pre.inc.php @@ -28,7 +28,6 @@ */ require("../../main.inc.php"); -$user->getrights(''); function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c3eb713dd68..3d259cbffb9 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -41,8 +41,6 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php' if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php'); if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); -$user->getrights(); - if (! $user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 163ebfd3c03..1080b625423 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -33,7 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php"); -$user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 52d0e03fa6c..d2f6ffec3a8 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -37,8 +37,6 @@ $langs->load('propal'); $langs->load('compta'); $langs->load('other'); -$user->getrights('facture'); - if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 1cd410f1c84..d66e00b25e5 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -32,8 +32,6 @@ require_once("./facture-rec.class.php"); require_once(DOL_DOCUMENT_ROOT."/project.class.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); -$user->getrights('facture'); - if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c8d2b8471db..cf7255f3e47 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -32,9 +32,6 @@ require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/paiement.class.php"); -$user->getrights('facture'); -$user->getrights('banque'); - if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 0533fa3e20f..701a5da5e90 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; -$user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 9dd0caefbc9..c6c71309184 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -32,7 +32,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php'); require_once(DOL_DOCUMENT_ROOT."/facture.class.php"); -$user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 25c9fdd2479..9cdae43c9dc 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -33,8 +33,6 @@ $langs->load("companies"); if ($conf->facture->enabled) $langs->load("bills"); if ($conf->projet->enabled) $langs->load("projects"); -$user->getrights("commercial"); - $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($socid == '') accessforbidden(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 0a33a8d0ab8..492f1b3bebe 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -35,8 +35,6 @@ if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php'); if ($conf->tax->enabled) require_once(DOL_DOCUMENT_ROOT.'/chargesociales.class.php'); -$user->getrights(); // On a besoin des permissions sur plusieurs modules - // L'espace compta/tréso doit toujours etre actif car c'est un espace partagé // par de nombreux modules (banque, facture, commande à facturer, etc...) indépendemment // de l'utilisation de la compta ou non. C'est au sein de cet espace que chaque sous fonction diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 88b8a215e20..8d05d43bf21 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); -$user->getrights("facture"); - $langs->load("bills"); // Sécurité accés client diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 65d44454695..acaca8a4b6e 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php'); require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php'); require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); -$user->getrights('banque'); - $langs->load('bills'); $langs->load('banks'); $langs->load('companies'); diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 9dd753a9ab7..329e6f04896 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -32,8 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); $langs->load("banks"); -$user->getrights("banque"); - // Sécurité accés client if (! $user->rights->banque) accessforbidden(); diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php index 1c0ec41c4a7..1910a8447a9 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/liste.php @@ -32,9 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); $langs->load("bills"); -$user->getrights("facture"); -$user->getrights("adherent"); - // Sécurité accés client if (! $user->rights->facture->lire && ! $user->rights->adherent->cotisation->lire) accessforbidden(); diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 73e4f9d2cf4..483d6538e9b 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT.'/facture.class.php'); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php"); if ($conf->banque->enabled) require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); -$user->getrights('facture'); - $langs->load('bills'); $langs->load('banks'); $langs->load('companies'); diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 0ae88d67706..e2afa8f4e02 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php'); $langs->load("bills"); -$user->getrights("facture"); - // Sécurité accés client if (! $user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 32641569c1a..d8f0e8f7f49 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php"); -$user->getrights("facture"); - // Sécurité accés if (! $user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/param/comptes/fiche.php b/htdocs/compta/param/comptes/fiche.php index b1c31e542a5..8a3a9a19a0b 100644 --- a/htdocs/compta/param/comptes/fiche.php +++ b/htdocs/compta/param/comptes/fiche.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); -$user->getrights("compta"); - $mesg = ''; if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer) diff --git a/htdocs/compta/param/comptes/index.php b/htdocs/compta/param/comptes/index.php index d259fa62320..f3c2fd89a71 100644 --- a/htdocs/compta/param/comptes/index.php +++ b/htdocs/compta/param/comptes/index.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); -$user->getrights('banque'); - $langs->load("compta"); $langs->load("bills"); diff --git a/htdocs/compta/param/comptes/pre.inc.php b/htdocs/compta/param/comptes/pre.inc.php index e8362bc3348..05d5f050934 100644 --- a/htdocs/compta/param/comptes/pre.inc.php +++ b/htdocs/compta/param/comptes/pre.inc.php @@ -28,8 +28,6 @@ require("../../../main.inc.php"); require_once DOL_DOCUMENT_ROOT.'/compta/comptacompte.class.php'; -$user->getrights('banque'); - function llxHeader($head = "", $title="", $help_url='') { global $user, $langs; diff --git a/htdocs/compta/param/index.php b/htdocs/compta/param/index.php index 715078816c9..2c045f665b9 100644 --- a/htdocs/compta/param/index.php +++ b/htdocs/compta/param/index.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); -$user->getrights('banque'); - $langs->load("compta"); $langs->load("admin"); $langs->load("bills"); diff --git a/htdocs/compta/pre.inc.php b/htdocs/compta/pre.inc.php index a64f1a353c2..fc72c650b88 100644 --- a/htdocs/compta/pre.inc.php +++ b/htdocs/compta/pre.inc.php @@ -33,8 +33,6 @@ function llxHeader($head = "", $title="", $help_url='') { global $user, $conf, $langs; - $user->getrights('banque'); - top_menu($head, $title); $menu = new Menu(); diff --git a/htdocs/compta/prelevement/pre.inc.php b/htdocs/compta/prelevement/pre.inc.php index bad72a3eea5..67f8844eb2f 100644 --- a/htdocs/compta/prelevement/pre.inc.php +++ b/htdocs/compta/prelevement/pre.inc.php @@ -33,8 +33,6 @@ $langs->load("banks"); $langs->load("withdrawals"); $langs->load("bills"); -$user->getrights("prelevement"); - function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 0722012fcd6..044627e7709 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -50,8 +50,6 @@ if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.datep"; if ($page == -1) { $page = 0 ; } -// S�curit� acc�s client -$user->getrights('facture'); $module='propale'; if (! empty($_GET["socid"])) { diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index c327f22f670..67594579d08 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -42,8 +42,6 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } -$user->getrights('facture'); - /* * * Mode fiche diff --git a/htdocs/compta/resultat/bilan.php b/htdocs/compta/resultat/bilan.php index 3e03032fc58..ad11218b1bb 100644 --- a/htdocs/compta/resultat/bilan.php +++ b/htdocs/compta/resultat/bilan.php @@ -32,7 +32,6 @@ require("../../chargesociales.class.php"); /* * */ -$user->getrights('compta'); if (!$user->rights->compta->resultat->lire) accessforbidden(); diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index a9514d0a40d..915ec8e50a5 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/report.inc.php"); $langs->load("bills"); -$user->getrights('compta'); -$user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/resultat/compteres.php b/htdocs/compta/resultat/compteres.php index c59f33ca08c..573b60d1789 100644 --- a/htdocs/compta/resultat/compteres.php +++ b/htdocs/compta/resultat/compteres.php @@ -26,7 +26,6 @@ require("../../chargesociales.class.php"); /* * */ -$user->getrights('compta'); if (!$user->rights->compta->resultat->lire) accessforbidden(); diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 5f7567bdd24..2c0d2d58d9b 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -31,10 +31,6 @@ require(DOL_DOCUMENT_ROOT."/chargesociales.class.php"); $langs->load("compta"); $langs->load("bills"); -// Protection -$user->getrights('compta'); -$user->getrights('tax'); - if (!$user->admin && !$user->rights->tax->charges) accessforbidden(); diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 1985fb094c0..db83b2853bd 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -31,10 +31,6 @@ require("./pre.inc.php"); require(DOL_DOCUMENT_ROOT."/chargesociales.class.php"); -$user->getrights('facture'); -$user->getrights('compta'); -$user->getrights('tax'); - if (!$user->admin && ! $user->rights->tax->charges->lire) accessforbidden(); diff --git a/htdocs/compta/ventilation/fournisseur/lignes.php b/htdocs/compta/ventilation/fournisseur/lignes.php index 20a38a2186d..9ea2f07de7d 100644 --- a/htdocs/compta/ventilation/fournisseur/lignes.php +++ b/htdocs/compta/ventilation/fournisseur/lignes.php @@ -16,11 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ -/*! +/** \file htdocs/compta/ventilation/fournisseur/lignes.php \ingroup facture \brief Page de detail des lignes de ventilation d'une facture @@ -29,8 +27,6 @@ require("./pre.inc.php"); -$user->getrights('facture'); -$user->getrights('banque'); $langs->load("bills"); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/ventilation/fournisseur/liste.php b/htdocs/compta/ventilation/fournisseur/liste.php index 0083bdee0dd..41e10c2c2cf 100644 --- a/htdocs/compta/ventilation/fournisseur/liste.php +++ b/htdocs/compta/ventilation/fournisseur/liste.php @@ -18,12 +18,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ -/*! +/** \file htdocs/compta/ventilation/liste.php \ingroup compta \brief Page de ventilation des lignes de facture @@ -32,8 +30,6 @@ require("./pre.inc.php"); -$user->getrights('facture'); -$user->getrights('banque'); $langs->load("bills"); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/ventilation/fournisseur/pre.inc.php b/htdocs/compta/ventilation/fournisseur/pre.inc.php index 7f8ed07538b..d4828eb4d8c 100644 --- a/htdocs/compta/ventilation/fournisseur/pre.inc.php +++ b/htdocs/compta/ventilation/fournisseur/pre.inc.php @@ -28,7 +28,7 @@ */ require("../../../main.inc.php"); -$user->getrights(''); + function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php index cb176a6f6c5..13228950b3c 100644 --- a/htdocs/compta/ventilation/lignes.php +++ b/htdocs/compta/ventilation/lignes.php @@ -34,9 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("bills"); $langs->load("compta"); -$user->getrights('facture'); -$user->getrights('banque'); - if (!$user->rights->facture->lire) accessforbidden(); if (!$user->rights->compta->ventilation->creer) accessforbidden(); diff --git a/htdocs/compta/ventilation/liste.php b/htdocs/compta/ventilation/liste.php index 3525332bcfd..53b4c418929 100644 --- a/htdocs/compta/ventilation/liste.php +++ b/htdocs/compta/ventilation/liste.php @@ -36,9 +36,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("compta"); $langs->load("bills"); -$user->getrights('facture'); -$user->getrights('banque'); - if (!$user->rights->facture->lire) accessforbidden(); if (!$user->rights->compta->ventilation->creer) accessforbidden(); diff --git a/htdocs/compta/ventilation/pre.inc.php b/htdocs/compta/ventilation/pre.inc.php index 09821418366..6788a6bd8b9 100644 --- a/htdocs/compta/ventilation/pre.inc.php +++ b/htdocs/compta/ventilation/pre.inc.php @@ -27,7 +27,7 @@ */ require("../../main.inc.php"); -$user->getrights(''); + function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index e3b3fad8f45..c9edd4d1949 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); -$user->getrights('commercial'); - $langs->load("companies"); // Protection quand utilisateur externe diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 45267d3204a..1c08602ab74 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -37,9 +37,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); $langs->load("companies"); $langs->load("users"); -$user->getrights("societe"); -$user->getrights("commercial"); - $error = array(); $socid=$_GET["socid"]?$_GET["socid"]:$_POST["socid"]; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 738aac8dac3..2c653bbef74 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); -$user->getrights('commercial'); - $langs->load("companies"); // Protection quand utilisateur externe diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 90f1b60a754..d9a38555b18 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); -$user->getrights('commercial'); - $langs->load("companies"); $langs->load("ldap"); $langs->load("admin"); diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index c27b4c638fc..788de00999f 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php"); -$user->getrights('commercial'); - $langs->load("companies"); // Protection quand utilisateur externe diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 8707c9d6b14..072d1a28eb7 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -35,8 +35,6 @@ $langs->load("orders"); $langs->load("companies"); $langs->load("bills"); -$user->getrights('contrat'); -$user->getrights('commercial'); if (! $user->rights->contrat->lire) accessforbidden(); diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 11e388bcf02..fc17bd46053 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -31,9 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); $langs->load("contracts"); -$user->getrights('contrat'); -$user->getrights('commercial'); - if (!$user->rights->contrat->lire) accessforbidden(); diff --git a/htdocs/contrat/ligne.php b/htdocs/contrat/ligne.php index 2c3a0cae51e..09d472ebd8c 100644 --- a/htdocs/contrat/ligne.php +++ b/htdocs/contrat/ligne.php @@ -39,8 +39,6 @@ $langs->load("orders"); $langs->load("companies"); $langs->load("bills"); -$user->getrights('contrat'); - if (!$user->rights->contrat->lire) accessforbidden(); diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index fc476cbe6a0..a9de39dcdd3 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -32,9 +32,6 @@ if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.cl $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; -$user->getrights('contrat'); -$user->getrights('commercial'); - if (!$user->rights->contrat->lire) accessforbidden(); diff --git a/htdocs/docs/pre.inc.php b/htdocs/docs/pre.inc.php index f552c2146ed..e9760e67b0f 100644 --- a/htdocs/docs/pre.inc.php +++ b/htdocs/docs/pre.inc.php @@ -16,17 +16,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** \file htdocs/pre.inc.php \brief Fichier gestionnaire du menu de gauche de l'accueil - \version $Revision$ + \version $Source$ */ - require ("../main.inc.php"); -$user->getrights('document'); + function llxHeader($head = "") { diff --git a/htdocs/dossier/client/fiche.php b/htdocs/dossier/client/fiche.php index 15c03a87d06..a9233f1b748 100644 --- a/htdocs/dossier/client/fiche.php +++ b/htdocs/dossier/client/fiche.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/client.class.php'); -$user->getrights("facture"); - if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 49bb837cc51..999d25a5271 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -45,8 +45,6 @@ $langs->load('propal'); $langs->load('deliveries'); $langs->load('stocks'); -$user->getrights('commande'); -$user->getrights('expedition'); if (!$user->rights->commande->lire) accessforbidden(); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 86315b370fd..0b38593e79a 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -45,7 +45,6 @@ $langs->load('orders'); $langs->load('stocks'); $langs->load('other'); -$user->getrights('expedition'); if (!$user->rights->expedition->lire) accessforbidden(); diff --git a/htdocs/expedition/pre.inc.php b/htdocs/expedition/pre.inc.php index 1c26c519626..9b309a638c0 100644 --- a/htdocs/expedition/pre.inc.php +++ b/htdocs/expedition/pre.inc.php @@ -36,9 +36,6 @@ require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php"); $langs->load("orders"); $langs->load("sendings"); -$user->getrights('commande'); -$user->getrights('expedition'); - function llxHeader($head = "", $title="", $help_url='') { global $langs; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 43a76d77ad5..535594293bb 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/modules/export/modules_export.php'); $langs->load("exports"); -$user->getrights(); - if (! $user->societe_id == 0) accessforbidden(); diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 380de439f0a..53f19a390b1 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/exports/export.class.php"); $langs->load("exports"); -$user->getrights(); - if (! $user->societe_id == 0) accessforbidden(); diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 6e4f9b5a223..7a6958dddf6 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -31,8 +31,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php"); -$user->getrights('ficheinter'); - if (!$user->rights->ficheinter->lire) accessforbidden(); diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index abca9ea10b4..fb467ab94ed 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -415,8 +415,6 @@ if ($_GET["action"] == 'create') print ''; print ''; - $user->getrights("projet"); - if ($user->rights->projet->creer) { print ''; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 9855107f03c..9dbd3d8215f 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -42,8 +42,6 @@ $langs->load('deliveries'); $langs->load('products'); $langs->load('stocks'); -$user->getrights("fournisseur"); - if (!$user->rights->fournisseur->commande->lire) accessforbidden(); // Sécurité accés client diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index c0ced8ff431..7890ed0fc82 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -43,8 +43,6 @@ $langs->load('deliveries'); $langs->load('products'); $langs->load('stocks'); -$user->getrights("fournisseur"); - if (!$user->rights->fournisseur->commande->lire) accessforbidden(); $comclientid = isset($_GET["comid"])?$_GET["comid"]:''; diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index bb033d7ce97..4335723c2b1 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -34,7 +34,6 @@ $langs->load("suppliers"); $langs->load("companies"); $langs->load('stocks'); -$user->getrights('fournisseur'); if (!$user->rights->fournisseur->commande->lire) accessforbidden(); diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 9b44d8f8ea2..7adc2a6b37c 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -34,8 +34,6 @@ $langs->load("suppliers"); $langs->load("companies"); $langs->load('stocks'); -$user->getrights('fournisseur'); - if (!$user->rights->fournisseur->commande->lire) accessforbidden(); diff --git a/htdocs/fourn/commande/pre.inc.php b/htdocs/fourn/commande/pre.inc.php index e5834444973..1e2971db0ef 100644 --- a/htdocs/fourn/commande/pre.inc.php +++ b/htdocs/fourn/commande/pre.inc.php @@ -31,7 +31,6 @@ require("../../main.inc.php"); $langs->load("orders"); $langs->load("suppliers"); $langs->load("companies"); -$user->getrights('fournisseur'); require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"); require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php"); diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index ed15272baa2..aae695de519 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -37,7 +37,6 @@ $langs->load('bills'); $langs->load('other'); $langs->load("companies"); -$user->getrights('fournisseur'); if (!$user->rights->fournisseur->facture->lire) accessforbidden(); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index a3ee3a99634..8a7638cb465 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -31,9 +31,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/paiement.class.php"); -$user->getrights('facture'); -$user->getrights('banque'); - if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 325af440d6a..0ae2598b07a 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -32,7 +32,6 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php'); $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:""; -$user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/fourn/facture/pre.inc.php b/htdocs/fourn/facture/pre.inc.php index e2d7e0e537a..e469c5acc8b 100644 --- a/htdocs/fourn/facture/pre.inc.php +++ b/htdocs/fourn/facture/pre.inc.php @@ -29,7 +29,6 @@ require("../../main.inc.php"); require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"; require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"; -$user->getrights('fournisseur'); function llxHeader($head = "", $title = "", $addons='') { diff --git a/htdocs/fourn/fiche-stats.php b/htdocs/fourn/fiche-stats.php index dcb7cf6b6a3..14f73871d25 100644 --- a/htdocs/fourn/fiche-stats.php +++ b/htdocs/fourn/fiche-stats.php @@ -31,8 +31,6 @@ require('./pre.inc.php'); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); -$user->getrights(); - $langs->load('suppliers'); $langs->load('products'); $langs->load('bills'); diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index f6a2faafebb..5e10f2eae99 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -30,8 +30,6 @@ require('./pre.inc.php'); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); -$user->getrights(); - $langs->load('suppliers'); $langs->load('products'); $langs->load('bills'); diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 3d2469ad983..3ee266a7d00 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -32,8 +32,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php'); require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php'); -$user->getrights(); - $langs->load("suppliers"); $langs->load("orders"); $langs->load("companies"); diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index a59c4b3388c..6a81a7f3970 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); -$user->getrights(); - $langs->load("suppliers"); $langs->load("orders"); $langs->load("companies"); diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index d14077346d2..321ee2a2d8c 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -34,8 +34,6 @@ require('./pre.inc.php'); require(DOL_DOCUMENT_ROOT.'/fourn/facture/paiementfourn.class.php'); -$user->getrights('facture'); -$user->getrights('fournisseur'); $langs->load('bills'); $langs->load('banks'); diff --git a/htdocs/fourn/paiement/pre.inc.php b/htdocs/fourn/paiement/pre.inc.php index 37d3db9919e..9089fece15c 100644 --- a/htdocs/fourn/paiement/pre.inc.php +++ b/htdocs/fourn/paiement/pre.inc.php @@ -29,7 +29,6 @@ require("../../main.inc.php"); require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"; require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"; -$user->getrights('fournisseur'); function llxHeader($head = "", $title = "", $addons='') { global $user, $conf, $langs; diff --git a/htdocs/fourn/pre.inc.php b/htdocs/fourn/pre.inc.php index 1e33d791bad..504266c0fb0 100644 --- a/htdocs/fourn/pre.inc.php +++ b/htdocs/fourn/pre.inc.php @@ -30,8 +30,6 @@ require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"; require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"; -$user->getrights('fournisseur'); - function llxHeader($head = "", $title="", $addons='') { global $user, $conf, $langs; diff --git a/htdocs/fourn/product/fiche.php b/htdocs/fourn/product/fiche.php index da34a6a7a8e..a62b9316a9c 100644 --- a/htdocs/fourn/product/fiche.php +++ b/htdocs/fourn/product/fiche.php @@ -33,9 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("products"); -$user->getrights('produit'); -$user->getrights('propale'); -$user->getrights('facture'); $mesg = ''; if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 1561b71bc7b..46d8e3ee8d5 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -33,8 +33,6 @@ require("./pre.inc.php"); $langs->load("products"); $langs->load("suppliers"); -$user->getrights('produit'); - if (!$user->rights->produit->lire) accessforbidden(); $sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"]; diff --git a/htdocs/fourn/product/pre.inc.php b/htdocs/fourn/product/pre.inc.php index 96dca6448c8..bae4783edf9 100644 --- a/htdocs/fourn/product/pre.inc.php +++ b/htdocs/fourn/product/pre.inc.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); $langs->load("suppliers"); $langs->load("products"); -$user->getrights("produit"); - function llxHeader($head = "", $title="", $help_url='',$addons='') { diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 332c8eff881..a091907847b 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -42,8 +42,6 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } -$user->getrights('facture'); - /* diff --git a/htdocs/fourn/stats.php b/htdocs/fourn/stats.php index 79bb7e3dbfc..ef1dcdc8d8b 100644 --- a/htdocs/fourn/stats.php +++ b/htdocs/fourn/stats.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); -$user->getrights(); - $langs->load("suppliers"); $langs->load("orders"); $langs->load("companies"); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 389073ff6b6..efa254714f1 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -888,7 +888,6 @@ class Form function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkeysearch='') { global $langs,$conf,$user; - $user->getrights("categorie"); $sql = "SELECT "; if ($conf->categorie->enabled && ! $user->rights->categorie->voir) diff --git a/htdocs/includes/menus/barre_left/auguria_backoffice.php b/htdocs/includes/menus/barre_left/auguria_backoffice.php index 8520f012fe1..e682e6cefff 100644 --- a/htdocs/includes/menus/barre_left/auguria_backoffice.php +++ b/htdocs/includes/menus/barre_left/auguria_backoffice.php @@ -80,8 +80,6 @@ class MenuLeft { session_start(); // En mode authentification PEAR, la session a déjà été ouverte } - $user->getrights(""); - // On récupère mainmenu et leftmenu qui définissent le menu à afficher if (isset($_GET["mainmenu"])) { // On sauve en session le menu principal choisi diff --git a/htdocs/includes/menus/barre_left/auguria_frontoffice.php b/htdocs/includes/menus/barre_left/auguria_frontoffice.php index 8b46df23d65..7eb294fcd52 100644 --- a/htdocs/includes/menus/barre_left/auguria_frontoffice.php +++ b/htdocs/includes/menus/barre_left/auguria_frontoffice.php @@ -76,8 +76,6 @@ class MenuLeft { session_start(); // En mode authentification PEAR, la session a déjà été ouverte } - $user->getrights(""); - // On récupère mainmenu et leftmenu qui définissent le menu à afficher if (isset($_GET["mainmenu"])) { // On sauve en session le menu principal choisi diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index bd14ee85ae7..5057d2699c1 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -66,8 +66,6 @@ class MenuLeft { session_start(); } - $user->getrights(""); - // On récupère mainmenu et leftmenu qui définissent le menu à afficher if (isset($_GET["mainmenu"])) { @@ -779,8 +777,6 @@ class MenuLeft { if ($conf->adherent->enabled) { - $user->getrights("adherent"); - $newmenu->add(DOL_URL_ROOT."/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire); $newmenu->add_submenu(DOL_URL_ROOT."/adherents/fiche.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer); $newmenu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->lire); diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php index 52485dbbf3d..a254d611b45 100644 --- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php @@ -66,8 +66,6 @@ class MenuLeft { session_start(); } - $user->getrights(""); - // On récupère mainmenu et leftmenu qui définissent le menu à afficher if (isset($_GET["mainmenu"])) { @@ -751,8 +749,6 @@ class MenuLeft { if ($conf->adherent->enabled) { - $user->getrights("adherent"); - $newmenu->add(DOL_URL_ROOT."/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire); $newmenu->add_submenu(DOL_URL_ROOT."/adherents/fiche.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer); $newmenu->add_submenu(DOL_URL_ROOT."/adherents/liste.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->lire); diff --git a/htdocs/includes/menus/barre_top/auguria_backoffice.php b/htdocs/includes/menus/barre_top/auguria_backoffice.php index 5864cec503f..f7edd1ec6df 100644 --- a/htdocs/includes/menus/barre_top/auguria_backoffice.php +++ b/htdocs/includes/menus/barre_top/auguria_backoffice.php @@ -71,8 +71,6 @@ class MenuTop { session_start(); } - $user->getrights(""); - // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; diff --git a/htdocs/includes/menus/barre_top/auguria_frontoffice.php b/htdocs/includes/menus/barre_top/auguria_frontoffice.php index b4e0d66a709..d27802795af 100644 --- a/htdocs/includes/menus/barre_top/auguria_frontoffice.php +++ b/htdocs/includes/menus/barre_top/auguria_frontoffice.php @@ -71,8 +71,6 @@ class MenuTop { session_start(); } - $user->getrights(""); - // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; diff --git a/htdocs/includes/menus/barre_top/eldy_backoffice.php b/htdocs/includes/menus/barre_top/eldy_backoffice.php index 000a1d2dfce..2466f111fa4 100644 --- a/htdocs/includes/menus/barre_top/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_backoffice.php @@ -67,8 +67,6 @@ class MenuTop { session_start(); } - $user->getrights(""); - // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; diff --git a/htdocs/includes/menus/barre_top/eldy_frontoffice.php b/htdocs/includes/menus/barre_top/eldy_frontoffice.php index 262659e8324..8db9f0b3129 100644 --- a/htdocs/includes/menus/barre_top/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_frontoffice.php @@ -66,8 +66,6 @@ class MenuTop { session_start(); } - $user->getrights(""); - // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; diff --git a/htdocs/includes/menus/barre_top/rodolphe.php b/htdocs/includes/menus/barre_top/rodolphe.php index c9dce731e38..f8f129eb197 100644 --- a/htdocs/includes/menus/barre_top/rodolphe.php +++ b/htdocs/includes/menus/barre_top/rodolphe.php @@ -64,8 +64,6 @@ class MenuTop { session_start(); } - $user->getrights(""); - // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; diff --git a/htdocs/index.php b/htdocs/index.php index d2fb1e8e861..810ed7960b1 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -29,7 +29,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/boxes.php"); -$user->getrights(''); // Simule le menu par défaut sur Home if (! isset($_GET["mainmenu"])) $_GET["mainmenu"]="home"; diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 14d8df6e909..da16cf668cc 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1329,9 +1329,6 @@ function info_admin($texte,$infoonimgalt=0) $modulename = 'societe'; $list = 1; } - - $user->getrights($modulename); - $user->getrights('commercial'); $socid = 0; $nocreate = 0; diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index b955f76e336..cced73286bb 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -40,7 +40,6 @@ $langs->load("sendings"); $langs->load("bills"); $langs->load('deliveries'); -$user->getrights('expedition'); if (!$user->rights->expedition->livraison->lire) accessforbidden(); diff --git a/htdocs/livraison/pre.inc.php b/htdocs/livraison/pre.inc.php index 4650acc3bab..ff4c0ab9179 100644 --- a/htdocs/livraison/pre.inc.php +++ b/htdocs/livraison/pre.inc.php @@ -29,15 +29,12 @@ */ require("../main.inc.php"); - require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/livraison/livraison.class.php"); $langs->load("orders"); $langs->load("sendings"); -$user->getrights('commande'); -$user->getrights('expedition'); function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/lolix/index.php b/htdocs/lolix/index.php index 63e5aa6d5d4..881dbae12d6 100644 --- a/htdocs/lolix/index.php +++ b/htdocs/lolix/index.php @@ -21,8 +21,6 @@ */ require("./pre.inc.php"); -$user->getrights('propale'); - if ($user->societe_id > 0) { $socid = $user->societe_id; diff --git a/htdocs/lolix/societe/index.php b/htdocs/lolix/societe/index.php index 63e5aa6d5d4..2c82fcb6a9d 100644 --- a/htdocs/lolix/societe/index.php +++ b/htdocs/lolix/societe/index.php @@ -16,13 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ require("./pre.inc.php"); -$user->getrights('propale'); - if ($user->societe_id > 0) { $socid = $user->societe_id; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index de742411264..bddf79c5087 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -401,19 +401,22 @@ if (! defined('MAIN_INFO_SOCIETE_PAYS')) define('MAIN_INFO_SOCIETE_PAYS','1'); } +// If install not finished, we start again. +if (defined("MAIN_NOT_INSTALLED")) +{ + Header("Location: ".DOL_URL_ROOT."/install/index.php"); + exit; +} + + // On charge les fichiers lang principaux // TODO Optimisation a faire ici $langs->load("main"); $langs->load("dict"); -/* - * - */ -if (defined("MAIN_NOT_INSTALLED")) -{ - Header("Location: ".DOL_URL_ROOT."/install/index.php"); - exit; -} +// On charge les fichiers lang principaux +$user->getrights(); + // Constantes utilise pour definir le nombre de lignes des textarea if (! eregi("firefox",$_SERVER["HTTP_USER_AGENT"])) diff --git a/htdocs/mantis/mantis.php b/htdocs/mantis/mantis.php index 85fcbc333c9..361d67ba35d 100644 --- a/htdocs/mantis/mantis.php +++ b/htdocs/mantis/mantis.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); if (empty($conf->global->PHPMANTIS_URL)) { - $user->getrights(); - llxHeader(); print '
Module Mantis was not configured properly.
'; llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/mantis/pre.inc.php b/htdocs/mantis/pre.inc.php index 86f460abdc1..0327077cec0 100644 --- a/htdocs/mantis/pre.inc.php +++ b/htdocs/mantis/pre.inc.php @@ -14,22 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/mantis/pre.inc.php \ingroup mantis \brief Fichier de gestion du menu gauche du module mantis - \version $Revision$ + \version $Id$ */ - require ("../main.inc.php"); -$user->getrights('mantis'); - function llxHeader($head = "", $title="", $help_url='') { global $langs; diff --git a/htdocs/oscommerce_ws/produits/categories.php b/htdocs/oscommerce_ws/produits/categories.php index 9ff09e0a611..13f9d988ffb 100644 --- a/htdocs/oscommerce_ws/produits/categories.php +++ b/htdocs/oscommerce_ws/produits/categories.php @@ -35,9 +35,6 @@ require("osc_categories.class.php"); $langs->load("companies"); $langs->load("other"); -// Load permissions -//$user->getrights("commercial"); -//if (!$user->rights->categorie->lire) accessforbidden(); // Get parameters $socid = isset($_GET["socid"])?$_GET["socid"]:''; diff --git a/htdocs/phenix/phenix.php b/htdocs/phenix/phenix.php index bbbd9e391d4..ba193c99e80 100644 --- a/htdocs/phenix/phenix.php +++ b/htdocs/phenix/phenix.php @@ -14,23 +14,19 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/phenix/phenix.php \ingroup phenix \brief Page générant 2 frames, une pour le menu Dolibarr, l'autre pour l'affichage du calendrier \author Laurent Destailleur - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); if (empty($conf->global->PHPPHENIX_URL)) { - $user->getrights(); - llxHeader(); print '
Module Phenix was not configured properly.
'; llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/phenix/pre.inc.php b/htdocs/phenix/pre.inc.php index 770c724dacc..f1120fd5801 100644 --- a/htdocs/phenix/pre.inc.php +++ b/htdocs/phenix/pre.inc.php @@ -14,21 +14,17 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/phenix/pre.inc.php \ingroup phenix \brief Fichier de gestion du menu gauche du module phenix - \version $Revision$ + \version $Id$ */ require ("../main.inc.php"); -$user->getrights('phenix'); function llxHeader($head = "", $title="", $help_url='') { diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index fb36fc51d3d..2154009f89a 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -25,9 +25,8 @@ \brief File to manage left menu for home page \version $Id$ */ - require ("./main.inc.php"); -$user->getrights(); + function llxHeader($head = "") { diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php index 1a247065f40..a42866e7003 100644 --- a/htdocs/product/barcode.php +++ b/htdocs/product/barcode.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/includes/barcode/html.formbarcode.class.php"); $langs->load("products"); $langs->load("bills"); -$user->getrights('barcode'); - if (!$user->rights->barcode->lire) accessforbidden(); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 843fc38ace5..f0df45fb1e2 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -37,8 +37,6 @@ require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); $langs->load("other"); $langs->load("products"); -$user->getrights('produit'); - if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 8f629a76ad6..b4863310c6b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -39,9 +39,6 @@ $langs->load("products"); $langs->load("suppliers"); $langs->load("bills"); -$user->getrights('produit'); -$user->getrights('propale'); -$user->getrights('facture'); $mesg = ''; if (! $user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index a4c7ff4daf1..c5a0cc574cb 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -33,9 +33,6 @@ if ($conf->categorie->enabled) require_once(DOL_DOCUMENT_ROOT."/categories/categ $langs->load("products"); -$user->getrights('produit'); -if ($conf->categorie->enabled) $user->getrights('categorie'); - if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index ee6d83b8378..f001995f46b 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -38,8 +38,6 @@ require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php"); $langs->load("products"); $langs->load("bills"); -$user->getrights('produit'); - $mesg = ''; if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/pre.inc.php b/htdocs/product/pre.inc.php index fc77a9d880d..93a114e3f7b 100644 --- a/htdocs/product/pre.inc.php +++ b/htdocs/product/pre.inc.php @@ -31,16 +31,11 @@ require("../main.inc.php"); $langs->load("products"); -$user->getrights('produit'); -$user->getrights('propale'); -$user->getrights('facture'); function llxHeader($head = "", $urlp = "", $title="") { global $user, $conf, $langs; - $user->getrights("produit"); - top_menu($head, $title); $menu = new Menu(); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 48632a50256..ffdb6ab3f43 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -36,8 +36,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("products"); $langs->load("bills"); -$user->getrights('produit'); - if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 6babe8a0ed9..8c51f1c0de7 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); $langs->load("products"); $langs->load("stocks"); -$user->getrights('produit'); - if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/product/sousproduits/pre.inc.php b/htdocs/product/sousproduits/pre.inc.php index 64735fb69a8..103f1d20687 100644 --- a/htdocs/product/sousproduits/pre.inc.php +++ b/htdocs/product/sousproduits/pre.inc.php @@ -31,15 +31,11 @@ require("../../main.inc.php"); $langs->load("products"); -$user->getrights('produit'); -$user->getrights('propale'); -$user->getrights('facture'); function llxHeader($head = "", $urlp = "", $title="") { global $user, $conf, $langs; $langs->load("products"); - $user->getrights("produit"); top_menu($head, $title); diff --git a/htdocs/product/stats/pre.inc.php b/htdocs/product/stats/pre.inc.php index 8312b8dca40..4bf388df2b8 100644 --- a/htdocs/product/stats/pre.inc.php +++ b/htdocs/product/stats/pre.inc.php @@ -34,7 +34,6 @@ function llxHeader($head = "", $urlp = "", $title="") { global $user, $conf, $langs; $langs->load("products"); - $user->getrights("produit"); top_menu($head, $title); diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 459f473c2c6..0444e16f094 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -29,8 +29,6 @@ require_once("./pre.inc.php"); require_once("./entrepot.class.php"); -$user->getrights(); - $langs->load("stocks"); if (!$user->rights->stock->lire) diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/liste.php index 7e8f9b3a63a..ce45d0d8b22 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/liste.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once("./entrepot.class.php"); -$user->getrights(); - $langs->load("stocks"); if (!$user->rights->stock->lire) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 506d7c53176..904fa4fe1ce 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -29,7 +29,6 @@ */ require("./pre.inc.php"); -$user->getrights('produit'); $langs->load("products"); diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 6407f9c54ee..6be679e0385 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -38,7 +38,6 @@ $langs->load("products"); $langs->load("orders"); $langs->load("bills"); -$user->getrights('produit'); $mesg = ''; if (! $user->rights->produit->lire || ! $product->type == 0 || ! $conf->stock->enabled) diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index ec1558f5b6f..562201357fd 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); require_once("./entrepot.class.php"); -$user->getrights(); - $langs->load("stocks"); if (!$user->rights->stock->lire) diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index b401b843692..6346f9ddfe9 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -35,8 +35,6 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); $langs->load("products"); $langs->load("bills"); -$user->getrights('produit'); - if (!$user->rights->produit->lire) accessforbidden(); diff --git a/htdocs/projet/activity/myactivity.php b/htdocs/projet/activity/myactivity.php index 243647f08ac..7ba45a5844f 100644 --- a/htdocs/projet/activity/myactivity.php +++ b/htdocs/projet/activity/myactivity.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -29,8 +28,6 @@ require("./pre.inc.php"); -$user->getrights('projet'); - if (!$user->rights->projet->lire) accessforbidden(); /* diff --git a/htdocs/projet/activity/pre.inc.php b/htdocs/projet/activity/pre.inc.php index 542c0e1fbfc..436a251011c 100644 --- a/htdocs/projet/activity/pre.inc.php +++ b/htdocs/projet/activity/pre.inc.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/task.class.php"); $langs->load("projects"); $langs->load("companies"); -$user->getrights('projet'); - function llxHeader($head = "", $title="", $help_url='') { global $langs; diff --git a/htdocs/projet/pre.inc.php b/htdocs/projet/pre.inc.php index e3929d691cf..a91b946dab0 100644 --- a/htdocs/projet/pre.inc.php +++ b/htdocs/projet/pre.inc.php @@ -38,8 +38,6 @@ $langs->load("orders"); $langs->load("commercial"); -$user->getrights('projet'); - function llxHeader($head = "", $title="", $help_url='') { global $langs; diff --git a/htdocs/projet/tasks/pre.inc.php b/htdocs/projet/tasks/pre.inc.php index b7eb76da88e..ec43611942d 100644 --- a/htdocs/projet/tasks/pre.inc.php +++ b/htdocs/projet/tasks/pre.inc.php @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -25,7 +24,6 @@ \brief Fichier de gestion du menu gauche du module projet \version $Revision$ */ - require ("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/project.class.php"); require_once(DOL_DOCUMENT_ROOT."/task.class.php"); @@ -33,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/task.class.php"); $langs->load("projects"); $langs->load("companies"); -$user->getrights('projet'); - function llxHeader($head = "", $title="", $help_url='') { global $langs; diff --git a/htdocs/searchpostalcode.php b/htdocs/searchpostalcode.php index 66cf72c76e4..7c6dfe5b152 100644 --- a/htdocs/searchpostalcode.php +++ b/htdocs/searchpostalcode.php @@ -44,10 +44,8 @@ \brief Recherche de la ville correspondant au code postal saisi. 1er tour on cherche dans la table societé, si on a deux clients dans la même ville c'est direct. Si jamais ça ne donne rien alors on lance la recherche dans la table des codes postaux. \version $Revision$ */ - require("pre.inc.php"); -$user->getrights('societe'); $langs->load("companies"); diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 86260bd0d21..f192170c710 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -29,8 +28,6 @@ require("./pre.inc.php"); -$user->getrights(); - $langs->load("companies"); $langs->load("commercial"); $langs->load("customers"); diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index 6195eb5a059..3d125c99461 100644 --- a/htdocs/societe/info.php +++ b/htdocs/societe/info.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/societe.class.php"); $langs->load("companies"); $langs->load("other"); -$user->getrights('commercial'); - // Sécurité accés client $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($socid == '') accessforbidden(); diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index e5b1c0605de..9b9879b088b 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -29,16 +29,11 @@ require("./pre.inc.php"); -$user->getrights(); - $langs->load("companies"); $langs->load("customers"); $langs->load("suppliers"); $langs->load("banks"); -$user->getrights('societe'); -$user->getrights('commercial'); - if ( !$user->rights->societe->creer) accessforbidden(); diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 1e712e07690..7984e9d9a43 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -34,8 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); $langs->load("companies"); $langs->load("mails"); -$user->getrights('commercial'); - // Sécurité accés client $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($socid == '') accessforbidden(); diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index d810d28d448..8b03ba98503 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -34,9 +34,6 @@ require_once DOL_DOCUMENT_ROOT . "/companybankaccount.class.php"; $langs->load("companies"); $langs->load("banks"); -$user->getrights('societe'); -$user->getrights('commercial'); - if ( !$user->rights->societe->creer) accessforbidden(); diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 0a5b3ab96d3..aa16c9ac261 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -35,8 +35,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); if ($conf->ldap->enabled) require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); if ($conf->adherent->enabled) require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); -$user->getrights('user'); - // Defini si peux creer un utilisateur ou gerer groupe sur un utilisateur $canadduser=($user->admin || $user->rights->user->user->creer); // Defini si peux lire/modifier permisssions diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 47811b03947..8f2aafb0d7d 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); -$user->getrights('user'); - // Defini si peux lire/modifier utilisateurs et permisssions $canreadperms=($user->admin || $user->rights->user->user->lire); $caneditperms=($user->admin || $user->rights->user->user->creer); diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 53d9c099701..5bd57c85bc9 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -28,7 +27,6 @@ require("./pre.inc.php"); -$user->getrights(); if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden(); diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index 116df0c7517..b029844e63f 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); -$user->getrights('commercial'); - $langs->load("companies"); $langs->load("ldap"); diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 67c45be18c3..e92d0507b57 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -39,7 +39,6 @@ $form = new Form($db); $module=isset($_GET["module"])?$_GET["module"]:$_POST["module"]; // Defini si peux modifier utilisateurs et permisssions -$user->getrights('user'); // les droits n'était pas récupéré $caneditperms=($user->admin || $user->rights->user->user->creer); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 6a4972aaf65..ac9e29c797f 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -28,8 +28,6 @@ require("./pre.inc.php"); -$user->getrights(); - if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden(); $langs->load("users"); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 2c8d119441b..130cf1652b1 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -31,8 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/user.class.php"); $langs->load("user"); -$user->getrights('user'); - // Sécurité accés client et commerciaux $id = isset($_GET["id"])?$_GET["id"]:''; diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index c08d256091e..09f968a2c8c 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -30,8 +30,6 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/usergroups.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php"); -$user->getrights('commercial'); - $langs->load("users"); $langs->load("admin"); $langs->load("companies"); diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 71624615ab9..59d4e449f50 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -33,8 +33,6 @@ require_once(DOL_DOCUMENT_ROOT.'/user.class.php'); $action=isset($_GET["action"])?$_GET["action"]:(isset($_POST["action"])?$_POST["action"]:""); $id=isset($_GET["id"])?$_GET["id"]:(isset($_POST["id"])?$_POST["id"]:""); -$user->getrights('user'); - $langs->load("companies"); $langs->load("members"); $langs->load("bills"); diff --git a/htdocs/user/pre.inc.php b/htdocs/user/pre.inc.php index d6adde2dfe8..1cf4fb183a1 100644 --- a/htdocs/user/pre.inc.php +++ b/htdocs/user/pre.inc.php @@ -15,21 +15,15 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/user/pre.inc.php \brief Gestionnaire menu fichier users - \version $Revision$ + \version $Id$ */ - require("../main.inc.php"); -$user->getrights('user'); - function llxHeader($head = "", $title = "") { global $user,$langs; diff --git a/htdocs/webcal/pre.inc.php b/htdocs/webcal/pre.inc.php index 5acf23eb07a..b2f8303d29a 100644 --- a/htdocs/webcal/pre.inc.php +++ b/htdocs/webcal/pre.inc.php @@ -14,21 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/webcal/pre.inc.php \ingroup webcalendar \brief Fichier de gestion du menu gauche du module webcalendar - \version $Revision$ + \version $Id$ */ - require ("../main.inc.php"); -$user->getrights('webcal'); function llxHeader($head = "", $title="", $help_url='') { @@ -37,9 +32,7 @@ function llxHeader($head = "", $title="", $help_url='') top_menu($head, $title); $menu = new Menu(); - - - + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/webcal/webcal.php b/htdocs/webcal/webcal.php index 7d8b26fe7f9..7eb8aa489a9 100644 --- a/htdocs/webcal/webcal.php +++ b/htdocs/webcal/webcal.php @@ -29,8 +29,6 @@ require("./pre.inc.php"); if (empty($conf->global->PHPWEBCALENDAR_URL)) { - $user->getrights(); - llxHeader(); print '
Module Webcalendar was not configured properly.
'; llxFooter('$Date$ - $Revision$');
'.$langs->trans("NoProject").''.$langs->trans("Add").'