From 5aeeafd39cfc7a1657b9b58704e49358be6b698c Mon Sep 17 00:00:00 2001 From: Alya Abbott Date: Fri, 10 May 2024 16:21:38 -0700 Subject: [PATCH] portico: Improve message for deactivated, invalid and moved orgs. --- templates/zerver/deactivated.html | 28 +++++++++++++++++++--------- templates/zerver/invalid_realm.html | 18 ++++++++++++------ zerver/middleware.py | 5 ++++- zerver/tests/test_auth_backends.py | 2 +- zerver/tests/test_decorators.py | 4 +--- zerver/tests/test_docs.py | 2 +- zerver/tests/test_signup.py | 16 +++++++++------- zerver/views/home.py | 5 ++++- 8 files changed, 51 insertions(+), 29 deletions(-) diff --git a/templates/zerver/deactivated.html b/templates/zerver/deactivated.html index 4354715dd9..02637bfe29 100644 --- a/templates/zerver/deactivated.html +++ b/templates/zerver/deactivated.html @@ -16,23 +16,33 @@
-

{{ _("Deactivated organization") }}

+ {% if deactivated_redirect %} +

{{ _("Organization moved") }}

+ {% else %} +

{{ _("Deactivated organization") }}

+ {% endif %}

- {% trans %} - The organization you are trying to join, {{ deactivated_domain_name }}, has been deactivated. - {% endtrans %} {% if deactivated_redirect %} {% trans %} - It has moved to {{ deactivated_redirect }}. + This organization has moved to {{ deactivated_redirect }}. {% endtrans %} + {% else %} + {% trans %} + This organization has been deactivated. + {% endtrans %} + {% if is_self_hosting_management_page %} + {% trans %} + If you are an owner of this organization, you can contact this Zulip server's administrators to reactivate it. + {% endtrans %} + {% else %} + {% trans %} + If you are an owner of this organization, you can contact Zulip support to reactivate it. + {% endtrans %} + {% endif %} {% endif %} - {% trans %} - Please contact {{ support_email }} to reactivate - this group. - {% endtrans %}

diff --git a/templates/zerver/invalid_realm.html b/templates/zerver/invalid_realm.html index 6cc4ef5b60..5f353c564f 100644 --- a/templates/zerver/invalid_realm.html +++ b/templates/zerver/invalid_realm.html @@ -1,21 +1,27 @@ {% extends "zerver/portico.html" %} {% block title %} -{{ _("Organization does not exist") }} | Zulip +{{ _("No organization found") }} | Zulip {% endblock %} {% block portico_content %} -