ldap: deactivate password update when sync is enabled.

This commit is contained in:
Antoine Nguyen
2019-06-07 10:23:17 +02:00
parent 1af015c6c6
commit 98a400293c
+2 -1
View File
@@ -119,7 +119,8 @@ class User(AbstractUser):
:param raw_value: the new password's value
:param curvalue: the current password (for LDAP authentication)
"""
if self.is_local:
ldap_sync_enable = param_tools.get_global_parameter("ldap_enable_sync")
if self.is_local or ldap_sync_enable:
self.password = self._crypt_password(raw_value)
else:
if not ldap_available: