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 e8f06e7Copy full SHA for e8f06e7
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,9 @@ 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 = self.env['ir.config_parameter'].sudo().get_param('auth_ldap.disable_chase_ref')
37
+ if str2bool(ldap_chase_ref_disabled):
38
+ connection.set_option(ldap.OPT_REFERRALS, ldap.OPT_OFF)
39
if conf["skip_cert_validation"]:
40
connection.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
41
# this creates a new tls context, which is required to apply
0 commit comments