Merge pull request #2739 from ryanpetrello/fix-2738

fix a bug in multi-LDAP authentication
This commit is contained in:
Ryan Petrello
2018-08-02 08:27:13 -04:00
committed by GitHub

View File

@@ -110,6 +110,7 @@ class LDAPBackend(BaseLDAPBackend):
pass pass
try: try:
user = super(LDAPBackend, self).authenticate(username, password) user = super(LDAPBackend, self).authenticate(username, password)
if user and getattr(user, 'ldap_user', None):
try: try:
user.ldap_user._get_groups().get_group_dns() user.ldap_user._get_groups().get_group_dns()
except ImproperlyConfigured: except ImproperlyConfigured: