diff options
author | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:31:30 +0100 |
---|---|---|
committer | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-12-22 10:31:30 +0100 |
commit | 8da2ebf4f4261eb8f54df5704b5d9af283b5402d (patch) | |
tree | 9c63975e3898c949e1784e30e81a5ed3da7fca93 /lib/plugins/authldap | |
parent | 5e7f4d50cbbc788c9c0483a0a2ff1b536e4ffe8c (diff) | |
parent | 1bf4abb07f65e28578bae98aad457cb768d8b44f (diff) | |
download | rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.gz rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.bz2 |
Merge remote-tracking branch 'splitbrain/master'
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r-- | lib/plugins/authldap/auth.php | 30 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/fa/settings.php | 10 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/hr/settings.php | 4 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/no/settings.php | 2 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/ru/settings.php | 10 |
5 files changed, 45 insertions, 11 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 0d5e130ea..fd4729331 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -103,7 +103,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return true; } else { // See if we can find the user - $info = $this->getUserData($user, true); + $info = $this->_getUserData($user, true); if(empty($info['dn'])) { return false; } else { @@ -146,10 +146,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Steffen Schoch <schoch@dsb.net> * * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin + * @return array containing user data or false + */ + public function getUserData($user, $requireGroups=true) { + return $this->_getUserData($user); + } + + /** + * @param string $user * @param bool $inbind authldap specific, true if in bind phase * @return array containing user data or false */ - public function getUserData($user, $inbind = false) { + protected function _getUserData($user, $inbind = false) { global $conf; if(!$this->_openLDAP()) return false; @@ -172,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } } + $info = array(); $info['user'] = $user; $info['server'] = $this->getConf('server'); @@ -555,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/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/hr/settings.php b/lib/plugins/authldap/lang/hr/settings.php index 44caeacc8..cb8df7218 100644 --- a/lib/plugins/authldap/lang/hr/settings.php +++ b/lib/plugins/authldap/lang/hr/settings.php @@ -21,3 +21,7 @@ $lang['userscope'] = 'Ograniči područje za pretragu korisnika'; $lang['groupscope'] = 'Ograniči područje za pretragu grupa'; $lang['groupkey'] = 'Članstvo grupa iz svih atributa korisnika (umjesto standardnih AD grupa) npr. grupa iz odjela ili telefonskog broja'; $lang['debug'] = 'Prikaži dodatne informacije u slučaju greške'; +$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/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/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 5677e06a3..534990648 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['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>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP фильтр для поиска групп. Например: <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Версия протокола. Возможно вам нужно указать <code>3</code>'; $lang['starttls'] = 'Использовать TLS подключения?'; $lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['bindpw'] = 'Пароль для указанного пользователя.'; +$lang['userscope'] = 'Ограничить область поиска при поиске пользователей'; +$lang['groupscope'] = 'Ограничить область поиска при поиске групп'; $lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; |