diff --git a/corporate/tests/test_remote_billing.py b/corporate/tests/test_remote_billing.py index 79f235fd87..015226e130 100644 --- a/corporate/tests/test_remote_billing.py +++ b/corporate/tests/test_remote_billing.py @@ -576,7 +576,8 @@ class LegacyServerLoginTest(BouncerTestCase): ) self.assertEqual(result.status_code, 200) self.assert_in_success_response( - ["Did not find a server registration for this server_org_id."], result + ["This zulip_org_id is not registered with Zulip's billing management system."], + result, ) def test_server_login_invalid_server_org_secret(self) -> None: @@ -586,7 +587,7 @@ class LegacyServerLoginTest(BouncerTestCase): subdomain="selfhosting", ) self.assertEqual(result.status_code, 200) - self.assert_in_success_response(["Invalid server_org_secret."], result) + self.assert_in_success_response(["Invalid zulip_org_key for this zulip_org_id."], result) def test_server_login_deactivated_server(self) -> None: self.server.deactivated = True @@ -681,7 +682,7 @@ class LegacyServerLoginTest(BouncerTestCase): subdomain="selfhosting", ) self.assertEqual(result.status_code, 200) - self.assert_in_success_response(["Invalid server_org_secret."], result) + self.assert_in_success_response(["Invalid zulip_org_key for this zulip_org_id."], result) # The next_page param should be preserved in the form. self.assert_in_success_response( [''], result diff --git a/corporate/views/remote_billing_page.py b/corporate/views/remote_billing_page.py index 4a78cd90e2..8d2943c8ca 100644 --- a/corporate/views/remote_billing_page.py +++ b/corporate/views/remote_billing_page.py @@ -442,12 +442,16 @@ def remote_billing_legacy_server_login( remote_server = get_remote_server_by_uuid(server_org_id) except RemoteZulipServer.DoesNotExist: context.update( - {"error_message": _("Did not find a server registration for this server_org_id.")} + { + "error_message": _( + "This zulip_org_id is not registered with Zulip's billing management system." + ) + } ) return render(request, "corporate/legacy_server_login.html", context) if not constant_time_compare(server_org_secret, remote_server.api_key): - context.update({"error_message": _("Invalid server_org_secret.")}) + context.update({"error_message": _("Invalid zulip_org_key for this zulip_org_id.")}) return render(request, "corporate/legacy_server_login.html", context) if remote_server.deactivated: diff --git a/templates/corporate/legacy_server_login.html b/templates/corporate/legacy_server_login.html index d3c53acea3..1931f10f05 100644 --- a/templates/corporate/legacy_server_login.html +++ b/templates/corporate/legacy_server_login.html @@ -27,17 +27,19 @@