mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
ldap auth direct bind fix
set AUTH_LDAP_BIND_AS_AUTHENTICATING_USER to True when direct bind auth is enabled because we need to access user attributes. See https://django-auth-ldap.readthedocs.io/en/latest/authentication.html#customizing-authentication
This commit is contained in:
@@ -500,6 +500,8 @@ class GeneralParametersForm(param_forms.AdminParametersForm):
|
||||
settings, "AUTH_LDAP_USER_DN_TEMPLATE",
|
||||
values["ldap_user_dn_template"]
|
||||
)
|
||||
setattr(
|
||||
settings, "AUTH_LDAP_BIND_AS_AUTHENTICATING_USER", True)
|
||||
if values["ldap_is_active_directory"]:
|
||||
if not hasattr(settings, "AUTH_LDAP_GLOBAL_OPTIONS"):
|
||||
setattr(settings, "AUTH_LDAP_GLOBAL_OPTIONS", {
|
||||
|
||||
Reference in New Issue
Block a user