mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
@@ -312,7 +312,9 @@ class LoginTest(ZulipTestCase):
|
||||
self.assertIsNone(get_session_dict_user(self.client.session))
|
||||
|
||||
def test_login_bad_password(self) -> None:
|
||||
self.login(self.example_email("hamlet"), password="wrongpassword", fails=True)
|
||||
email = self.example_email("hamlet")
|
||||
result = self.login_with_return(email, password="wrongpassword")
|
||||
self.assert_in_success_response([email], result)
|
||||
self.assertIsNone(get_session_dict_user(self.client.session))
|
||||
|
||||
def test_login_nonexist_user(self) -> None:
|
||||
|
||||
@@ -545,6 +545,9 @@ def login_page(request: HttpRequest, **kwargs: Any) -> HttpResponse:
|
||||
# only if it actually exists.
|
||||
return HttpResponseRedirect(realm.uri)
|
||||
|
||||
if 'username' in request.POST:
|
||||
extra_context['email'] = request.POST['username']
|
||||
|
||||
try:
|
||||
template_response = django_login_page(
|
||||
request, authentication_form=OurAuthenticationForm,
|
||||
|
||||
Reference in New Issue
Block a user