Convert EmailAuthBackend and LDAPAuthBackend to accept a realm.

This commit is contained in:
Tim Abbott
2017-11-17 14:56:45 -08:00
parent 53224a16a9
commit 3bfb19b5f3
8 changed files with 61 additions and 50 deletions

View File

@@ -288,8 +288,9 @@ Please contact %s to reactivate this group.""" % (
if username is not None and password:
subdomain = get_subdomain(self.request)
realm = get_realm(subdomain)
self.user_cache = authenticate(self.request, username=username, password=password,
realm_subdomain=subdomain)
realm=realm)
if self.user_cache is None:
raise forms.ValidationError(
self.error_messages['invalid_login'],