瀏覽代碼

HUE-3132 [core] Fix Sync Ldap users and groups for anonymous binds

Christopher Conner 9 年之前
父節點
當前提交
d37f082
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/useradmin/src/useradmin/ldap_access.py

+ 1 - 1
apps/useradmin/src/useradmin/ldap_access.py

@@ -131,7 +131,7 @@ class LdapConnection(object):
 
     self.ldap_handle = ldap.initialize(uri=ldap_url, trace_level=ldap_config.TRACE_LEVEL.get())
 
-    if bind_user is not None:
+    if bind_user:
       try:
         self.ldap_handle.simple_bind_s(bind_user, bind_password)
       except: