From d397e6da631cb6d262ad14ec7b46b75d1b60fbcf Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 15:25:18 +0000 Subject: Restore correct public interface of getUserData() for authldap plugin The outer/public getUserData() implemented as a wrapper for the previous fn which is now protected. --- lib/plugins/authldap/auth.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 6c3637e15..9d03afd7f 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 { @@ -145,11 +145,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Stephane Chazelas * @author Steffen Schoch * + * @param string $user + * @return array containing user data or false + */ + public function getUserData($user) { + 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; -- cgit v1.2.3 From 2046a6546c8ed62b9a7b33305b6201458f2f8291 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 15:38:28 +0000 Subject: Allow user info to be retrieved without groups Some parts of dokuwiki (e.g. recent changes, old revisions) can requests lots of user info (to provide editor names) without requiring any group information. This change also implements caching of user info by authmysql & authpgsql plugins to avoid repeated querying of the DB to retrieve the same user information. --- lib/plugins/authldap/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 9d03afd7f..eaa2d160a 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -146,9 +146,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Steffen Schoch * * @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) { + public function getUserData($user, $requireGroups=true) { return $this->_getUserData($user); } -- cgit v1.2.3 From c3dd5e61641701501b845f71f894380966d71151 Mon Sep 17 00:00:00 2001 From: Davor Turkalj Date: Mon, 8 Sep 2014 12:56:14 +0200 Subject: translation update --- lib/plugins/authldap/lang/hr/settings.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins/authldap') 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'; -- cgit v1.2.3 From e0c26282a603881e8d2f839d94c28dbbfc57d71b Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 03:34:17 +0200 Subject: scrutinizer documentations issues --- lib/plugins/authldap/auth.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index b22b82ecc..a94c7a357 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -564,15 +564,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Wraps around ldap_search, ldap_list or ldap_read depending on $scope * * @author Andreas Gohr - * @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, -- cgit v1.2.3 From 59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 21:45:27 +0200 Subject: more scrutinizer issue improvements --- lib/plugins/authldap/auth.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index a94c7a357..fd4729331 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'); -- cgit v1.2.3 From 2ec6a92c13ed276111bbe099aadab33a885397cb Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 19 Nov 2014 19:20:55 +0100 Subject: translation update --- lib/plugins/authldap/lang/no/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins/authldap') 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 + * @author Patrick */ $lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.'; $lang['starttls'] = 'Bruke TLS-forbindelser?'; +$lang['bindpw'] = 'Passord til brukeren over'; -- cgit v1.2.3 From 044a73b5792a48ef181c0bcdfcef5317d78798b4 Mon Sep 17 00:00:00 2001 From: Mohammad Sadegh Date: Thu, 27 Nov 2014 12:06:03 +0100 Subject: translation update --- lib/plugins/authldap/lang/fa/settings.php | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/plugins/authldap/lang/fa/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php new file mode 100644 index 000000000..1b48da7f5 --- /dev/null +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -0,0 +1,8 @@ + + */ +$lang['bindpw'] = 'رمزعبور کاربر بالا'; -- cgit v1.2.3 From 29eba4294ec095d7a6fe677fb8b8e64e98655bcc Mon Sep 17 00:00:00 2001 From: Omid Hezaveh Date: Mon, 8 Dec 2014 17:21:12 +0100 Subject: translation update --- lib/plugins/authldap/lang/fa/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php index 1b48da7f5..49d485afd 100644 --- a/lib/plugins/authldap/lang/fa/settings.php +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Mohammad Sadegh + * @author Omid Hezaveh */ +$lang['starttls'] = 'از تی‌ال‌اس (TLS) استفاده می‌کنید؟'; $lang['bindpw'] = 'رمزعبور کاربر بالا'; -- cgit v1.2.3 From e88b0b78dca1024132a36f217b59c9e73a9cc338 Mon Sep 17 00:00:00 2001 From: Vitaly Filatenko Date: Mon, 15 Dec 2014 22:36:37 +0100 Subject: translation update --- lib/plugins/authldap/lang/ru/settings.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/plugins/authldap') 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 * @author Aleksandr Selivanov * @author Владимир + * @author Vitaly Filatenko */ +$lang['server'] = 'Ваш LDAP сервер. Либо имя хоста (localhost), либо полный URL (ldap://server.tld:389)'; +$lang['port'] = 'Порт LDAP сервера, если выше не был указан полный URL'; +$lang['usertree'] = 'Где искать аккаунты пользователей. Например: ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Где искать группы пользователей. Например: ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP фильтр для поиска аккаунтов пользователей. Например: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP фильтр для поиска групп. Например: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Версия протокола. Возможно вам нужно указать 3'; $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'; -- cgit v1.2.3