passage en nouvelle version ? j'ai recopié ce qu'il y a dans le module modFacture

This commit is contained in:
erics 2004-12-22 20:27:10 +00:00
parent 989971c985
commit ae060a7e18
2 changed files with 58 additions and 17 deletions

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
*
* 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
@ -89,15 +90,34 @@ class modCommande extends DolibarrModules
{
// Permissions
$this->remove();
$sql = array(
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (80,'Tous les droits sur les commandes','commande','a',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (81,'Lire les commandes','commande','r',1);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (82,'Créer modifier les commandes','commande','w',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (84,'Valider les commandes','commande','d',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (89,'Supprimer les commandes','commande','d',0);",
);
$this->rights[0][0] = 80; // id de la permission
$this->rights[0][1] = 'Tous les droits sur les commandes'; // 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] = 81;
$this->rights[1][1] = 'Lire les commandes';
$this->rights[1][2] = 'r';
$this->rights[1][3] = 1;
$this->rights[2][0] = 82;
$this->rights[2][1] = 'Créer modifier les commandes';
$this->rights[2][2] = 'w';
$this->rights[2][3] = 0;
$this->rights[3][0] = 84;
$this->rights[3][1] = 'Valider les commandes';
$this->rights[3][2] = 'd';
$this->rights[3][3] = 0;
$this->rights[4][0] = 89;
$this->rights[4][1] = 'Supprimer les commandes';
$this->rights[4][2] = 'd';
$this->rights[4][3] = 0;
$sql = array();
return $this->_init($sql);
}

View File

@ -86,14 +86,35 @@ class modExpedition extends DolibarrModules
// Permissions
$this->remove();
$sql = array(
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (100,'Tous les droits sur les expeditions','expedition','a',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (101,'Lire les expeditions','expedition','r',1);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (102,'Créer modifier les expeditions','expedition','w',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (104,'Valider les expeditions','expedition','d',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (109,'Supprimer les expeditions','expedition','d',0);",
);
$sql = array();
$this->rights[0][0] = 100; // id de la permission
$this->rights[0][1] = 'Tous les droits sur les expeditions'; // 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] = 101;
$this->rights[1][1] = 'Lire les expeditions';
$this->rights[1][2] = 'r';
$this->rights[1][3] = 1;
$this->rights[2][0] = 102;
$this->rights[2][1] = 'Créer modifier les expeditions';
$this->rights[2][2] = 'w';
$this->rights[2][3] = 0;
$this->rights[3][0] = 104;
$this->rights[3][1] = 'Valider les expeditions';
$this->rights[3][2] = 'd';
$this->rights[3][3] = 0;
$this->rights[4][0] = 109;
$this->rights[4][1] = 'Supprimer les expeditions';
$this->rights[4][2] = 'd';
$this->rights[4][3] = 0;
$sql = array();
return $this->_init($sql);
}