fix: 修复ldap用户导入时字段进行strip

pull/7103/head
Michael Bai 2021-10-28 14:42:32 +08:00 committed by 老广
parent 141dafc8bf
commit 8542d53aff
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ class LDAPServerUtil(object):
if attr == 'is_active' and mapping.lower() == 'useraccountcontrol' \
and value:
value = int(value) & LDAP_AD_ACCOUNT_DISABLE != LDAP_AD_ACCOUNT_DISABLE
user[attr] = value
user[attr] = value.strip() if isinstance(value, str) else value
return user
def user_entries_to_dict(self, user_entries):