From 1180eff5e724971f888897964ee40376109482dc Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 21 Aug 2005 18:57:46 +0000 Subject: [PATCH] Modif permissions --- htdocs/commande/index.php | 3 ++- htdocs/commande/liste.php | 12 +++++------- htdocs/commande/pre.inc.php | 2 ++ htdocs/commande/stats/index.php | 3 +++ htdocs/commande/stats/pre.inc.php | 5 ++++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 1efe88ba360..55e44d35488 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -30,8 +30,9 @@ require("./pre.inc.php"); -$langs->load("orders"); +if (!$user->rights->commande->lire) accessforbidden(); +$langs->load("orders"); llxHeader("",$langs->trans("Orders"),"Commande"); diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index fcc3c332f55..af633a7ee23 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -22,10 +22,10 @@ */ /** - \file htdocs/commande/liste.php - \ingroup commande - \brief Page liste des commandes - \version $Revision$ + \file htdocs/commande/liste.php + \ingroup commande + \brief Page liste des commandes + \version $Revision$ */ @@ -33,9 +33,7 @@ require("./pre.inc.php"); $langs->load("orders"); -$user->getrights('commande'); -if (!$user->rights->commande->lire) - accessforbidden(); +if (!$user->rights->commande->lire) accessforbidden(); /* * Sécurité accés client diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index fe2dd646d7f..6b79f66b155 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -31,6 +31,8 @@ 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/index.php b/htdocs/commande/stats/index.php index eef7e04acc8..eba350d4358 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -29,6 +29,9 @@ */ require("./pre.inc.php"); + +if (!$user->rights->commande->lire) accessforbidden(); + require(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); require("./commandestats.class.php"); diff --git a/htdocs/commande/stats/pre.inc.php b/htdocs/commande/stats/pre.inc.php index 0f79795b4d8..693c0bc311f 100644 --- a/htdocs/commande/stats/pre.inc.php +++ b/htdocs/commande/stats/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -30,6 +30,9 @@ require("../../main.inc.php"); require("../../bargraph.class.php"); + +$user->getrights('commande'); + $langs->load("orders"); function llxHeader($head = "", $title="", $help_url='')