summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r--lib/plugins/authldap/auth.php21
-rw-r--r--lib/plugins/authldap/conf/default.php2
-rw-r--r--lib/plugins/authldap/conf/metadata.php2
-rw-r--r--lib/plugins/authldap/lang/cs/settings.php6
-rw-r--r--lib/plugins/authldap/lang/en/settings.php4
-rw-r--r--lib/plugins/authldap/lang/fa/settings.php10
-rw-r--r--lib/plugins/authldap/lang/no/settings.php2
-rw-r--r--lib/plugins/authldap/lang/pl/settings.php6
-rw-r--r--lib/plugins/authldap/lang/pt/settings.php10
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php14
10 files changed, 62 insertions, 15 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index b22b82ecc..50735882f 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -181,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
+ $info = array();
$info['user'] = $user;
$info['server'] = $this->getConf('server');
@@ -515,13 +516,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
// needs version 3
- if($this->getConf('referrals')) {
+ if($this->getConf('referrals') > -1) {
if(!@ldap_set_option(
$this->con, LDAP_OPT_REFERRALS,
$this->getConf('referrals')
)
) {
- msg('Setting LDAP referrals to off failed', -1);
+ msg('Setting LDAP referrals failed', -1);
$this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__);
}
}
@@ -564,15 +565,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* Wraps around ldap_search, ldap_list or ldap_read depending on $scope
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param resource $link_identifier
- * @param string $base_dn
- * @param string $filter
- * @param string $scope can be 'base', 'one' or 'sub'
- * @param null $attributes
- * @param int $attrsonly
- * @param int $sizelimit
- * @param int $timelimit
- * @param int $deref
+ * @param resource $link_identifier
+ * @param string $base_dn
+ * @param string $filter
+ * @param string $scope can be 'base', 'one' or 'sub'
+ * @param null|array $attributes
+ * @param int $attrsonly
+ * @param int $sizelimit
* @return resource
*/
protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,
diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php
index 2c295eeeb..c2e462c5c 100644
--- a/lib/plugins/authldap/conf/default.php
+++ b/lib/plugins/authldap/conf/default.php
@@ -8,7 +8,7 @@ $conf['userfilter'] = '';
$conf['groupfilter'] = '';
$conf['version'] = 2;
$conf['starttls'] = 0;
-$conf['referrals'] = 0;
+$conf['referrals'] = -1;
$conf['deref'] = 0;
$conf['binddn'] = '';
$conf['bindpw'] = '';
diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php
index 6aa53c40d..4649ba5bf 100644
--- a/lib/plugins/authldap/conf/metadata.php
+++ b/lib/plugins/authldap/conf/metadata.php
@@ -7,7 +7,7 @@ $meta['userfilter'] = array('string','_caution' => 'danger');
$meta['groupfilter'] = array('string','_caution' => 'danger');
$meta['version'] = array('numeric','_caution' => 'danger');
$meta['starttls'] = array('onoff','_caution' => 'danger');
-$meta['referrals'] = array('onoff','_caution' => 'danger');
+$meta['referrals'] = array('multichoice','_choices' => array(-1,0,1),'_caution' => 'danger');
$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'danger');
$meta['binddn'] = array('string','_caution' => 'danger');
$meta['bindpw'] = array('password','_caution' => 'danger');
diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php
index 20491f1fb..a5aad5981 100644
--- a/lib/plugins/authldap/lang/cs/settings.php
+++ b/lib/plugins/authldap/lang/cs/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author mkucera66@seznam.cz
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['server'] = 'Váš server LDAP. Buď jméno hosta (<code>localhost</code>) nebo plně kvalifikovaný popis URL (<code>ldap://server.tld:389</code>)';
$lang['port'] = 'Port serveru LDAP. Pokud není, bude využito URL výše';
@@ -14,9 +15,14 @@ $lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelskýc
$lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na <code>3</code>';
$lang['starttls'] = 'Využít spojení TLS?';
$lang['referrals'] = 'Přeposílat odkazy?';
+$lang['deref'] = 'Jak rozlišovat aliasy?';
$lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. <code>cn=admin, dc=muj, dc=domov</code>';
$lang['bindpw'] = 'Heslo uživatele výše';
$lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele';
$lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny';
$lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo';
$lang['debug'] = 'Zobrazit dodatečné debugovací informace';
+$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/en/settings.php b/lib/plugins/authldap/lang/en/settings.php
index b73166ab2..951901ccc 100644
--- a/lib/plugins/authldap/lang/en/settings.php
+++ b/lib/plugins/authldap/lang/en/settings.php
@@ -21,3 +21,7 @@ $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';
+
+$lang['referrals_o_-1'] = 'use default';
+$lang['referrals_o_0'] = 'don\'t follow referrals';
+$lang['referrals_o_1'] = 'follow referrals'; \ No newline at end of file
diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php
new file mode 100644
index 000000000..49d485afd
--- /dev/null
+++ b/lib/plugins/authldap/lang/fa/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohammad Sadegh <msdn2013@gmail.com>
+ * @author Omid Hezaveh <hezpublic@gmail.com>
+ */
+$lang['starttls'] = 'از تی‌ال‌اس (TLS) استفاده می‌کنید؟';
+$lang['bindpw'] = 'رمزعبور کاربر بالا';
diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php
index 6bedb2991..61671ed46 100644
--- a/lib/plugins/authldap/lang/no/settings.php
+++ b/lib/plugins/authldap/lang/no/settings.php
@@ -4,6 +4,8 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Christopher Schive <chschive@frisurf.no>
+ * @author Patrick <spill.p@hotmail.com>
*/
$lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.';
$lang['starttls'] = 'Bruke TLS-forbindelser?';
+$lang['bindpw'] = 'Passord til brukeren over';
diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php
index 7010988e6..0f5281b13 100644
--- a/lib/plugins/authldap/lang/pl/settings.php
+++ b/lib/plugins/authldap/lang/pl/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paweł Jan Czochański <czochanski@gmail.com>
+ * @author Maciej Helt <geraldziu@gmail.com>
*/
$lang['server'] = 'Twój serwer LDAP. Podaj nazwę hosta (<code>localhost</code>) albo pełen adres URL (<code>ldap://server.tld:389</code>).';
$lang['port'] = 'Port serwera LDAP jeżeli nie podano pełnego adresu URL wyżej.';
@@ -14,3 +15,8 @@ $lang['groupfilter'] = 'Filtr LDAP wykorzystany przy szukaniu grup uż
$lang['version'] = 'Wykorzystywana wersja protokołu. Być może konieczne jest ustawienie tego na <code>3</code>.';
$lang['starttls'] = 'Użyć połączeń TLS?';
$lang['bindpw'] = 'Hasło powyższego użytkownika';
+$lang['debug'] = 'Przy błędach wyświetl dodatkowe informacje debugujące.';
+$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/pt/settings.php b/lib/plugins/authldap/lang/pt/settings.php
index a2ccf87ad..b54f2a1bc 100644
--- a/lib/plugins/authldap/lang/pt/settings.php
+++ b/lib/plugins/authldap/lang/pt/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author André Neves <drakferion@gmail.com>
+ * @author Guido Salatino <guidorafael23@gmail.com>
*/
$lang['server'] = 'O seu servidor de LDAP. Ou hostname (<code>localhost</code>) ou URL qualificado completo (<code>ldap://servidor.tld:389</code>)';
$lang['port'] = 'Porta de servidor de LDAP se o URL completo não foi fornecido acima';
@@ -14,5 +15,14 @@ $lang['groupfilter'] = 'Filtro LDAP para procurar por grupos. Por exem
$lang['version'] = 'A versão do protocolo a utilizar. Pode precisar de alterar isto para <code>3</code>';
$lang['starttls'] = 'Usar ligações TLS?';
$lang['referrals'] = 'Referrals devem ser seguidos?';
+$lang['deref'] = 'Como desreferenciar aliases?';
+$lang['binddn'] = 'DN de um usuário de ligação opcional, quando a ligação é anônima não é suficiente. Eg. <code> cn = admin, dc = my, dc = home </code>';
$lang['bindpw'] = 'Senha do utilizador acima';
+$lang['userscope'] = 'Escopo de pesquisa Limite para pesquisa de usuário';
+$lang['groupscope'] = 'Escopo de pesquisa Limite para pesquisa de grupo';
+$lang['groupkey'] = 'A participação no grupo a partir de qualquer atributo de usuário (em vez de AD padrão de grupos) exemplo: grupo de departamento ou número de telefone';
$lang['debug'] = 'Mostrar informação adicional de debug aquando de erros';
+$lang['deref_o_0'] = 'LDAP_DEREF_NUNCA';
+$lang['deref_o_1'] = 'LDAP_DEREF_PESQUISANDO';
+$lang['deref_o_2'] = 'LDAP_DEREF_BUSCANDO';
+$lang['deref_o_3'] = 'LDAP_DEREF_SEMPRE';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
index 5677e06a3..1e5391644 100644
--- a/lib/plugins/authldap/lang/ru/settings.php
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -8,10 +8,20 @@
* @author Erli Moen <evseev.jr@gmail.com>
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
* @author Владимир <id37736@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
-$lang['starttls'] = 'Использовать TLS подключения?';
+$lang['server'] = 'Ваш LDAP-сервер. Либо имя хоста (<code>localhost</code>), либо полный URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'Порт LDAP-сервера, если выше не был указан полный URL';
+$lang['usertree'] = 'Где искать аккаунты пользователей? Например: <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Где искать группы пользователей? Например: <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP-фильтр для поиска аккаунтов пользователей. Например: <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP-фильтр для поиска групп. Например: <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Версия протокола. Возможно, вам нужно указать <code>3</code>';
+$lang['starttls'] = 'Использовать TLS-подключения?';
$lang['deref'] = 'Как расшифровывать псевдонимы?';
-$lang['bindpw'] = 'Пароль для указанного пользователя.';
+$lang['bindpw'] = 'Пароль для указанного пользователя';
+$lang['userscope'] = 'Ограничить область поиска при поиске пользователей';
+$lang['groupscope'] = 'Ограничить область поиска при поиске групп';
$lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';