diff options
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r-- | lib/plugins/authldap/auth.php | 10 | ||||
-rw-r--r-- | lib/plugins/authldap/conf/default.php | 1 | ||||
-rw-r--r-- | lib/plugins/authldap/conf/metadata.php | 1 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/de-informal/settings.php | 6 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/en/settings.php | 9 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/pt-br/settings.php | 7 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/sv/settings.php | 16 |
7 files changed, 44 insertions, 6 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index b49aa4792..6a967a6d4 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -248,7 +248,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } // always add the default group to the list of groups - if(!in_array($conf['defaultgroup'], $info['grps'])) { + if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } return $info; @@ -502,23 +502,23 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @return resource */ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, - $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) { + $attrsonly = 0, $sizelimit = 0) { if(is_null($attributes)) $attributes = array(); if($scope == 'base') { return @ldap_read( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } elseif($scope == 'one') { return @ldap_list( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } else { return @ldap_search( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index d530d59c9..2c295eeeb 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -9,6 +9,7 @@ $conf['groupfilter'] = ''; $conf['version'] = 2; $conf['starttls'] = 0; $conf['referrals'] = 0; +$conf['deref'] = 0; $conf['binddn'] = ''; $conf['bindpw'] = ''; //$conf['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index fc5b2e63c..a3256628c 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -8,6 +8,7 @@ $meta['groupfilter'] = array('string'); $meta['version'] = array('numeric'); $meta['starttls'] = array('onoff'); $meta['referrals'] = array('onoff'); +$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['binddn'] = array('string'); $meta['bindpw'] = array('password'); //$meta['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php index fa0fc1521..15e4d8129 100644 --- a/lib/plugins/authldap/lang/de-informal/settings.php +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -4,6 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Matthias Schulte <dokuwiki@lupo49.de> + * @author Volker Bödker <volker@boedker.de> */ $lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (<code>localhost</code>) oder als FQDN (<code>ldap://server.tld:389</code>).'; $lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; @@ -14,9 +15,14 @@ $lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. $lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; $lang['starttls'] = 'Verbindung über TLS aufbauen?'; $lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; +$lang['deref'] = 'Wie sollen Aliasse derefernziert werden?'; $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.'; $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; $lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; $lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; +$lang['deref_o_0'] = 'LDAP_DEREF_NIEMALS'; +$lang['deref_o_1'] = 'LDAP_DEREF_SUCHEN'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDEN'; +$lang['deref_o_3'] = 'LDAP_DEREF_IMMER'; diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index ddedf8ae3..e3f385f99 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -8,9 +8,16 @@ $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&(objec $lang['version'] = 'The protocol version to use. You may need to set this to <code>3</code>'; $lang['starttls'] = 'Use TLS connections?'; $lang['referrals'] = 'Shall referrals be followed?'; +$lang['deref'] = 'How to dereference aliases?'; $lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; $lang['debug'] = 'Display additional debug information on errors'; + + +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
\ No newline at end of file diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php index daf9efd00..70b68b289 100644 --- a/lib/plugins/authldap/lang/pt-br/settings.php +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -8,12 +8,19 @@ $lang['server'] = 'Seu servidor LDAP. Ou hostname (<code>localhos $lang['port'] = 'Porta LDAP do servidor se nenhuma URL completa tiver sido fornecida acima'; $lang['usertree'] = 'Onde encontrar as contas de usuários. Eg. <code>ou=Pessoas, dc=servidor, dc=tld</code>'; $lang['grouptree'] = 'Onde encontrar os grupos de usuários. Eg. <code>ou=Pessoas, dc=servidor, dc=tld</code>'; +$lang['userfilter'] = 'Filtro do LDAP para procurar por contas de usuários. Eg. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'Filtro do LDAP 0ara procurar por grupos. Eg. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'A versão do protocolo para usar. Você talvez deva definir isto para <code>3</code>'; $lang['starttls'] = 'Usar conexões TLS?'; $lang['referrals'] = 'Permitir referências serem seguidas?'; +$lang['deref'] = 'Como respeitar aliases ?'; $lang['binddn'] = 'DN de um vínculo opcional de usuário se vínculo anônimo não for suficiente. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Senha do usuário acima'; $lang['userscope'] = 'Limitar escopo da busca para busca de usuário'; $lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; $lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone'; $lang['debug'] = 'Mostrar informações adicionais de depuração em erros'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authldap/lang/sv/settings.php b/lib/plugins/authldap/lang/sv/settings.php new file mode 100644 index 000000000..0fdcad147 --- /dev/null +++ b/lib/plugins/authldap/lang/sv/settings.php @@ -0,0 +1,16 @@ +<?php +/** + * Swedish language file + * + * @author Smorkster Andersson smorkster@gmail.com + */ +$lang['server'] = 'Din LDAO server. Antingen värdnamn (<code>localhost</code>) eller giltig full URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'LDAP server port, om det inte angavs full URL ovan'; +$lang['usertree'] = 'Specificera var användarkonton finns. T.ex. <code>ou=Användare, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Specificera var grupper finns. T.ex. <code>ou=Grupp, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'LDAP filter för att söka efter användarkonton. T.ex. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP filter för att söka efter grupper. T.ex. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Version av protokoll att använda. Du kan behöva sätta detta till <code>3</code>'; +$lang['bindpw'] = 'Lösenord för användare ovan'; +$lang['groupkey'] = 'Gruppmedlemskap från något användarattribut (istället för standard AD grupp) t.ex. grupp från avdelning eller telefonnummer'; +$lang['debug'] = 'Visa ytterligare felsökningsinformation vid fel'; |