ajout des droits pour charges et resultat (bug #6435)
This commit is contained in:
parent
f3884ed6e7
commit
00402b08f0
@ -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 |
|
||||
+----+---------------------------------------------------+------------+------+-----------+
|
||||
|
||||
</example>
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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();
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
td.border { border: 1px solid #000000}
|
||||
|
||||
@ -53,6 +53,8 @@ class modComptabilite extends modDolibarrModules
|
||||
*/
|
||||
$sql = array(
|
||||
"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);
|
||||
|
||||
@ -310,7 +310,13 @@ class User
|
||||
|
||||
if ($obj->fk_id == 91)
|
||||
$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++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user