';
// These are fields required in the config table
return array(
'tpl' => $tpl,
- 'config' => array('ldap_server', 'ldap_user', 'ldap_password', 'ldap_base_dn', 'ldap_uid', 'ldap_email')
+ 'config' => array('ldap_server', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
);
}
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 5179979f5f..393d1d3082 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1496,6 +1496,7 @@ if (version_compare($current_version, '3.0.RC4', '<='))
// Setting this here again because new installations may not have it...
set_config('cron_lock', '0', true);
+ set_config('ldap_user_filter', '');
$no_updates = false;
}
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index af88b47db5..8c1f502b09 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -304,13 +304,15 @@ $lang = array_merge($lang, array(
'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
'LDAP_PASSWORD' => 'LDAP password',
- 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous access. Else fill in the password for the above user. WARNING: This password will be stored as plain text in the database visible to everybody who can access your database.',
+ 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers. WARNING: This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.',
'LDAP_SERVER' => 'LDAP server name',
- 'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the name or IP address of the server.',
+ 'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the hostname or IP address of the LDAP server. Alternatively you can specify an URL like ldap://hostname:port/',
'LDAP_UID' => 'LDAP uid',
'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. uid, sn, etc.',
- 'LDAP_USER' => 'LDAP user',
- 'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous access. If filled in phpBB will connect to the LDAP server as the specified user.',
+ 'LDAP_USER' => 'LDAP user dn',
+ 'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous binding. If filled in phpBB uses the specified distinguished name on login attempts to find the correct user, e.g. uid=Username,ou=MyUnit,o=MyCompany,c=US. Required for Active Directory Servers.',
+ 'LDAP_USER_FILTER' => 'LDAP user filter',
+ 'LDAP_USER_FILTER_EXPLAIN' => 'Optionally you can further limit the searched objects with additional filters. For example objectClass=posixGroup would result in the use of (&(uid=$username)(objectClass=posixGroup))',
));
// Server Settings
diff --git a/phpBB/search.php b/phpBB/search.php
index 9a50ce2fcb..d9010b73a8 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -939,9 +939,9 @@ while ($row = $db->sql_fetchrow($result))
continue;
}
- if (!$auth->acl_get('f_list', $row['forum_id']) || $row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
+ if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
{
- // if the user does not have permissions to list this forum skip to the next branch
+ // if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch
continue;
}
@@ -964,9 +964,9 @@ while ($row = $db->sql_fetchrow($result))
$right = $row['right_id'];
- if (!$auth->acl_get('f_search', $row['forum_id']))
+ if ($auth->acl_gets('!f_search', '!f_list', $row['forum_id']))
{
- // if the user does not have permissions to search this forum skip only this forum/category
+ // if the user does not have permissions to search or see this forum skip only this forum/category
continue;
}