Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api: Include realm_web_public_access_enabled in get-server-settings.
Lauryn Menard8e1f62af89de
diff --git a/templates/zerver/api/changelog.md b/templates/zerver/api/changelog.mdindex 4e9a4b9d904..a070181454e 100644--- a/templates/zerver/api/changelog.md+++ b/templates/zerver/api/changelog.md@@ -21,6 +21,13 @@ format used by the Zulip server that they are interacting with.## Changes in Zulip 5.0+**Feature level 116**++* [`GET /server_settings`](/api/get-server-settings): Added+ `realm_web_public_access_enabled` as a realm-specific server setting,+ which can be used by clients to detect whether the realm allows and+ has at least one [web-public stream](/help/web-public-streams).+**Feature level 115*** Mobile push notifications about stream messages now include thediff --git a/version.py b/version.pyindex 5507038c46e..7ff9bda450a 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 templates/zerver/api/changelog.md, as well as# "**Changes**" entries in the endpoint's documentation in `zulip.yaml`.-API_FEATURE_LEVEL = 115+API_FEATURE_LEVEL = 116# 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. Bumpdiff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 5b374086ab8..599f197a05b 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -11966,6 +11966,18 @@ paths:description: |HTML description of the organization, as configured by the [organizationprofile](/help/create-your-organization-profile).+ realm_web_public_access_enabled:+ type: boolean+ description: |+ Whether the organization has enabled the creation of+ [web-public streams](/help/web-public-streams) and+ at least one web-public stream on the server currently+ exists. Clients that support viewing content+ in web-public streams without an account can+ use this to determine whether to offer that+ feature on the login page for an organization.++ **Changes**: New in Zulip 5.0 (feature level 116).example:{"authentication_methods":@@ -11991,6 +12003,7 @@ paths:"realm_name": "Zulip Dev","realm_icon": "https://secure.gravatar.com/avatar/62429d594b6ffc712f54aee976a18b44?d=identicon","realm_description": "<p>The Zulip development environment default organization. It's great for testing!</p>",+ "realm_web_public_access_enabled": false,"result": "success","external_authentication_methods":[diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.pyindex a13fe754424..a5764c848c2 100644--- a/zerver/tests/test_auth_backends.py+++ b/zerver/tests/test_auth_backends.py@@ -4800,6 +4800,7 @@ class FetchAuthBackends(ZulipTestCase):("zulip_merge_base", check_string),("zulip_feature_level", check_int),("push_notifications_enabled", check_bool),+ ("realm_web_public_access_enabled", check_bool),("msg", check_string),("result", check_string),*extra_fields,diff --git a/zerver/views/auth.py b/zerver/views/auth.pyindex 6ed593e7589..0b968a91263 100644--- a/zerver/views/auth.py+++ b/zerver/views/auth.py@@ -959,6 +959,7 @@ def api_get_server_settings(request: HttpRequest) -> HttpResponse:"realm_name","realm_icon","realm_description",+ "realm_web_public_access_enabled","external_authentication_methods",]:if context[settings_item] is not None: