mirror of https://github.com/zulip/zulip.git
auth: Make the deactivated user error message clearer.
This commit is contained in:
parent
c5806d9728
commit
fa58bc340d
|
@ -54,7 +54,7 @@ WRONG_SUBDOMAIN_ERROR = (
|
||||||
+ "Please contact your organization administrator with any questions."
|
+ "Please contact your organization administrator with any questions."
|
||||||
)
|
)
|
||||||
DEACTIVATED_ACCOUNT_ERROR = (
|
DEACTIVATED_ACCOUNT_ERROR = (
|
||||||
"Your account {username} is no longer active. "
|
"Your account {username} has been deactivated. "
|
||||||
+ "Please contact your organization administrator to reactivate it."
|
+ "Please contact your organization administrator to reactivate it."
|
||||||
)
|
)
|
||||||
PASSWORD_RESET_NEEDED_ERROR = (
|
PASSWORD_RESET_NEEDED_ERROR = (
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ class SocialAuthBase(DesktopFlowTestingLib, ZulipTestCase):
|
||||||
|
|
||||||
result = self.client_get(result.url)
|
result = self.client_get(result.url)
|
||||||
self.assert_in_success_response(
|
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:
|
def test_social_auth_invalid_realm(self) -> None:
|
||||||
|
|
|
@ -1220,7 +1220,7 @@ class InactiveUserTest(ZulipTestCase):
|
||||||
|
|
||||||
result = self.login_with_return(user_profile.delivery_email)
|
result = self.login_with_return(user_profile.delivery_email)
|
||||||
self.assert_in_response(
|
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:
|
def test_login_deactivated_mirror_dummy(self) -> None:
|
||||||
|
@ -1263,7 +1263,7 @@ class InactiveUserTest(ZulipTestCase):
|
||||||
with self.settings(AUTHENTICATION_BACKENDS=("zproject.backends.EmailAuthBackend",)):
|
with self.settings(AUTHENTICATION_BACKENDS=("zproject.backends.EmailAuthBackend",)):
|
||||||
self.assertFalse(form.is_valid())
|
self.assertFalse(form.is_valid())
|
||||||
self.assertIn(
|
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),
|
str(form.errors),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -738,7 +738,7 @@ class LoginTest(ZulipTestCase):
|
||||||
result = self.login_with_return(user_profile.delivery_email, "xxx")
|
result = self.login_with_return(user_profile.delivery_email, "xxx")
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
self.assert_in_response(
|
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)
|
self.assert_logged_in_user_id(None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue