documentation: Add context properties for subdomain and host segments.

The subdomain and host parts are already used within zulip_url, api_url,
this commit adds them as context properties themselves, so that they
can be used in email addresses and URLs without the URI scheme,
increasing uniformity.

The new context properties `display_host` and `display_subdomain` are
usable in the Help, API docs and Policies.

Occurrences of `*.zulipchat.com` have been updated to use them.
This commit is contained in:
Niloth P
2025-05-26 03:41:07 +05:30
committed by Tim Abbott
parent c690177481
commit dab97304f6
5 changed files with 7 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ You'll need:
* An account in a Zulip organization
(e.g., [the Zulip development community](https://zulip.com/development-community/),
`<yourSubdomain>.zulipchat.com`, or a Zulip organization on your own
`{{ display_host }}`, or a Zulip organization on your own
[development](https://zulip.readthedocs.io/en/latest/development/overview.html) or
[production](https://zulip.readthedocs.io/en/latest/production/install.html) server).
* A computer where you're running the bot from.

View File

@@ -50,7 +50,7 @@ Zulip's SCIM integration has the following limitations:
1. In the **Provisioning** tab, click **Configure API Integration**, check the
**Enable API integration** checkbox, and specify the following fields:
* **Base URL**: `yourorganization.zulipchat.com/scim/v2`
* **Base URL**: `{{ display_host }}/scim/v2`
* **API token**: `Bearer <token>` (given to you by Zulip support)
When you proceed to the next step, Okta will verify that these details are
@@ -109,7 +109,7 @@ Zulip's SCIM integration has the following limitations:
1. Continue to the app's management screen and click **Provisioning** in the left panel.
1. In the **Provisioning Mode** menu, select **Automatic** and specify the following fields:
* **Tenant URL**: `http://yourorganization.zulipchat.com/scim/v2/?aadOptscim062020`.
* **Tenant URL**: `{{ display_host }}/scim/v2/?aadOptscim062020`.
The `?aadOptscim062020` part of it is a [feature flag][feature-flag]
that needs to be added to ensure SCIM compliance by Entra ID.
* **Secret Token**: `<token>` (given to you by Zulip support)

View File

@@ -32,7 +32,7 @@ corner, then click on **Plugins**.
3. Find the **Redmine Zulip** plugin, and click **Configure**. Fill
out the following fields:
* Zulip URL (e.g `https://yourZulipDomain.zulipchat.com/`)
* Zulip URL (e.g `{{ zulip_url }}`)
* Zulip Bot E-mail
* Zulip Bot API key
* Stream name __*__

View File

@@ -59,6 +59,8 @@ def add_api_url_context(context: dict[str, Any], request: HttpRequest) -> None:
api_url = settings.EXTERNAL_URI_SCHEME + api_url_scheme_relative
zulip_url = settings.EXTERNAL_URI_SCHEME + display_host
context["display_subdomain"] = display_subdomain
context["display_host"] = display_host
context["external_url_scheme"] = settings.EXTERNAL_URI_SCHEME
context["api_url"] = api_url
context["api_url_scheme_relative"] = api_url_scheme_relative

View File

@@ -38,7 +38,7 @@ sent by Zapier directly in Zulip.
enter the email associated with your Zulip account in the
**Recipients** field. Otherwise, enter `user` +
[your user ID](/help/view-someones-profile) +
`@` + your Zulip domain, e.g., `user123@acme.zulipchat.com`.
`@` + your Zulip domain, e.g., `user123@{{ display_host }}`.
1. Click **Publish** to enable your Zap.