diff --git a/doc/dev/permissions.sgml b/doc/dev/permissions.sgml index cb1642381e8..dd48ce855c3 100644 --- a/doc/dev/permissions.sgml +++ b/doc/dev/permissions.sgml @@ -73,6 +73,8 @@ | 62 | Créer modifier les fiches d'intervention | ficheinter | w | 0 | | 64 | Supprimer les fiches d'intervention | ficheinter | d | 0 | | 91 | Gestion banquaire | compta | a | 0 | +| 92 | Gestion charges | compta | a | 0 | +| 93 | Gestion resultat | compta | a | 0 | +----+---------------------------------------------------+------------+------+-----------+ diff --git a/htdocs/compta/charges/fiche.php b/htdocs/compta/charges/fiche.php index 60fb4bab1a9..f29a688c800 100644 --- a/htdocs/compta/charges/fiche.php +++ b/htdocs/compta/charges/fiche.php @@ -25,6 +25,11 @@ require("../service.class.php"); llxHeader(); +$user->getrights('compta'); + +if (!$user->admin && !$user->rights->compta->charges) + accessforbidden(); + if ($action == 'add') { $service = new Service($db); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index b006b85838d..cda90dd344f 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -23,6 +23,11 @@ require("./pre.inc.php"); llxHeader(); +$user->getrights('compta'); + +if (!$user->admin && !$user->rights->compta->charges) + accessforbidden(); + function valeur($sql) { global $db; diff --git a/htdocs/compta/resultat/caisse.php b/htdocs/compta/resultat/caisse.php index c9ca80171d6..2d66858f151 100644 --- a/htdocs/compta/resultat/caisse.php +++ b/htdocs/compta/resultat/caisse.php @@ -27,6 +27,11 @@ require("./pre.inc.php"); llxHeader(); +$user->getrights('compta'); + +if (!$user->admin && !$user->rights->compta->resultat) + accessforbidden(); + /* * Sécurité accés client */ diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 9f0a6818cae..541873145a4 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -22,10 +22,18 @@ require("./pre.inc.php"); require("../../tva.class.php"); require("../../chargesociales.class.php"); + /* * */ + llxHeader(); + +$user->getrights('compta'); + +if (!$user->admin && !$user->rights->compta->resultat) + accessforbidden(); + ?>