We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4710036 commit 1337793Copy full SHA for 1337793
1 file changed
auth_ldaps/models/res_company_ldap.py
@@ -8,6 +8,7 @@
8
import ldap
9
10
from odoo import fields, models
11
+from odoo.tools.misc import str2bool
12
13
_logger = logging.getLogger(__name__)
14
@@ -32,6 +33,13 @@ def _connect(self, conf):
32
33
if conf["is_ssl"]:
34
uri = "ldaps://%s:%d" % (conf["ldap_server"], conf["ldap_server_port"])
35
connection = ldap.initialize(uri)
36
+ ldap_chase_ref_disabled = (
37
+ self.env["ir.config_parameter"]
38
+ .sudo()
39
+ .get_param("auth_ldap.disable_chase_ref")
40
+ )
41
+ if str2bool(ldap_chase_ref_disabled):
42
+ connection.set_option(ldap.OPT_REFERRALS, ldap.OPT_OFF)
43
if conf["skip_cert_validation"]:
44
connection.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
45
# this creates a new tls context, which is required to apply
0 commit comments