zulip/analytics/tests
Sahil Batra 0ed5f76063 settings: Add backend code for using user email_address_visibility setting.
This commits update the code to use user-level email_address_visibility
setting instead of realm-level to set or update the value of UserProfile.email
field and to send the emails to clients.

Major changes are -

- UserProfile.email field is set while creating the user according to
RealmUserDefault.email_address_visbility.

- UserProfile.email field is updated according to change in the setting.

- 'email_address_visibility' is added to person objects in user add event
and in avatar change event.

- client_gravatar can be different for different users when computing
avatar_url for messages and user objects since email available to clients
is dependent on user-level setting.

- For bots, email_address_visibility is set to EVERYONE while creating
them irrespective of realm-default value.

- Test changes are basically setting user-level setting instead of realm
setting and modifying the checks accordingly.
2023-02-10 17:35:49 -08:00
..
__init__.py
test_activity_views.py analytics-activity: Remove link with realm owners emails. 2022-12-02 17:30:30 -08:00
test_counts.py ruff: Fix SIM105 Use `contextlib.suppress` instead of try-except-pass. 2023-01-23 11:18:36 -08:00
test_fixtures.py tests: Consistently use assert_length helper. 2021-05-19 11:55:56 -07:00
test_stats_views.py tests: Refactor away result.json() calls with helpers. 2022-06-06 23:06:00 -07:00
test_support_views.py settings: Add backend code for using user email_address_visibility setting. 2023-02-10 17:35:49 -08:00