mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where if LDAP_SEARCH_BASE_DN is not set then, the value for LDAP_BASE_DN will be considered. Fixes #5487
This commit is contained in:
committed by
Akshay Joshi
parent
9f445dc052
commit
d1bdb178e2
@@ -45,10 +45,15 @@ file and modify the values for the following parameters:
|
|||||||
entries, you should be able to authenticate by entering ‘admin’ in the
|
entries, you should be able to authenticate by entering ‘admin’ in the
|
||||||
*Email Address / Username* field and its corresponding password in the *Password*
|
*Email Address / Username* field and its corresponding password in the *Password*
|
||||||
field."
|
field."
|
||||||
"LDAP_SEARCH_BASE_DN","Specifies an element of the search request that works in
|
"LDAP_SEARCH_BASE_DN","Specifies the distinguished name (DN) for the top-most user
|
||||||
conjunction with the LDAP search scope to define the subtree of entries that
|
directory that you want to search. You can use this parameter for limiting the search
|
||||||
should be considered when processing the search request. You can use this parameter
|
request to a specific group of users. For example, if you want to search only within
|
||||||
for limiting the search request to a specific group of users."
|
the Organizational Unit named sales, you can define the value for LDAP_SEARCH_BASE_DN
|
||||||
|
parameter as following:
|
||||||
|
LDAP_SEARCH_BASE_DN = ‘ou=sales,dc=example,dc=com'
|
||||||
|
|
||||||
|
This is an optional parameter. If you do not specify any value for LDAP_SEARCH_BASE_DN,
|
||||||
|
then the value for LDAP_BASE_DN will be considered for the same."
|
||||||
"LDAP_SEARCH_FILTER","Defines the criteria to retrieve matching entries in an
|
"LDAP_SEARCH_FILTER","Defines the criteria to retrieve matching entries in an
|
||||||
LDAP search request. For example, LDAP_SEARCH_FILTER = '(objectclass=HR)’ setting
|
LDAP search request. For example, LDAP_SEARCH_FILTER = '(objectclass=HR)’ setting
|
||||||
searches only for users having HR as their objectClass attribute."
|
searches only for users having HR as their objectClass attribute."
|
||||||
|
|||||||
@@ -43,5 +43,6 @@ Bug fixes
|
|||||||
| `Issue #5469 <https://redmine.postgresql.org/issues/5469>`_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog.
|
| `Issue #5469 <https://redmine.postgresql.org/issues/5469>`_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog.
|
||||||
| `Issue #5473 <https://redmine.postgresql.org/issues/5473>`_ - Fixed post-login redirect location when running in server mode under a non-default root.
|
| `Issue #5473 <https://redmine.postgresql.org/issues/5473>`_ - Fixed post-login redirect location when running in server mode under a non-default root.
|
||||||
| `Issue #5480 <https://redmine.postgresql.org/issues/5480>`_ - Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH.
|
| `Issue #5480 <https://redmine.postgresql.org/issues/5480>`_ - Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH.
|
||||||
|
| `Issue #5487 <https://redmine.postgresql.org/issues/5487>`_ - Fixed an issue where if LDAP_SEARCH_BASE_DN is not set then, the value for LDAP_BASE_DN will be considered.
|
||||||
| `Issue #5503 <https://redmine.postgresql.org/issues/5503>`_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server.
|
| `Issue #5503 <https://redmine.postgresql.org/issues/5503>`_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server.
|
||||||
| `Issue #5510 <https://redmine.postgresql.org/issues/5510>`_ - Fixed Unicode decode error 'utf-8' codec can't decode byte.
|
| `Issue #5510 <https://redmine.postgresql.org/issues/5510>`_ - Fixed Unicode decode error 'utf-8' codec can't decode byte.
|
||||||
@@ -158,7 +158,8 @@ class LDAPAuthentication(BaseAuthentication):
|
|||||||
search criteria."""
|
search criteria."""
|
||||||
try:
|
try:
|
||||||
search_base_dn = config.LDAP_SEARCH_BASE_DN
|
search_base_dn = config.LDAP_SEARCH_BASE_DN
|
||||||
if search_base_dn is None or search_base_dn == '':
|
if search_base_dn is None or search_base_dn == '' or\
|
||||||
|
search_base_dn == '<Search-Base-DN>':
|
||||||
search_base_dn = config.LDAP_BASE_DN
|
search_base_dn = config.LDAP_BASE_DN
|
||||||
self.conn.search(search_base=search_base_dn,
|
self.conn.search(search_base=search_base_dn,
|
||||||
search_filter=config.LDAP_SEARCH_FILTER,
|
search_filter=config.LDAP_SEARCH_FILTER,
|
||||||
|
|||||||
Reference in New Issue
Block a user