mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +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() {
|
function LSldapConnect() {
|
||||||
if ($this -> ldapServer) {
|
if ($this -> ldapServer) {
|
||||||
include_once($GLOBALS['LSconfig']['NetLDAP2']);
|
@include_once($GLOBALS['LSconfig']['NetLDAP2']);
|
||||||
if (!$this -> loadLSclass('LSldap'))
|
if (!$this -> loadLSclass('LSldap')) {
|
||||||
return;
|
return;
|
||||||
$GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
|
}
|
||||||
if ($GLOBALS['LSldap'] -> isConnected())
|
$GLOBALS['LSldap'] = @new LSldap($this -> ldapServer['ldap_config']);
|
||||||
|
if ($GLOBALS['LSldap'] -> isConnected()) {
|
||||||
return true;
|
return true;
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
return;
|
return;
|
||||||
return $GLOBALS['LSldap'] = new LSldap($this -> ldapServer['ldap_config']);
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$GLOBALS['LSerror'] -> addErrorCode(1003);
|
$GLOBALS['LSerror'] -> addErrorCode(1003);
|
||||||
|
@ -1039,8 +1041,10 @@ class LSsession {
|
||||||
if ($object = new $conf['LSobject']()) {
|
if ($object = new $conf['LSobject']()) {
|
||||||
if ($object -> loadData($dn)) {
|
if ($object -> loadData($dn)) {
|
||||||
$listDns=$object -> getValue($conf['attr']);
|
$listDns=$object -> getValue($conf['attr']);
|
||||||
|
$valKey = (isset($conf['attr_value']))?$conf['attr_value']:'dn';
|
||||||
|
$val = $this -> LSuserObject -> getFData($valKey);
|
||||||
if (is_array($listDns)) {
|
if (is_array($listDns)) {
|
||||||
if (in_array($this -> dn,$listDns)) {
|
if (in_array($val,$listDns)) {
|
||||||
$this -> LSrights[$profile][] = $topDn;
|
$this -> LSrights[$profile][] = $topDn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue