diff --git a/public_html/includes/addons/LSaddons.supann.php b/public_html/includes/addons/LSaddons.supann.php index 38693f98..5e26d0a9 100644 --- a/public_html/includes/addons/LSaddons.supann.php +++ b/public_html/includes/addons/LSaddons.supann.php @@ -305,7 +305,7 @@ LSerror :: defineError('SUPANN_02', function supanGetEntiteNameById($id) { if (LSsession::loadLSobject($GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'])) { $e = new $GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'](); - $list=$e -> listObjectsName("(supannCodeEntite=$id)",NULL,array(),$GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_FORMAT_SHORTNAME']); + $list=$e -> listObjectsName("(supannCodeEntite=$id)",NULL,array('onlyAccessible' => false),$GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_FORMAT_SHORTNAME']); if (count($list)==1) { return array_pop($list); } @@ -323,7 +323,7 @@ LSerror :: defineError('SUPANN_02', function supannValidateEntityId($id) { if (LSsession::loadLSobject($GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'])) { $e = new $GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'](); - $list=$e -> listObjectsName("(supannCodeEntite=$id)"); + $list=$e -> listObjectsName("(supannCodeEntite=$id)",NULL,array('onlyAccessible' => False)); if (count($list)==1) { return true; } @@ -351,6 +351,7 @@ LSerror :: defineError('SUPANN_02', 'pattern' => $pattern, 'attributes' => array('supannCodeEntite'), 'sizelimit' => 10, + 'onlyAccessible' => false ) ); $search -> run(); diff --git a/public_html/includes/class/class.LSauthMethod.php b/public_html/includes/class/class.LSauthMethod.php index 745be780..e02c7562 100644 --- a/public_html/includes/class/class.LSauthMethod.php +++ b/public_html/includes/class/class.LSauthMethod.php @@ -61,7 +61,7 @@ class LSauthMethod { $this -> authData['username'], LSsession :: getTopDn(), (isset(LSsession :: $ldapServer['authObjectFilter'])?LSsession :: $ldapServer['authObjectFilter']:NULL), - array('withoutCache' => true) + array('withoutCache' => true, 'onlyAccessible' => false) ); $nbresult=count($result); diff --git a/public_html/includes/class/class.LSldapObject.php b/public_html/includes/class/class.LSldapObject.php index 30952a6b..cda58f17 100644 --- a/public_html/includes/class/class.LSldapObject.php +++ b/public_html/includes/class/class.LSldapObject.php @@ -472,7 +472,9 @@ class LSldapObject { foreach($data as $val) { // validation par check LDAP if((isset($test['filter'])||isset($test['basedn']))&&(isset($test['result']))) { - $sparams=(isset($test['scope']))?array('scope' => $test['scope']):array(); + $sparams=array('onlyAccessible' => False); + if (isset($test['scope'])) + $sparams['scope'] = $test['scope']; $this -> other_values['val']=$val; // Filter from test configuration if (isset($test['filter']) && !empty($test['filter'])) { @@ -954,8 +956,9 @@ class LSldapObject { * * @retval array('dn' => 'display') */ - function getSelectArray($pattern=NULL,$topDn=NULL,$displayFormat=NULL,$approx=false,$cache=true,$filter=NULL) { - return $this -> listObjectsName($filter,$topDn,array('pattern' => $pattern),$displayFormat,$cache); + function getSelectArray($pattern=NULL,$topDn=NULL,$displayFormat=NULL,$approx=false,$cache=true,$filter=NULL,$sparams=array()) { + $sparams['pattern']=$pattern; + return $this -> listObjectsName($filter,$topDn,$sparams,$displayFormat,$cache); } /** @@ -1382,7 +1385,7 @@ class LSldapObject { } if ($val) { $filter = Net_LDAP2_Filter::create($attr,'equals',$val); - return $this -> listObjects($filter,LSsession :: getRootDn(),array('scope' => 'sub','recursive' => true,'withoutCache'=>true)); + return $this -> listObjects($filter,LSsession :: getRootDn(),array('scope' => 'sub','recursive' => true,'withoutCache'=>true, 'onlyAccessible' => false)); } return; } diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 27a8ebc4..5ed92282 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -670,13 +670,14 @@ class LSsession { 'equals', $recoveryHash ); - $result = $authobject -> listObjects($filter,self :: $topDn); + $result = $authobject -> listObjects($filter,self :: $topDn,array('onlyAccessible' => false)); } elseif (!empty($username)) { $result = $authobject -> searchObject( $username, self :: $topDn, - self :: $ldapServer['authObjectFilter'] + self :: $ldapServer['authObjectFilter'], + array('onlyAccessible' => false) ); } else { @@ -1704,7 +1705,7 @@ class LSsession { foreach($config as $objectType => $objectConf) { if (self :: loadLSobject($objectType)) { if ($subdnobject = new $objectType()) { - $tbl = $subdnobject -> getSelectArray(NULL,self::getRootDn(),NULL,NULL,false); + $tbl = $subdnobject -> getSelectArray(NULL,self::getRootDn(),NULL,NULL,false,NULL,array('onlyAccessible' => False)); if (is_array($tbl)) { // Définition des accès $access=array();