diff --git a/zerver/actions/invites.py b/zerver/actions/invites.py index 7a6066f81b..2e6e21e1a9 100644 --- a/zerver/actions/invites.py +++ b/zerver/actions/invites.py @@ -59,6 +59,7 @@ def do_send_confirmation_email( "referrer_email": referrer.delivery_email, "activate_url": activation_url, "referrer_realm_name": referrer.realm.name, + "corporate_enabled": settings.CORPORATE_ENABLED, } send_email( "zerver/emails/invitation", diff --git a/zerver/actions/realm_settings.py b/zerver/actions/realm_settings.py index 829b396318..1cb7108005 100644 --- a/zerver/actions/realm_settings.py +++ b/zerver/actions/realm_settings.py @@ -481,7 +481,12 @@ def do_send_realm_reactivation_email(realm: Realm, *, acting_user: Optional[User event_type=RealmAuditLog.REALM_REACTIVATION_EMAIL_SENT, event_time=timezone_now(), ) - context = {"confirmation_url": url, "realm_uri": realm.uri, "realm_name": realm.name} + context = { + "confirmation_url": url, + "realm_uri": realm.uri, + "realm_name": realm.name, + "corporate_enabled": settings.CORPORATE_ENABLED, + } language = realm.default_language send_email_to_admins( "zerver/emails/realm_reactivation", diff --git a/zerver/context_processors.py b/zerver/context_processors.py index 04c8b18dae..ef47311405 100644 --- a/zerver/context_processors.py +++ b/zerver/context_processors.py @@ -47,6 +47,7 @@ def common_context(user: UserProfile) -> Dict[str, Any]: "external_url_scheme": settings.EXTERNAL_URI_SCHEME, "external_host": settings.EXTERNAL_HOST, "user_name": user.full_name, + "corporate_enabled": settings.CORPORATE_ENABLED, } diff --git a/zerver/views/registration.py b/zerver/views/registration.py index 23d8ddd1f2..351d61b360 100644 --- a/zerver/views/registration.py +++ b/zerver/views/registration.py @@ -692,6 +692,7 @@ def send_confirm_registration_email( context={ "create_realm": (realm is None), "activate_url": activation_url, + "corporate_enabled": settings.CORPORATE_ENABLED, }, realm=realm, request=request,