From dd7e6db627b9582dee2c737b5f16d1770e492986 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 11 Aug 2003 18:43:06 +0000 Subject: [PATCH] On utilise plus la notion d'autrui --- htdocs/includes/modules/modFacture.class.php | 4 +- .../includes/modules/modFicheinter.class.php | 3 +- htdocs/includes/modules/modProjet.class.php | 72 +++++++++++++++++++ 3 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 htdocs/includes/modules/modProjet.class.php diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index 23b0169bbe8..e362c3e9f62 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -99,8 +99,8 @@ class modFacture $sql[0] = "insert into llx_rights_def values (10,'Tous les droits sur les factures','facture','a',0);"; $sql[1] = "insert into llx_rights_def values (11,'Lire les factures','facture','r',1);"; $sql[2] = "insert into llx_rights_def values (12,'Créer modifier les factures','facture','w',0);"; - $sql[3] = "insert into llx_rights_def values (13,'Modifier les factures d\'autrui','facture','m',0);"; - $sql[4] = "insert into llx_rights_def values (14,'Supprimer les factures','facture','d',0);"; + // $sql[3] = "insert into llx_rights_def values (13,'Modifier les factures d\'autrui','facture','m',0);"; + $sql[3] = "insert into llx_rights_def values (14,'Supprimer les factures','facture','d',0);"; for ($i = 0 ; $i < sizeof($sql) ; $i++) { diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index 0c3b0d008c2..7522cfa3667 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -51,10 +51,9 @@ class modFicheinter "INSERT INTO llx_rights_def VALUES (60,'Tous les droits sur les fiches d\'intervention','ficheinter','a',0);", "INSERT INTO llx_rights_def VALUES (61,'Lire les fiches d\'intervention','ficheinter','r',1);", "INSERT INTO llx_rights_def VALUES (62,'Créer modifier les fiches d\'intervention','ficheinter','w',0);", - "INSERT INTO llx_rights_def VALUES (63,'Modifier les fiches d\'intervention d\'autrui','ficheinter','m',0);", "INSERT INTO llx_rights_def VALUES (64,'Supprimer les fiches d\'intervention','ficheinter','d',0);" ); - + //"INSERT INTO llx_rights_def VALUES (63,'Modifier les fiches d\'intervention d\'autrui','ficheinter','m',0);", for ($i = 0 ; $i < sizeof($sql) ; $i++) { $this->db->query($sql[$i]); diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php new file mode 100644 index 00000000000..b479319701d --- /dev/null +++ b/htdocs/includes/modules/modProjet.class.php @@ -0,0 +1,72 @@ + + * + * 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. + * + * $Id$ + * $Source$ + * + */ + +class modProjet +{ + + /* + * Initialisation + * + */ + + Function modProjet($DB) + { + $this->db = $DB ; + } + /* + * + * + * + */ + + Function init() + { + /* + * Activation du module + */ + /* + * Permissions + */ + $sql = array( + "insert into llx_rights_def values (40,'Tous les droits sur les projets','projet','a',0);", + "insert into llx_rights_def values (41,'Lire les projets','projet','r',1);", + "insert into llx_rights_def values (42,'Créer modifier les projets','projet','w',0);", + //"insert into llx_rights_def values (43,'Modifier les projets d\'autrui','projet','m',0);", + "insert into llx_rights_def values (44,'Supprimer les projets','projet','d',0);" + ); + + for ($i = 0 ; $i < sizeof($sql) ; $i++) + { + $this->db->query($sql[$i]); + } + } + /* + * + * + */ + Function remove() + { + $sql = "DELETE FROM llx_rights_def WHERE module = 'projet';"; + $this->db->query($sql); + } +} +?>