Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Remove realm-level email_address_visibility setting.

Sahil Batra9d1dc20e6ef8
diff --git a/api_docs/changelog.md b/api_docs/changelog.md
index 222f0fe344a..ca8d8996a70 100644
--- a/api_docs/changelog.md
+++ b/api_docs/changelog.md
@@ -37,6 +37,8 @@ format used by the Zulip server that they are interacting with.
/realm/user_settings_defaults`](/api/update-realm-user-settings-defaults): Added
user setting `email_address_visibility` which will replace the existing realm
setting `email_address_visibility`.
+* [`POST /register`](/api/register-queue), [`PATCH /realm`]: Removed realm-level
+ `email_address_visibility` setting.
**Feature level 162**
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.js
index 7c6a650b3e9..f702d15f92c 100644
--- a/frontend_tests/node_tests/dispatch.js
+++ b/frontend_tests/node_tests/dispatch.js
@@ -477,10 +477,6 @@ run_test("realm settings", ({override}) => {
event = event_fixtures.realm__update__disallow_disposable_email_addresses;
test_realm_boolean(event, "realm_disallow_disposable_email_addresses");
- event = event_fixtures.realm__update__email_addresses_visibility;
- dispatch(event);
- assert_same(page_params.realm_email_address_visibility, 3);
-
event = event_fixtures.realm__update__notifications_stream_id;
dispatch(event);
assert_same(page_params.realm_notifications_stream_id, 42);
diff --git a/frontend_tests/node_tests/lib/events.js b/frontend_tests/node_tests/lib/events.js
index cbdf7baddfb..f8a135e71ca 100644
--- a/frontend_tests/node_tests/lib/events.js
+++ b/frontend_tests/node_tests/lib/events.js
@@ -296,13 +296,6 @@ exports.fixtures = {
value: false,
},
- realm__update__email_addresses_visibility: {
- type: "realm",
- op: "update",
- property: "email_address_visibility",
- value: 3,
- },
-
realm__update__emails_restricted_to_domains: {
type: "realm",
op: "update",
diff --git a/frontend_tests/node_tests/people.js b/frontend_tests/node_tests/people.js
index b1ffef3d6c5..3506d08fb26 100644
--- a/frontend_tests/node_tests/people.js
+++ b/frontend_tests/node_tests/people.js
@@ -16,13 +16,6 @@ const message_user_ids = mock_esm("../../static/js/message_user_ids");
const muted_users = zrequire("muted_users");
const people = zrequire("people");
-const settings_config = zrequire("settings_config");
-const visibility = settings_config.email_address_visibility_values;
-const admins_only = visibility.admins_only.code;
-
-function set_email_visibility(code) {
- page_params.realm_email_address_visibility = code;
-}
const welcome_bot = {
@@ -56,7 +49,6 @@ function initialize() {
people.init();
people.add_active_user({...me});
people.initialize_current_user(me.user_id);
- set_email_visibility(admins_only);
muted_users.set_muted_users([]);
}
diff --git a/frontend_tests/node_tests/popovers.js b/frontend_tests/node_tests/popovers.js
index f60c0ac8da4..9137888da0f 100644
--- a/frontend_tests/node_tests/popovers.js
+++ b/frontend_tests/node_tests/popovers.js
@@ -101,7 +101,6 @@ function make_image_stubber() {
function test_ui(label, f) {
run_test(label, (handlers) => {
page_params.is_admin = false;
- page_params.realm_email_address_visibility = 3;
page_params.custom_profile_fields = [];
popovers.clear_for_testing();
popovers.register_click_handlers();
diff --git a/frontend_tests/node_tests/search_suggestion_future.js b/frontend_tests/node_tests/search_suggestion_future.js
index ff038ee88ba..d7f1dc5efe5 100644
--- a/frontend_tests/node_tests/search_suggestion_future.js
+++ b/frontend_tests/node_tests/search_suggestion_future.js
@@ -9,8 +9,6 @@ const {page_params} = require("../zjsunit/zpage_params");
const narrow_state = mock_esm("../../static/js/narrow_state");
const stream_topic_history_util = mock_esm("../../static/js/stream_topic_history_util");
-const settings_config = zrequire("settings_config");
-
const huddle_data = zrequire("huddle_data");
const stream_data = zrequire("stream_data");
@@ -57,8 +55,6 @@ const example_avatar_url = "http://example.com/example.png";
function init() {
page_params.is_admin = true;
page_params.search_pills_enabled = true;
- page_params.realm_email_address_visibility =
- settings_config.email_address_visibility_values.admins_only.code;
people.init();
people.add_active_user(bob);
diff --git a/frontend_tests/node_tests/search_suggestion_now.js b/frontend_tests/node_tests/search_suggestion_now.js
index 9cec9186111..bdcda11338a 100644
--- a/frontend_tests/node_tests/search_suggestion_now.js
+++ b/frontend_tests/node_tests/search_suggestion_now.js
@@ -9,8 +9,6 @@ const {page_params} = require("../zjsunit/zpage_params");
const narrow_state = mock_esm("../../static/js/narrow_state");
const stream_topic_history_util = mock_esm("../../static/js/stream_topic_history_util");
-const settings_config = zrequire("settings_config");
-
const huddle_data = zrequire("huddle_data");
const stream_data = zrequire("stream_data");
@@ -56,8 +54,6 @@ const example_avatar_url = "http://example.com/example.png";
function init() {
page_params.is_admin = true;
page_params.search_pills_enabled = false;
- page_params.realm_email_address_visibility =
- settings_config.email_address_visibility_values.admins_only.code;
people.init();
people.add_active_user(bob);
diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.js
index d6918bdab12..c1c80c7ab52 100644
--- a/frontend_tests/node_tests/settings_org.js
+++ b/frontend_tests/node_tests/settings_org.js
@@ -99,8 +99,6 @@ function createSaveButtons(subsection) {
function test_submit_settings_form(override, submit_form) {
Object.assign(page_params, {
realm_bot_creation_policy: settings_bots.bot_creation_policy_values.restricted.code,
- realm_email_address_visibility:
- settings_config.email_address_visibility_values.admins_only.code,
realm_add_custom_emoji_policy: settings_config.common_policy_values.by_admins_only.code,
realm_waiting_period_threshold: 1,
realm_default_language: '"es"',
@@ -159,10 +157,6 @@ function test_submit_settings_form(override, submit_form) {
$bot_creation_policy_elem.val("1");
$bot_creation_policy_elem.attr("id", "id_realm_bot_creation_policy");
$bot_creation_policy_elem.data = () => "number";
- const $email_address_visibility_elem = $("#id_realm_email_address_visibility");
- $email_address_visibility_elem.val("1");
- $email_address_visibility_elem.attr("id", "id_realm_email_address_visibility");
- $email_address_visibility_elem.data = () => "number";
const $invite_to_realm_policy_elem = $("#id_realm_invite_to_realm_policy");
$invite_to_realm_policy_elem.val("2");
@@ -172,7 +166,6 @@ function test_submit_settings_form(override, submit_form) {
let $subsection_elem = $(`#org-${CSS.escape(subsection)}`);
$subsection_elem.set_find_results(".prop-element", [
$bot_creation_policy_elem,
- $email_address_visibility_elem,
$add_custom_emoji_policy_elem,
$create_public_stream_policy_elem,
$create_private_stream_policy_elem,
@@ -188,7 +181,6 @@ function test_submit_settings_form(override, submit_form) {
bot_creation_policy: 1,
invite_to_realm_policy: 2,
invite_to_stream_policy: 1,
- email_address_visibility: 1,
add_custom_emoji_policy: 1,
create_public_stream_policy: 2,
create_private_stream_policy: 2,
diff --git a/frontend_tests/node_tests/typeahead_helper.js b/frontend_tests/node_tests/typeahead_helper.js
index 429d726e9ae..1e235818a06 100644
--- a/frontend_tests/node_tests/typeahead_helper.js
+++ b/frontend_tests/node_tests/typeahead_helper.js
@@ -106,8 +106,6 @@ function test(label, f) {
people.clear_recipient_counts_for_testing();
page_params.is_admin = false;
page_params.realm_is_zephyr_mirror_realm = false;
- page_params.realm_email_address_visibility =
- settings_config.email_address_visibility_values.admins_only.code;
f(helpers);
});
diff --git a/static/js/admin.js b/static/js/admin.js
index cfbb226faa8..51ddad13180 100644
--- a/static/js/admin.js
+++ b/static/js/admin.js
@@ -223,7 +223,6 @@ export function build_page() {
insert_tip_box();
$("#id_realm_bot_creation_policy").val(page_params.realm_bot_creation_policy);
- $("#id_realm_email_address_visibility").val(page_params.realm_email_address_visibility);
$("#id_realm_digest_weekday").val(options.realm_digest_weekday);
}
diff --git a/static/js/page_params.ts b/static/js/page_params.ts
index 64ed88ec90d..44f11ab9ae8 100644
--- a/static/js/page_params.ts
+++ b/static/js/page_params.ts
@@ -21,7 +21,6 @@ export const page_params: {
realm_create_web_public_stream_policy: number;
realm_delete_own_message_policy: number;
realm_edit_topic_policy: number;
- realm_email_address_visibility: number;
realm_email_changes_disabled: boolean;
realm_enable_spectator_access: boolean;
realm_invite_to_realm_policy: number;
diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js
index d7b83ad15b2..ac7ba05aa7e 100644
--- a/static/js/server_events_dispatch.js
+++ b/static/js/server_events_dispatch.js
@@ -202,7 +202,6 @@ export function dispatch_normal_event(event) {
description: noop,
digest_emails_enabled: noop,
digest_weekday: noop,
- email_address_visibility: noop,
email_changes_disabled: settings_account.update_email_change_display,
disallow_disposable_email_addresses: noop,
inline_image_preview: noop,
diff --git a/static/styles/settings.css b/static/styles/settings.css
index ebb950aa992..ae3032b8d9c 100644
--- a/static/styles/settings.css
+++ b/static/styles/settings.css
@@ -1474,7 +1474,6 @@ $option_title_width: 180px;
#id_realm_private_message_policy,
#id_realm_add_custom_emoji_policy,
#id_realm_user_group_edit_policy,
-#id_realm_email_address_visibility,
#id_realm_wildcard_mention_policy,
#id_realm_move_messages_between_streams_policy,
#id_realm_invite_to_realm_policy,
diff --git a/static/templates/settings/organization_permissions_admin.hbs b/static/templates/settings/organization_permissions_admin.hbs
index 8cc671f40a4..9b0200bfa2e 100644
--- a/static/templates/settings/organization_permissions_admin.hbs
+++ b/static/templates/settings/organization_permissions_admin.hbs
@@ -81,14 +81,6 @@
is_checked=realm_avatar_changes_disabled
label=admin_settings_label.realm_avatar_changes_disabled}}
</div>
- <div class="input-group">
- <label for="realm_email_address_visibility">{{t "Who can access user email addresses" }}
- {{> ../help_link_widget link="/help/restrict-visibility-of-email-addresses" }}
- </label>
- <select name="realm_email_address_visibility" class="setting-widget prop-element bootstrap-focus-style" id="id_realm_email_address_visibility" data-setting-widget-type="number">
- {{> dropdown_options_widget option_values=email_address_visibility_values}}
- </select>
- </div>
</div>
<div id="org-stream-permissions" class="settings-subsection-parent">
diff --git a/version.py b/version.py
index 23a8ecec1b3..a7e5cc53300 100644
--- a/version.py
+++ b/version.py
@@ -33,7 +33,7 @@ DESKTOP_WARNING_VERSION = "5.4.3"
# Changes should be accompanied by documentation explaining what the
# new level means in api_docs/changelog.md, as well as "**Changes**"
# entries in the endpoint's documentation in `zulip.yaml`.
-API_FEATURE_LEVEL = 162
+API_FEATURE_LEVEL = 163
# Bump the minor PROVISION_VERSION to indicate that folks should provision
# only when going from an old version of the code to a newer version. Bump
diff --git a/zerver/actions/realm_settings.py b/zerver/actions/realm_settings.py
index 968b537e70a..065040a67fa 100644
--- a/zerver/actions/realm_settings.py
+++ b/zerver/actions/realm_settings.py
@@ -12,13 +12,7 @@ from confirmation.models import Confirmation, create_confirmation_link, generate
from zerver.actions.custom_profile_fields import do_remove_realm_custom_profile_fields
from zerver.actions.message_delete import do_delete_messages_by_sender
from zerver.actions.user_groups import update_users_in_full_members_system_group
-from zerver.actions.user_settings import (
- do_delete_avatar_image,
- send_delivery_email_update_events,
- send_user_email_update_event,
-)
-from zerver.lib.cache import flush_user_profile
-from zerver.lib.create_user import get_display_email_address
+from zerver.actions.user_settings import do_delete_avatar_image
from zerver.lib.message import parse_message_time_limit_setting, update_first_visible_message_id
from zerver.lib.send_email import FromAddress, send_email_to_admins
from zerver.lib.sessions import delete_user_sessions
@@ -98,30 +92,6 @@ def do_set_realm_property(
).decode(),
)
- if name == "email_address_visibility":
- user_profiles = UserProfile.objects.filter(realm=realm, is_bot=False)
-
- for user_profile in user_profiles:
- send_delivery_email_update_events(user_profile, old_value, value)
-
- if Realm.EMAIL_ADDRESS_VISIBILITY_EVERYONE not in [old_value, value]:
- # We use real email addresses on UserProfile.email only if
- # EMAIL_ADDRESS_VISIBILITY_EVERYONE is configured, so
- # changes between values that will not require changing
- # that field, so we can save work and return here.
- return
-
- for user_profile in user_profiles:
- user_profile.email = get_display_email_address(user_profile)
- UserProfile.objects.bulk_update(user_profiles, ["email"])
-
- for user_profile in user_profiles:
- transaction.on_commit(
- lambda: flush_user_profile(sender=UserProfile, instance=user_profile)
- )
- # TODO: Design a bulk event for this or force-reload all clients
- send_user_email_update_event(user_profile)
-
if name == "waiting_period_threshold":
update_users_in_full_members_system_group(realm, acting_user=acting_user)
diff --git a/zerver/migrations/0428_remove_realm_email_address_visibility.py b/zerver/migrations/0428_remove_realm_email_address_visibility.py
new file mode 100644
index 00000000000..0112f088d1c
--- /dev/null
+++ b/zerver/migrations/0428_remove_realm_email_address_visibility.py
@@ -0,0 +1,16 @@
+# Generated by Django 3.2.8 on 2021-10-28 14:53
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("zerver", "0427_migrate_to_user_level_email_address_visibility_setting"),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name="realm",
+ name="email_address_visibility",
+ ),
+ ]
diff --git a/zerver/models.py b/zerver/models.py
index 32f3b57a43f..92f0111e405 100644
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -449,26 +449,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
WILDCARD_MENTION_POLICY_MODERATORS,
]
- # Who in the organization has access to users' actual email
- # addresses. Controls whether the UserProfile.email field is the
- # same as UserProfile.delivery_email, or is instead garbage.
- EMAIL_ADDRESS_VISIBILITY_EVERYONE = 1
- EMAIL_ADDRESS_VISIBILITY_MEMBERS = 2
- EMAIL_ADDRESS_VISIBILITY_ADMINS = 3
- EMAIL_ADDRESS_VISIBILITY_NOBODY = 4
- EMAIL_ADDRESS_VISIBILITY_MODERATORS = 5
- email_address_visibility = models.PositiveSmallIntegerField(
- default=EMAIL_ADDRESS_VISIBILITY_EVERYONE,
- )
- EMAIL_ADDRESS_VISIBILITY_TYPES = [
- EMAIL_ADDRESS_VISIBILITY_EVERYONE,
- # The MEMBERS level is not yet implemented on the backend.
- ## EMAIL_ADDRESS_VISIBILITY_MEMBERS,
- EMAIL_ADDRESS_VISIBILITY_ADMINS,
- EMAIL_ADDRESS_VISIBILITY_NOBODY,
- EMAIL_ADDRESS_VISIBILITY_MODERATORS,
- ]
-
# Threshold in days for new users to create streams, and potentially take
# some other actions.
waiting_period_threshold = models.PositiveIntegerField(default=0)
@@ -725,7 +705,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
digest_weekday=int,
disallow_disposable_email_addresses=bool,
edit_topic_policy=int,
- email_address_visibility=int,
email_changes_disabled=bool,
emails_restricted_to_domains=bool,
enable_read_receipts=bool,
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 8e824dee3f7..2f4a16a593c 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -3772,6 +3772,12 @@ paths:
Unlike the simpler [realm/update](#realm-update) event format, this
event type supports multiple properties being changed in a
single event.
+
+ **Changes**: The `email_address_visibility` setting was removed in Zulip 7.0 (feature level 163).
+ It was replaced by a [user setting](/api/update-settings) with a
+ [realm user default](/api/update-realm-user-settings-defaults), with the encoding of different
+ values preserved. Clients can support all versions by supporting the current API and treating
+ every user as having the realm's email address visibility value.
properties:
id:
$ref: "#/components/schemas/EventIdSchema"
@@ -3912,21 +3918,6 @@ paths:
[permission-level]: /api/roles-and-permissions#permission-levels
[calc-full-member]: /api/roles-and-permissions#determining-if-a-user-is-a-full-member
- email_address_visibility:
- type: integer
- description: |
- The [policy][permission-level] for which users in this organization can see
- the real email addresses of other users.
-
- - 1 = Everyone
- - 2 = Members only
- - 3 = Administrators only
- - 4 = Nobody (though note that administrators can change this setting)
- - 5 = Moderators only
-
- **Changes**: Nobody added as an option in Zulip 3.0 (feature level 1).
-
- [permission-level]: /api/roles-and-permissions#permission-levels
email_changes_disabled:
type: boolean
description: |
@@ -9911,6 +9902,12 @@ paths:
if you need deeper details about how the Zulip event queue system
works, avoids clients needing to worry about large classes of
potentially messy races, etc.
+
+ **Changes**: The `email_address_visibility` setting was removed in Zulip 7.0 (feature level 163).
+ It was replaced by a [user setting](/api/update-settings) with a
+ [realm user default](/api/update-realm-user-settings-defaults), with the encoding of different
+ values preserved. Clients can support all versions by supporting the current API and treating
+ every user as having the realm's email address visibility value.
x-curl-examples-parameters:
oneOf:
- type: include
@@ -11956,23 +11953,6 @@ paths:
Whether the organization disallows disposable email
addresses.
- realm_email_address_visibility:
- type: integer
- description: |
- Present if `realm` is present in `fetch_event_types`.
-
- The [policy][permission-level] for which users in this organization can see
- the real email addresses of other users.
-
- - 1 = Everyone
- - 2 = Members only
- - 3 = Administrators only
- - 4 = Nobody (though note that administrators can change this setting)
- - 5 = Moderators only
-
- **Changes**: Nobody added as an option in Zulip 3.0 (feature level 1).
-
- [permission-level]: /api/roles-and-permissions#permission-levels
realm_email_changes_disabled:
type: boolean
description: |
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index fa37b12de7d..f9ba7aa69df 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -2602,7 +2602,6 @@ class RealmPropertyActionTest(BaseAction):
private_message_policy=Realm.PRIVATE_MESSAGE_POLICY_TYPES,
user_group_edit_policy=Realm.COMMON_POLICY_TYPES,
wildcard_mention_policy=Realm.WILDCARD_MENTION_POLICY_TYPES,
- email_address_visibility=Realm.EMAIL_ADDRESS_VISIBILITY_TYPES,
bot_creation_policy=Realm.BOT_CREATION_POLICY_TYPES,
video_chat_provider=[
Realm.VIDEO_CHAT_PROVIDERS["jitsi_meet"]["id"],
@@ -2645,15 +2644,6 @@ class RealmPropertyActionTest(BaseAction):
state_change_expected = True
old_value = vals[count]
num_events = 1
- if name == "email_address_visibility" and Realm.EMAIL_ADDRESS_VISIBILITY_EVERYONE in [
- old_value,
- val,
- ]:
- # one event for updating "email_address_visibility" setting +
- # one delivery_email update event is sent for 9 users (all human
- # users except the user themselves) + one email update event for
- # each of the 10 human users in the realm.
- num_events = 20
events = self.verify_action(
lambda: do_set_realm_property(
@@ -2689,13 +2679,6 @@ class RealmPropertyActionTest(BaseAction):
else:
check_realm_update("events[0]", events[0], name)
- if name == "email_address_visibility" and Realm.EMAIL_ADDRESS_VISIBILITY_EVERYONE in [
- old_value,
- val,
- ]:
- check_realm_user_update("events[1]", events[1], "delivery_email")
- check_realm_user_update("events[10]", events[10], "email")
-
def test_change_realm_property(self) -> None:
for prop in Realm.property_types:
with self.settings(SEND_DIGEST_EMAILS=True):
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py
index a378aed482d..6296fcfab34 100644
--- a/zerver/tests/test_home.py
+++ b/zerver/tests/test_home.py
@@ -132,7 +132,6 @@ class HomeTest(ZulipTestCase):
"realm_disallow_disposable_email_addresses",
"realm_domains",
"realm_edit_topic_policy",
- "realm_email_address_visibility",
"realm_email_auth_enabled",
"realm_email_changes_disabled",
"realm_emails_restricted_to_domains",
diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py
index 941da6912f2..f6ed78a0bf1 100644
--- a/zerver/tests/test_realm.py
+++ b/zerver/tests/test_realm.py
@@ -623,7 +623,6 @@ class RealmTest(ZulipTestCase):
create_private_stream_policy=10,
create_web_public_stream_policy=10,
invite_to_stream_policy=10,
- email_address_visibility=10,
message_retention_days=10,
video_chat_provider=10,
giphy_rating=10,
@@ -865,7 +864,6 @@ class RealmTest(ZulipTestCase):
self.assertEqual(realm.string_id, "realm_string_id")
self.assertEqual(realm.name, "realm name")
self.assertFalse(realm.emails_restricted_to_domains)
- self.assertEqual(realm.email_address_visibility, Realm.EMAIL_ADDRESS_VISIBILITY_EVERYONE)
self.assertEqual(realm.description, "")
self.assertTrue(realm.invite_required)
self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_LIMITED)
@@ -895,7 +893,6 @@ class RealmTest(ZulipTestCase):
"realm name",
emails_restricted_to_domains=True,
date_created=date_created,
- email_address_visibility=Realm.EMAIL_ADDRESS_VISIBILITY_MEMBERS,
description="realm description",
invite_required=False,
plan_type=Realm.PLAN_TYPE_STANDARD_FREE,
@@ -904,7 +901,6 @@ class RealmTest(ZulipTestCase):
self.assertEqual(realm.string_id, "realm_string_id")
self.assertEqual(realm.name, "realm name")
self.assertTrue(realm.emails_restricted_to_domains)
- self.assertEqual(realm.email_address_visibility, Realm.EMAIL_ADDRESS_VISIBILITY_MEMBERS)
self.assertEqual(realm.description, "realm description")
self.assertFalse(realm.invite_required)
self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD_FREE)
@@ -1159,7 +1155,6 @@ class RealmAPITest(ZulipTestCase):
invite_to_stream_policy=Realm.COMMON_POLICY_TYPES,
wildcard_mention_policy=Realm.WILDCARD_MENTION_POLICY_TYPES,
bot_creation_policy=Realm.BOT_CREATION_POLICY_TYPES,
- email_address_visibility=Realm.EMAIL_ADDRESS_VISIBILITY_TYPES,
video_chat_provider=[
dict(
video_chat_provider=orjson.dumps(
diff --git a/zerver/views/realm.py b/zerver/views/realm.py
index 9953b0fdda2..82dfddb875c 100644
--- a/zerver/views/realm.py
+++ b/zerver/views/realm.py
@@ -127,9 +127,6 @@ def update_realm(
wildcard_mention_policy: Optional[int] = REQ(
json_validator=check_int_in(Realm.WILDCARD_MENTION_POLICY_TYPES), default=None
),
- email_address_visibility: Optional[int] = REQ(
- json_validator=check_int_in(Realm.EMAIL_ADDRESS_VISIBILITY_TYPES), default=None
- ),
video_chat_provider: Optional[int] = REQ(json_validator=check_int, default=None),
giphy_rating: Optional[int] = REQ(json_validator=check_int, default=None),
default_code_block_language: Optional[str] = REQ(default=None),
diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py
index ae015cbd2c9..8188f9e63e4 100644
--- a/zilencer/management/commands/populate_db.py
+++ b/zilencer/management/commands/populate_db.py
@@ -316,7 +316,6 @@ class Command(BaseCommand):
string_id="zulip",
name="Zulip Dev",
emails_restricted_to_domains=False,
- email_address_visibility=Realm.EMAIL_ADDRESS_VISIBILITY_ADMINS,
description="The Zulip development environment default organization."
" It's great for testing!",
invite_required=False,