From dc3c367f2f8d1fb919e2e0e66ff4badeb6d6446f Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 23 Mar 2017 16:26:28 +0100 Subject: [PATCH] LSsession / subDn : add parameter to handle onlyAccessible LSsearch parameter --- doc/conf/subDn.docbook | 1 + public_html/includes/class/class.LSsession.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/conf/subDn.docbook b/doc/conf/subDn.docbook index 665a2ebf..ed922290 100644 --- a/doc/conf/subDn.docbook +++ b/doc/conf/subDn.docbook @@ -83,6 +83,7 @@ l'annuaire. 'basedn' => '[basedn]', // Le basedn de la recherche 'displayValue' => '[format]', // Format du nom des sous-niveaux 'nologin' => true, // Désactive la connection dans ces subDn + 'onlyAccessible' => True, // Pour que seul les LSobjet accessible à l'utilisateur soit listé 'LSobjects' => array( // Liste des types d'LSobjets présents dans les sous-niveaux [LSobject1], [LSobject2], diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 5ed92282..817b0581 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -1063,9 +1063,11 @@ class LSsession { else { $displayName = NULL; } + $sparams = array(); + $sparams['onlyAccessible'] = (isset($LSoject_config['onlyAccessible'])?$LSoject_config['onlyAccessible']:False); if( self :: loadLSobject($LSobject_name) ) { if ($subdnobject = new $LSobject_name()) { - $tbl_return = $subdnobject -> getSelectArray(NULL,$basedn,$displayName); + $tbl_return = $subdnobject -> getSelectArray(NULL,$basedn,$displayName,false,false,NULL,$sparams); if (is_array($tbl_return)) { $return=array_merge($return,$tbl_return); }