fix a bug in multi-LDAP authentication

see: https://github.com/ansible/tower/issues/2738
This commit is contained in:
Ryan Petrello
2018-08-01 17:36:55 -04:00
parent c09a23f063
commit 2102c1ef0a

View File

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