Commit db5ff0f9 authored by BaiJiangJie's avatar BaiJiangJie

[Update] 修改用户 LDAP/AD Source 时排除 admin 用户

parent c29381e6
...@@ -47,7 +47,7 @@ def on_openid_login_success(sender, user=None, request=None, **kwargs): ...@@ -47,7 +47,7 @@ def on_openid_login_success(sender, user=None, request=None, **kwargs):
@receiver(populate_user) @receiver(populate_user)
def on_ldap_create_user(sender, user, ldap_user, **kwargs): def on_ldap_create_user(sender, user, ldap_user, **kwargs):
if user and user.name != 'admin': if user and user.username != 'admin':
user.source = user.SOURCE_LDAP user.source = user.SOURCE_LDAP
user.save() user.save()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment