From 34f902cc50156697f8cd2492dce359918c09a1bc Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 6 Dec 2004 10:16:56 +0000 Subject: [PATCH] =?UTF-8?q?Modif=20de=20la=20d=E9finition=20des=20permissi?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/modules/modFacture.class.php | 48 +++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index 78e71ea8ad5..6dac0d983f4 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier @@ -136,17 +136,41 @@ class modFacture extends DolibarrModules // Permissions $this->remove(); - $sql = array( - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (10,'Tous les droits sur les factures','facture','a',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (11,'Lire les factures','facture','r',1);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (12,'Créer modifier les factures','facture','w',0);", - //"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (13,'Modifier les factures d\'autrui','facture','m',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (14,'Valider les factures','facture','d',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (15,'Envoyer les factures aux clients','facture','d',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (16,'Emettre des paiements sur les factures','facture','d',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (19,'Supprimer les factures','facture','d',0);" - ); - + $this->rights[0][0] = 10; + $this->rights[0][1] = 'Tous les droits sur les factures'; + $this->rights[0][2] = 'a'; + $this->rights[0][3] = 0; + + $this->rights[1][0] = 11; + $this->rights[1][1] = 'Consulter les factures'; + $this->rights[1][2] = 'a'; + $this->rights[1][3] = 0; + + $this->rights[2][0] = 11; + $this->rights[2][1] = 'Créer/modifier les factures'; + $this->rights[2][2] = 'a'; + $this->rights[2][3] = 0; + + $this->rights[3][0] = 14; + $this->rights[3][1] = 'Valider les factures'; + $this->rights[3][2] = 'a'; + $this->rights[3][3] = 0; + + $this->rights[4][0] = 15; + $this->rights[4][1] = 'Envoyer les factures aux clients'; + $this->rights[4][2] = 'a'; + $this->rights[4][3] = 0; + + $this->rights[5][0] = 16; + $this->rights[5][1] = 'Emettre des paiements sur les factures'; + $this->rights[5][2] = 'a'; + $this->rights[5][3] = 0; + + $this->rights[6][0] = 19; + $this->rights[6][1] = 'Supprimer les factures'; + $this->rights[6][2] = 'a'; + $this->rights[6][3] = 0; + return $this->_init($sql); }