Merge pull request #3273 from jumpserver/v52_ldap

[Bugfix] 修复 LDAP 用户导入会重复显示的问题(场景:AD 用户在多个 OU 下面)
pull/3274/head
BaiJiangJie 2019-09-25 12:37:27 +08:00 committed by GitHub
commit a6d87f6de4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ class LDAPUtil:
user_item = self._ldap_entry_to_user_item(entry)
user = self.get_user_by_username(user_item['username'])
user_item['existing'] = bool(user)
if user_item in user_items:
continue
user_items.append(user_item)
return user_items