From db5ff0f9229aa8b755fff51fd125eba8a84268a9 Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Tue, 29 Oct 2019 16:37:25 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=20LDAP/AD=20Source=20=E6=97=B6=E6=8E=92=E9=99=A4=20admin=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/signals_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/signals_handlers.py b/apps/authentication/signals_handlers.py index 7033cf777..c0b48c61d 100644 --- a/apps/authentication/signals_handlers.py +++ b/apps/authentication/signals_handlers.py @@ -47,7 +47,7 @@ def on_openid_login_success(sender, user=None, request=None, **kwargs): @receiver(populate_user) 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.save()