zulip/zproject
Lauryn Menard 673a01ea0c realm-deactivation: Send email to owners as part of deactivation.
Creates a new "realm_deactivated" email that can be sent to realm
owners as part of `do_deactivate_realm`, via a boolean flag,
`email_owners`.

This flag is set to `False` when `do_deactivate_realm` is used for
realm exports or changing a realm's subdomain, so that the active
organization owners are not emailed in those cases.

This flag is optional for the `deactivate_realm` management command,
but as there is no active user passed in that case, then the email
is sent without referencing who deactivated the realm.

It is passed as `True` for the support analytics view, but the email
that is generated does not include information about the support
admin user who completed the request for organization deactivation.

When an active organization owner deactivates the organization, then
the flag is `True` and an email is sent to them as well as any other
active organization owners, with a slight variation in the email text
for those two cases.

Adds specific tests for when `email_owners` is passed as `True`. All
existing tests for other functionality of `do_deactivate_user` pass
the flag as `False`.

Adds `localize` from django.util.formats as a jinja env filter so
that the dates in these emails are internationlized for the owner's
default language setting in the "realm_deactivated" email templates.

Fixes #24685.
2024-06-26 16:48:18 -07:00
..
jinja2 realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00
__init__.py
backends.py upload: Remove redundant acting_user_profile argument. 2024-06-26 16:43:11 -07:00
computed_settings.py thumbnailing: Add pyvips dependency. 2024-06-20 23:06:08 -04:00
config.py config: Use logic from zulip_tools, to support bools. 2024-03-15 15:34:12 -07:00
configured_settings.py settings: Print about custom settings from runtornado. 2023-12-05 12:33:34 -08:00
default_settings.py s3: Allow setting a CloudFront URL prefix for avatar and emoji images. 2024-06-26 16:43:11 -07:00
dev_settings.py topic: Add resolve topic undo grace period. 2024-06-10 13:34:23 -07:00
dev_urls.py dev_urls: Make requests to /docs redirect to the index. 2024-03-21 11:27:14 -07:00
email_backends.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
prod_settings.pyi
prod_settings_template.py s3: Allow setting a CloudFront URL prefix for avatar and emoji images. 2024-06-26 16:43:11 -07:00
sentry.py docs: Update Django links to our current version. 2024-05-24 10:18:37 -07:00
settings.py settings: Hide django_stubs_ext from mypy. 2024-04-17 16:49:03 -07:00
settings_types.py scim: Add config option to disable initial streams for guests. 2024-04-11 12:28:26 -07:00
template_loaders.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
test_extra_settings.py topic: Add resolve topic undo grace period. 2024-06-10 13:34:23 -07:00
test_settings.py settings: Refactor how TEST_SUITE is configured. 2023-12-04 09:50:14 -08:00
urls.py urls: Update stale file name 'hotspots' to 'onboarding_steps'. 2024-06-18 09:39:50 -07:00
wsgi.py requirements: Upgrade Python requirements. 2024-01-29 10:41:54 -08:00