From 4db345ed80d2c01c6b95d578615217844dcf2b1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Nov 2004 00:08:18 +0000 Subject: [PATCH] =?UTF-8?q?Utilisation=20de=20la=20m=E9thode=20m=E8re=20de?= =?UTF-8?q?=20cr=E9ation=20des=20droits=20pour=20l'activation=20du=20modul?= =?UTF-8?q?e=20pr=E9l=E8vement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../includes/modules/modPrelevement.class.php | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php index 85a7348a5b2..e08e1b06d93 100644 --- a/htdocs/includes/modules/modPrelevement.class.php +++ b/htdocs/includes/modules/modPrelevement.class.php @@ -77,11 +77,26 @@ class modPrelevement extends DolibarrModules * Permissions */ $this->remove(); - $sql = array( - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (150,'Tous les droits sur les prélèvements','prelevement','a',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (151,'Consulter les prelevement','prélèvements','r',0);", - "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (152,'Configurer les prelevement','prélèvements','w',0);"); - + + $this->rights = array(); + + $this->rights_class = 'prelevement'; + + $this->rights[0][0] = 150; // id de la permission + $this->rights[0][1] = 'Tous les droits sur les prélèvements'; // libelle de la permission + $this->rights[0][2] = 'a'; // type de la permission (déprécié à ce jour) + $this->rights[0][3] = 0; // La permission est-elle une permission par défaut + + $this->rights[1][0] = 151; + $this->rights[1][1] = 'Consulter les prélèvements'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + + $this->rights[2][0] = 152; + $this->rights[2][1] = 'Configurer les prélèvements'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + /* * Documents *