You've already forked oncall
mirror of
https://github.com/linkedin/oncall.git
synced 2025-11-29 23:38:17 +02:00
Added an IF statement to allow ldap sync when certfile is not specified. Consistent with #171
This commit is contained in:
committed by
Daniel Wang
parent
28a2ac7b34
commit
47bde5326b
@@ -92,7 +92,8 @@ def prune_user(engine, username):
|
||||
def fetch_ldap():
|
||||
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
|
||||
l = ldap.initialize(LDAP_SETTINGS['url'])
|
||||
l.set_option(ldap.OPT_X_TLS_CACERTFILE, LDAP_SETTINGS['cert_path'])
|
||||
if 'cert_path' in LDAP_SETTINGS:
|
||||
l.set_option(ldap.OPT_X_TLS_CACERTFILE, LDAP_SETTINGS['cert_path'])
|
||||
l.simple_bind_s(LDAP_SETTINGS['user'], LDAP_SETTINGS['password'])
|
||||
|
||||
req_ctrl = SimplePagedResultsControl(True, size=1000, cookie='')
|
||||
|
||||
Reference in New Issue
Block a user