auth: Make the deactivated user error message clearer.

This commit is contained in:
Mateusz Mandera 2021-08-23 15:14:05 +02:00 committed by Tim Abbott
parent c5806d9728
commit fa58bc340d
4 changed files with 5 additions and 5 deletions

View File

@ -54,7 +54,7 @@ WRONG_SUBDOMAIN_ERROR = (
+ "Please contact your organization administrator with any questions."
)
DEACTIVATED_ACCOUNT_ERROR = (
"Your account {username} is no longer active. "
"Your account {username} has been deactivated. "
+ "Please contact your organization administrator to reactivate it."
)
PASSWORD_RESET_NEEDED_ERROR = (

View File

@ -1116,7 +1116,7 @@ class SocialAuthBase(DesktopFlowTestingLib, ZulipTestCase):
result = self.client_get(result.url)
self.assert_in_success_response(
[f"Your account {user_profile.delivery_email} is no longer active."], result
[f"Your account {user_profile.delivery_email} has been deactivated."], result
)
def test_social_auth_invalid_realm(self) -> None:

View File

@ -1220,7 +1220,7 @@ class InactiveUserTest(ZulipTestCase):
result = self.login_with_return(user_profile.delivery_email)
self.assert_in_response(
"Your account {} is no longer active.".format(user_profile.delivery_email), result
f"Your account {user_profile.delivery_email} has been deactivated.", result
)
def test_login_deactivated_mirror_dummy(self) -> None:
@ -1263,7 +1263,7 @@ class InactiveUserTest(ZulipTestCase):
with self.settings(AUTHENTICATION_BACKENDS=("zproject.backends.EmailAuthBackend",)):
self.assertFalse(form.is_valid())
self.assertIn(
"Your account {} is no longer active".format(user_profile.delivery_email),
"Your account {} has been deactivated".format(user_profile.delivery_email),
str(form.errors),
)

View File

@ -738,7 +738,7 @@ class LoginTest(ZulipTestCase):
result = self.login_with_return(user_profile.delivery_email, "xxx")
self.assertEqual(result.status_code, 200)
self.assert_in_response(
"Your account {} is no longer active.".format(user_profile.delivery_email), result
f"Your account {user_profile.delivery_email} has been deactivated.", result
)
self.assert_logged_in_user_id(None)