diff --git a/apps/authentication/ldap/backends.py b/apps/authentication/ldap/backends.py index 9b9ed24c3..7fcccc046 100644 --- a/apps/authentication/ldap/backends.py +++ b/apps/authentication/ldap/backends.py @@ -16,13 +16,8 @@ class LDAPAuthorizationBackend(LDAPBackend): """ def authenticate(self, request=None, username=None, password=None, **kwargs): - if password or self.settings.PERMIT_EMPTY_PASSWORD: - ldap_user = LDAPUser(self, username=username.strip(), request=request) - user = self.authenticate_ldap_user(ldap_user, password) - else: - logger.debug('Rejecting empty password for {}'.format(username)) - user = None - + ldap_user = LDAPUser(self, username=username.strip(), request=request) + user = self.authenticate_ldap_user(ldap_user, password) return user def get_user(self, user_id): diff --git a/apps/common/forms.py b/apps/common/forms.py index 36ab924b7..1f7e4c1fd 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -96,7 +96,7 @@ class LDAPSettingForm(BaseForm): label=_("LDAP server"), ) AUTH_LDAP_BIND_DN = forms.CharField( - label=_("Bind DN"), + required=False, label=_("Bind DN"), ) AUTH_LDAP_BIND_PASSWORD = FormEncryptCharField( label=_("Password"),