diff --git a/html/admin/sql/patch/upgrade4.sql b/html/admin/sql/patch/upgrade4.sql index 045349a22..c7a484bd1 100644 --- a/html/admin/sql/patch/upgrade4.sql +++ b/html/admin/sql/patch/upgrade4.sql @@ -49,5 +49,12 @@ alter table jrn add jr_pj oid ; alter table jrn add jr_pj_name text; alter table jrn add jr_pj_type text; +-- task 3858 +delete from user_sec_act WHERE ua_act_id =14; +delete from action where ac_id=14; +insert into action values (18,'Devise'); +insert into action values (19,'Période'); +insert into action values (20,'Voir la balance des comptes'); + -- always last line update version set val=5; diff --git a/html/bal_csv.php b/html/bal_csv.php index 15ad88352..4a38ece14 100644 --- a/html/bal_csv.php +++ b/html/bal_csv.php @@ -29,9 +29,13 @@ $cn=DbConnect($_SESSION['g_dossier']); include ('class_user.php'); -$User=new cl_user($cn); +$User=new cl_user(DbConnect()); $User->Check(); - +if ( $User->CheckAction($cn,BALANCE) == 0) + { + NoAccess(); + exit; + } $bal=new Balance($cn); $t_cent=""; diff --git a/html/central.php b/html/central.php index 6e9eb971d..d4e701fa2 100644 --- a/html/central.php +++ b/html/central.php @@ -40,20 +40,18 @@ include_once("preference.php"); include_once ("user_menu.php"); ShowMenuCompta($_SESSION['g_dossier']); -if ( $_SESSION['use_admin']==0 ) { - $r=CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],CENTRALIZE); - if ($r == 0 ){ +$cn=DbConnect($_SESSION['g_dossier']); +if ( $User->CheckAction($cn,CENTRALIZE)==0 ) { /* Cannot Access */ NoAccess(); - } } + include_once("central_inc.php"); echo '