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

pull/7103/head
Michael Bai 3 years ago committed by 老广
parent 141dafc8bf
commit 8542d53aff

@ -184,7 +184,7 @@ class LDAPServerUtil(object):
if attr == 'is_active' and mapping.lower() == 'useraccountcontrol' \ if attr == 'is_active' and mapping.lower() == 'useraccountcontrol' \
and value: and value:
value = int(value) & LDAP_AD_ACCOUNT_DISABLE != LDAP_AD_ACCOUNT_DISABLE 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 return user
def user_entries_to_dict(self, user_entries): def user_entries_to_dict(self, user_entries):

Loading…
Cancel
Save