From 1e993cfbe25bede836979c20881218331b847a59 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 2 Apr 2010 16:02:20 +0000 Subject: [PATCH] =?UTF-8?q?gestion=20de=20la=20surveillance=20privil=C3=A8?= =?UTF-8?q?ge,=20fixed=20issue=20#0000222?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/surveillance/surveillance.php | 2 ++ www/pages/options_surv.php | 26 ++++++++++++++------------ www/pages/piecescmd.php | 23 ++++++++++++++++++++--- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/includes/surveillance/surveillance.php b/includes/surveillance/surveillance.php index 75a751f31..cc21e7d05 100644 --- a/includes/surveillance/surveillance.php +++ b/includes/surveillance/surveillance.php @@ -10,6 +10,7 @@ function assocSourceDroit() 'score' => 'survscore', 'actes' => 'survactes', 'dirigeants' => 'survdirigeants', + 'privileges' => 'survpriv', ); } @@ -23,6 +24,7 @@ function assocSourceTxt() 'score' => 'IndiScore', 'actes' => 'les actes & status', 'dirigeants' => 'les dirigeants', + 'privileges' => 'les privilèges', ); } diff --git a/www/pages/options_surv.php b/www/pages/options_surv.php index 43291188c..c161e9708 100644 --- a/www/pages/options_surv.php +++ b/www/pages/options_surv.php @@ -47,7 +47,9 @@ $tabSource = array( 'bilans'=>'bilan', 'score'=>'score', 'actes'=>'actes', - 'dirigeants'=>'dirigeants'); + 'dirigeants'=>'dirigeants', + 'privileges'=>'priv', +); $nbAffichage = 100; //Enregistrement pour liste dernière recherche @@ -66,7 +68,6 @@ try{ $nbSurveillances = $result['results']['nbReponsesTotal']; $totPage = ceil($nbSurveillances/$nbAffichage); $curPage = ceil($position/$nbAffichage); - } catch (SoapFault $fault) { require_once 'soaperror.php'; processSoapFault($client,$fault,$tabInfo); @@ -147,7 +148,7 @@ if($vue=='default'){ $perm) { - if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) + if(hasPerm('surv'.$perm)) { ?> @@ -169,7 +170,7 @@ Afficher uniquement les suveillances de type $perm) { - if(preg_match('/\bsurv'.$perm.'\b/i', $_SESSION['tabInfo']['droits'])) + if(hasPerm('surv'.$perm)) { ?>