portico: Update error message for deactivated user.

The installation admin is not the right person to get support requests from
deactivated users, regardless of the situation.

Also updates the wording to be a bit more concise.
This commit is contained in:
Rishi Gupta 2017-11-19 22:23:55 -08:00 committed by Tim Abbott
parent f202645bbd
commit 27babcf92b
3 changed files with 5 additions and 6 deletions

View File

@ -271,9 +271,8 @@ Please contact %s to reactivate this group.""" % (
if not user_profile.is_active and not user_profile.is_mirror_dummy:
error_msg = (
u"Sorry for the trouble, but your account has been deactivated. "
u"Please contact your organization administrator to reactivate it. "
u"If you're not sure who that is, try contacting %s.") % (FromAddress.SUPPORT,)
u"Your account is no longer active. "
u"Please contact your organization administrator to reactivate it.")
raise ValidationError(mark_safe(error_msg))
if not user_matches_subdomain(get_subdomain(self.request), user_profile):

View File

@ -765,7 +765,7 @@ class InactiveUserTest(ZulipTestCase):
result = self.login_with_return(self.example_email("hamlet"))
self.assert_in_response(
"Sorry for the trouble, but your account has been deactivated",
"Your account is no longer active.",
result)
def test_login_deactivated_mirror_dummy(self) -> None:
@ -808,7 +808,7 @@ class InactiveUserTest(ZulipTestCase):
'password': password})
with self.settings(AUTHENTICATION_BACKENDS=('zproject.backends.EmailAuthBackend',)):
self.assertFalse(form.is_valid())
self.assertIn("your account has been deactivated", str(form.errors))
self.assertIn("Your account is no longer active", str(form.errors))
def test_webhook_deactivated_user(self) -> None:
"""

View File

@ -322,7 +322,7 @@ class LoginTest(ZulipTestCase):
do_deactivate_user(user_profile)
result = self.login_with_return(self.example_email("hamlet"), "xxx")
self.assertEqual(result.status_code, 200)
self.assert_in_response("your account has been deactivated.", result)
self.assert_in_response("Your account is no longer active.", result)
self.assertIsNone(get_session_dict_user(self.client.session))
def test_login_bad_password(self):