Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
state_data: Remove can_subscribe_other_users attribute.
Shubham Padia9402b248a184
diff --git a/api_docs/changelog.md b/api_docs/changelog.mdindex 0fef330a3ab..c86580d9db7 100644--- a/api_docs/changelog.md+++ b/api_docs/changelog.md@@ -27,6 +27,8 @@ format used by the Zulip server that they are interacting with.Added `can_add_subscribers_group` realm setting which is a[group-setting value](/api/group-setting-values) describing the set of userswith permission to add subscribers to channels in the organization.+* [`POST /register`](/api/register-queue): Removed+ `can_subscribe_other_users` boolean field from the response.**Feature level 340**diff --git a/web/src/state_data.ts b/web/src/state_data.tsindex f9eeef55e5f..f7b3aa11af0 100644--- a/web/src/state_data.ts+++ b/web/src/state_data.ts@@ -212,7 +212,6 @@ const current_user_schema = z.object({can_create_streams: z.boolean(),can_create_web_public_streams: z.boolean(),can_invite_others_to_realm: z.boolean(),- can_subscribe_other_users: z.boolean(),delivery_email: z.string(),email: z.string(),full_name: z.string(),diff --git a/zerver/lib/events.py b/zerver/lib/events.pyindex d10b54a4c3d..b9a7b3c9d4c 100644--- a/zerver/lib/events.py+++ b/zerver/lib/events.py@@ -605,7 +605,6 @@ def fetch_initial_state_data(or state["can_create_public_streams"]or state["can_create_web_public_streams"])- state["can_subscribe_other_users"] = settings_user.can_subscribe_other_users()state["can_invite_others_to_realm"] = (realm.can_invite_users_group_id in settings_user_recursive_group_ids)@@ -1031,7 +1030,6 @@ def apply_event(or state["can_create_public_streams"]or state["can_create_web_public_streams"])- state["can_subscribe_other_users"] = user_profile.can_subscribe_other_users()state["can_invite_others_to_realm"] = user_profile.can_invite_users_by_email()if state["is_guest"]:@@ -1321,11 +1319,6 @@ def apply_event(else state["server_jitsi_server_url"])- if (- event["property"] == "invite_to_stream_policy"- and "can_subscribe_other_users" in state- ):- state["can_subscribe_other_users"] = user_profile.has_permission(event["property"])elif event["op"] == "update_dict":for key, value in event["data"].items():if key == "max_file_upload_size_mib":diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.pyindex f7779899ab5..81fa73d7a61 100644--- a/zerver/tests/test_home.py+++ b/zerver/tests/test_home.py@@ -82,7 +82,6 @@ class HomeTest(ZulipTestCase):"can_create_streams","can_create_web_public_streams","can_invite_others_to_realm",- "can_subscribe_other_users","cross_realm_bots","custom_profile_field_types","custom_profile_fields",