ajout des droits pour charges et resultat (bug #6435)

This commit is contained in:
beedauchon 2003-11-08 19:05:47 +00:00
parent f3884ed6e7
commit 00402b08f0
7 changed files with 34 additions and 1 deletions

View File

@ -73,6 +73,8 @@
| 62 | Créer modifier les fiches d'intervention | ficheinter | w | 0 | | 62 | Créer modifier les fiches d'intervention | ficheinter | w | 0 |
| 64 | Supprimer les fiches d'intervention | ficheinter | d | 0 | | 64 | Supprimer les fiches d'intervention | ficheinter | d | 0 |
| 91 | Gestion banquaire | compta | a | 0 | | 91 | Gestion banquaire | compta | a | 0 |
| 92 | Gestion charges | compta | a | 0 |
| 93 | Gestion resultat | compta | a | 0 |
+----+---------------------------------------------------+------------+------+-----------+ +----+---------------------------------------------------+------------+------+-----------+
</example> </example>

View File

@ -25,6 +25,11 @@ require("../service.class.php");
llxHeader(); llxHeader();
$user->getrights('compta');
if (!$user->admin && !$user->rights->compta->charges)
accessforbidden();
if ($action == 'add') { if ($action == 'add') {
$service = new Service($db); $service = new Service($db);

View File

@ -23,6 +23,11 @@ require("./pre.inc.php");
llxHeader(); llxHeader();
$user->getrights('compta');
if (!$user->admin && !$user->rights->compta->charges)
accessforbidden();
function valeur($sql) function valeur($sql)
{ {
global $db; global $db;

View File

@ -27,6 +27,11 @@ require("./pre.inc.php");
llxHeader(); llxHeader();
$user->getrights('compta');
if (!$user->admin && !$user->rights->compta->resultat)
accessforbidden();
/* /*
* Sécurité accés client * Sécurité accés client
*/ */

View File

@ -22,10 +22,18 @@
require("./pre.inc.php"); require("./pre.inc.php");
require("../../tva.class.php"); require("../../tva.class.php");
require("../../chargesociales.class.php"); require("../../chargesociales.class.php");
/* /*
* *
*/ */
llxHeader(); llxHeader();
$user->getrights('compta');
if (!$user->admin && !$user->rights->compta->resultat)
accessforbidden();
?> ?>
<style type="text/css"> <style type="text/css">
td.border { border: 1px solid #000000} td.border { border: 1px solid #000000}

View File

@ -53,6 +53,8 @@ class modComptabilite extends modDolibarrModules
*/ */
$sql = array( $sql = array(
"insert into llx_rights_def values (91,'Gestion banquaire','compta','a',1);", "insert into llx_rights_def values (91,'Gestion banquaire','compta','a',1);",
"insert into llx_rights_def values (92,'Gestion charges','compta','a',1);",
"insert into llx_rights_def values (93,'Gestion resultat','compta','a',1);",
); );
return $this->_init($sql); return $this->_init($sql);

View File

@ -310,7 +310,13 @@ class User
if ($obj->fk_id == 91) if ($obj->fk_id == 91)
$this->rights->compta->bank = 1; $this->rights->compta->bank = 1;
if ($obj->fk_id == 92)
$this->rights->compta->charges = 1;
if ($obj->fk_id == 93)
$this->rights->compta->resultat = 1;
} }
$i++; $i++;