From a180f01e6b122f7b018ea5cc6b0b3341204a8dfe Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Fri, 27 Dec 2019 17:17:56 +0100 Subject: [PATCH] ldap: Use a cleaner super().authenticate() call in ZulipLDAPAuthBackend. --- zproject/backends.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/zproject/backends.py b/zproject/backends.py index f83f6803a3..cc81643dd7 100644 --- a/zproject/backends.py +++ b/zproject/backends.py @@ -534,7 +534,7 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase): return None try: - # We want to apss the user's LDAP username into + # We want to pass the user's LDAP username into # authenticate() below. If an email address was entered # in the login form, we need to use # django_to_ldap_username to translate the email address @@ -551,10 +551,7 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase): # against the LDAP database, and assuming those are correct, # end up calling `self.get_or_build_user` with the # authenticated user's data from LDAP. - return ZulipLDAPAuthBackendBase.authenticate(self, - request=None, - username=username, - password=password) + return super().authenticate(request=None, username=username, password=password) def get_or_build_user(self, username: str, ldap_user: _LDAPUser) -> Tuple[UserProfile, bool]: """The main function of our authentication backend extension of