mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-23 00:43:48 +01:00
- LSsession :
-> Correction du chargement de Net_LDAP2 -> Ajout de la possibilité d'avoir autre chose que le dn en valeur clef dans la méthode loadLSrights() (type groupe)
This commit is contained in:
parent
15f678b67b
commit
e9d3b321d8
1 changed files with 13 additions and 9 deletions
|
@ -555,15 +555,17 @@ class LSsession {
|
|||
*/
|
||||
function LSldapConnect() {
|
||||
if ($this -> ldapServer) {
|
||||
include_once($GLOBALS['LSconfig']['NetLDAP2']);
|
||||
if (!$this -> loadLSclass('LSldap'))
|
||||
@include_once($GLOBALS['LSconfig']['NetLDAP2']);
|
||||
if (!$this -> loadLSclass('LSldap')) {
|
||||
return;
|
||||
$GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
|
||||
if ($GLOBALS['LSldap'] -> isConnected())
|
||||
return true;
|
||||
else
|
||||
return;
|
||||
return $GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
|
||||
}
|
||||
$GLOBALS['LSldap'] = @new LSldap($this -> ldapServer['ldap_config']);
|
||||
if ($GLOBALS['LSldap'] -> isConnected()) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$GLOBALS['LSerror'] -> addErrorCode(1003);
|
||||
|
@ -1039,8 +1041,10 @@ class LSsession {
|
|||
if ($object = new $conf['LSobject']()) {
|
||||
if ($object -> loadData($dn)) {
|
||||
$listDns=$object -> getValue($conf['attr']);
|
||||
$valKey = (isset($conf['attr_value']))?$conf['attr_value']:'dn';
|
||||
$val = $this -> LSuserObject -> getFData($valKey);
|
||||
if (is_array($listDns)) {
|
||||
if (in_array($this -> dn,$listDns)) {
|
||||
if (in_array($val,$listDns)) {
|
||||
$this -> LSrights[$profile][] = $topDn;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue