Skip to content

Commit

Permalink
docs: Consistently hyphenate “web-public”.
Browse files Browse the repository at this point in the history
In English, compound adjectives should essentially always be
hyphenated.  This makes them easier to parse, especially for users who
might not recognize that the words “web public” go together as a
phrase.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
  • Loading branch information
andersk authored and timabbott committed Jan 29, 2022
1 parent 9ae72fd commit 90e202c
Show file tree
Hide file tree
Showing 21 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion frontend_tests/node_tests/browser_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test("update internal hash if required", ({override_rewire}) => {
assert.equal(stub.num_calls, 1);
});

test("web public view hash restore", () => {
test("web-public view hash restore", () => {
browser_history.update("#");
assert.equal(window.location.hash, "");
const new_hash = "#narrow/is/private";
Expand Down
2 changes: 1 addition & 1 deletion static/js/browser_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function set_hash_before_overlay(hash) {
}

export function update_web_public_hash(hash) {
// Returns true if hash is web public compatible.
// Returns true if hash is web-public compatible.
if (hash_util.is_spectator_compatible(hash)) {
state.spectator_old_hash = hash;
return true;
Expand Down
2 changes: 1 addition & 1 deletion static/js/stream_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const default_stream_ids = new Set();
export const stream_privacy_policy_values = {
web_public: {
code: "web-public",
name: $t({defaultMessage: "Web public"}),
name: $t({defaultMessage: "Web-public"}),
description: $t({
defaultMessage:
"Organization members can join (guests must be invited by a subscriber); anyone on the Internet can view complete message history without creating an account",
Expand Down
2 changes: 1 addition & 1 deletion static/templates/compose.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<i class="fa fa-lock" title="{{t 'This is a private stream' }}" aria-hidden="true"></i>
</span>
<span id="compose-globe-icon">
<i class="fa fa-globe" title="{{t 'This is a web public stream' }}" aria-hidden="true"></i>
<i class="fa fa-globe" title="{{t 'This is a web-public stream' }}" aria-hidden="true"></i>
</span>
<input type="text" class="recipient_box" name="stream_message_recipient_stream" id="stream_message_recipient_stream" maxlength="30" value="" placeholder="{{t 'Stream' }}" autocomplete="off" tabindex="0" aria-label="{{t 'Stream' }}" />
<i class="fa fa-angle-right" aria-hidden="true"></i>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/login_to_access.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p>
{{#tr}}
Since you are not logged in, you can only view messages in
<z-link>web public streams</z-link>.
<z-link>web-public streams</z-link>.
{{#*inline "z-link"}}<a target="_blank" href="https://zulipchat.com/help/stream-permissions">{{> @partial-block}}</a>{{/inline}}
{{/tr}}
</p>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/recipient_row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{/if}}

{{~#if is_web_public ~}}
<i class="fa fa-globe recipient-row-stream-icon" title="{{t 'This is a web public stream' }}" aria-label="{{t 'This is a web public stream' }}"></i>
<i class="fa fa-globe recipient-row-stream-icon" title="{{t 'This is a web-public stream' }}" aria-label="{{t 'This is a web-public stream' }}"></i>
{{/if}}

{{~! Recipient (e.g. stream/topic or topic) ~}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{else if is_web_public}}
<li>
{{#tr}}
This is a <b>web public stream</b>. Any member of the organization can join without an invitation and anyone on the internet can read the content published.
This is a <b>web-public stream</b>. Any member of the organization can join without an invitation and anyone on the internet can read the content published.
{{/tr}}
</li>
{{else}}
Expand Down
2 changes: 1 addition & 1 deletion templates/zerver/api/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ format used by the Zulip server that they are interacting with.
**Feature level 103**

* [`POST /register`](/api/register-queue): Added `create_web_public_stream_policy`
policy for which users can create web public streams.
policy for which users can create web-public streams.
* [`PATCH /realm`]: Added support for updating `create_web_public_stream_policy`.
* [`POST /register`](/api/register-queue): Added `can_create_web_public_streams` boolean
field to the response.
Expand Down
70 changes: 35 additions & 35 deletions templates/zerver/help/web-public-streams.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
# Web public streams
# Web-public streams

!!! warn ""

This feature is under development, and is not yet available on Zulip Cloud.

Administrators may enable the option to create **web public streams**.
Web public streams can be viewed by anyone on the Internet without
Administrators may enable the option to create **web-public streams**.
Web-public streams can be viewed by anyone on the Internet without
creating an account in your organization.

For example, you can [link to a Zulip
topic](/help/link-to-a-message-or-conversation) in a web public stream
topic](/help/link-to-a-message-or-conversation) in a web-public stream
from a GitHub issue, a social media post, or a forum thread, and
anyone will be able to click the link and view the discussion in the
Zulip web application without needing to create an account.

Users who wish to post content will need to create an account in order
to do so.

Web public streams are indicated with a globe (<i class="fa
Web-public streams are indicated with a globe (<i class="fa
fa-globe"></i>) icon.

## Enabling web public streams in your organization
## Enabling web-public streams in your organization

Enabling web public streams makes it possible to create web public
Enabling web-public streams makes it possible to create web-public
streams in your organization. It also makes certain information about
your organization accessible to anyone on the Internet via the Zulip
API (details below).

To help protect closed organizations, creating web public streams is
To help protect closed organizations, creating web-public streams is
disabled by default for all organizations.

### Information that can be accessed via API when web public streams are enabled
### Information that can be accessed via API when web-public streams are enabled

The following information about your organization can be accessed via the Zulip
API if web public streams are enabled and there is currently at least one web
public stream.
API if web-public streams are enabled and there is currently at least one
web-public stream.

* The organization's settings (linkifiers, custom emoji, permissions
settings, etc.)
* Names of users
* Names of user groups and their membership
* Names and descriptions of streams

Enabling web public streams is thus primarily recommended for open
Enabling web-public streams is thus primarily recommended for open
communities such as open-source projects and research communities.

### Enable or disable web public streams
### Enable or disable web-public streams

!!! warn ""
Self-hosted Zulip servers must enable support for web public streams by setting
Self-hosted Zulip servers must enable support for web-public streams by setting
`WEB_PUBLIC_STREAMS_ENABLED = True` in their [server
settings](https://zulip.readthedocs.io/en/latest/production/settings.html)
prior to proceeding.
Expand All @@ -58,50 +58,50 @@ communities such as open-source projects and research communities.
{settings_tab|organization-permissions}

2. Under **Stream permissions**, toggle the checkbox labeled "Allow
creating web public streams (visible to anyone on the Internet)".
creating web-public streams (visible to anyone on the Internet)".

{end_tabs}

### Manage who can create web public streams
### Manage who can create web-public streams

{start_tabs}

{settings_tab|organization-permissions}

2. Under **Stream permissions**, make sure the checkbox labeled "Allow
creating web public streams (visible to anyone on the Internet)" is
creating web-public streams (visible to anyone on the Internet)" is
checked.

3. Under **Who can create web public streams?**, select the option you prefer.
3. Under **Who can create web-public streams?**, select the option you prefer.

{end_tabs}

!!! tip ""
See [Managing abuse](#managing-abuse) to learn why only
trusted roles like Moderators and Administrators can create web public streams.
trusted roles like Moderators and Administrators can create web-public streams.

## Creating a web public stream
## Creating a web-public stream

To create a new web public stream, follow the [instructions for
To create a new web-public stream, follow the [instructions for
creating stream](/help/create-a-stream#create-a-stream_1), selecting
the **Web public** option for **Who can access the stream?**.
the **Web-public** option for **Who can access the stream?**.

To make an existing stream web public, follow the instructions to
To make an existing stream web-public, follow the instructions to
[change the privacy of a
stream](/help/change-the-privacy-of-a-stream), selecting the **Web
public** option for **Who can access the stream?**.
stream](/help/change-the-privacy-of-a-stream), selecting the
**Web-public** option for **Who can access the stream?**.

## What can logged out visitors do?

Logged out visitors can browse all content in web public streams,
Logged out visitors can browse all content in web-public streams,
including using Zulip's [built-in search](/help/search-for-messages)
to find conversations. Logged out visitors can only access
the web public streams in your organization, and the topics, messages
the web-public streams in your organization, and the topics, messages
(including uploaded files) and emoji reactions in those streams.

They **cannot**:

* View streams that are not configured as web public streams (or see
* View streams that are not configured as web-public streams (or see
whether any such streams exist) without creating an account.
* Send messages.
* React with emoji.
Expand All @@ -124,8 +124,8 @@ detailed below.
### Information about users

Logged out visitors can see the following information about users who
participate in web public streams. They do not see this information
about users who do not participate in web public streams in the Zulip
participate in web-public streams. They do not see this information
about users who do not participate in web-public streams in the Zulip
UI, though they may access it via the Zulip API.

* Name
Expand All @@ -147,7 +147,7 @@ but not to logged out visitors:
and whether they have set themselves as unavailable.
* Detailed profile information, such as [custom profile
fields](/help/add-custom-profile-fields).
* Which users are subscribed to which web public streams.
* Which users are subscribed to which web-public streams.

## Managing abuse

Expand All @@ -156,12 +156,12 @@ that allows hosting files visible to the Internet is a potential target for bad
actors looking for places to distribute illegal or malicious content.

In order to protect Zulip organizations from
bad actors, web public streams have a few limitations designed to make
bad actors, web-public streams have a few limitations designed to make
Zulip an inconvenient target:

* Only users in trusted roles like Moderators can be given permission
to create web public streams. This is intended to make it hard for
an attacker to host malicious content in an unadvertised web public
to create web-public streams. This is intended to make it hard for
an attacker to host malicious content in an unadvertised web-public
stream in a legitimate organization.
* There are rate limits for unauthenticated access to uploaded
files, including viewing avatars and custom emoji.
Expand All @@ -177,7 +177,7 @@ with Zulip's Rules of Use.

## Caveats

The web public visitors feature is not yet integrated with Zulip's
The web-public visitors feature is not yet integrated with Zulip's
live-update system. As a result, a visitor will not see messages that are sent
while Zulip is open until they reload the browser window.

Expand Down
2 changes: 1 addition & 1 deletion zerver/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def login_context(request: HttpRequest) -> Dict[str, Any]:
else:
realm_description = get_realm_rendered_description(realm)
realm_invite_required = realm.invite_required
# We offer web public access only if the realm has actual web
# We offer web-public access only if the realm has actual web
# public streams configured, in addition to having it enabled.
realm_web_public_access_enabled = realm.allow_web_public_streams_access()

Expand Down
2 changes: 1 addition & 1 deletion zerver/lib/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3763,7 +3763,7 @@ def validate_user_access_to_subscribers_helper(
if stream_dict["is_web_public"]:
return

# With the exception of web public streams, a guest must
# With the exception of web-public streams, a guest must
# be subscribed to a stream (even a public one) in order
# to see subscribers.
if user_profile.is_guest:
Expand Down
2 changes: 1 addition & 1 deletion zerver/lib/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def access_web_public_message(
message_id: int,
) -> Message:
"""Access control method for unauthenticated requests interacting
with a message in web public streams.
with a message in web-public streams.
"""

# We throw a MissingAuthenticationError for all errors in this
Expand Down
2 changes: 1 addition & 1 deletion zerver/lib/narrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def is_web_public_narrow(narrow: Optional[Iterable[Dict[str, Any]]]) -> bool:
return False

for term in narrow:
# Web public queries are only allowed for limited types of narrows.
# Web-public queries are only allowed for limited types of narrows.
# term == {'operator': 'streams', 'operand': 'web-public', 'negated': False}
if (
term["operator"] == "streams"
Expand Down
4 changes: 2 additions & 2 deletions zerver/lib/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def filter_stream_authorization(
if stream.recipient_id in subscribed_recipient_ids:
continue

# Web public streams are accessible even to guests
# Web-public streams are accessible even to guests
if stream.is_web_public:
continue

Expand Down Expand Up @@ -698,7 +698,7 @@ def list_to_streams(

if web_public_stream_requested:
if not user_profile.realm.web_public_streams_enabled():
raise JsonableError(_("Web public streams are not enabled."))
raise JsonableError(_("Web-public streams are not enabled."))
if not user_profile.can_create_web_public_streams():
# We set create_web_public_stream_policy to allow only organization owners
# to create web-public streams, because of their sensitive nature.
Expand Down
8 changes: 4 additions & 4 deletions zerver/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ class Realm(models.Model):
default=2 ** 31 - 1,
)

# Allow users to access web public streams without login. This
# setting also controls API access of web public streams.
# Allow users to access web-public streams without login. This
# setting also controls API access of web-public streams.
enable_spectator_access: bool = models.BooleanField(default=False)

# Whether the organization has enabled inline image and URL previews.
Expand Down Expand Up @@ -924,7 +924,7 @@ def allow_web_public_streams_access(self) -> bool:
If any of the streams in the realm is web
public and `enable_spectator_access` and
settings.WEB_PUBLIC_STREAMS_ENABLED is True,
then the Realm is web public.
then the Realm is web-public.
"""
return self.has_web_public_streams()

Expand Down Expand Up @@ -2245,7 +2245,7 @@ class Stream(models.Model):
"invite_only": False,
"history_public_to_subscribers": True,
"is_web_public": True,
"policy_name": gettext_lazy("Web public"),
"policy_name": gettext_lazy("Web-public"),
},
"public": {
"invite_only": False,
Expand Down
12 changes: 6 additions & 6 deletions zerver/openapi/zulip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3605,7 +3605,7 @@ paths:
enable_spectator_access:
type: boolean
description: |
Whether web public streams are enabled in this organization.
Whether web-public streams are enabled in this organization.

Can only be enabled if the `WEB_PUBLIC_STREAMS_ENABLED`
[server setting][server-settings] is enabled on the Zulip
Expand Down Expand Up @@ -6732,9 +6732,9 @@ paths:
in: query
description: |
This parameter determines whether any newly created streams will be
web public streams.
web-public streams.

Note that creating web public streams requires the
Note that creating web-public streams requires the
`WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
to be enabled on the Zulip server in question, the organization
to have enabled the `enable_spectator_access` realm setting, and
Expand Down Expand Up @@ -10663,7 +10663,7 @@ paths:
description: |
Present if `realm` is present in `fetch_event_types`.

Whether web public streams and related anonymous access APIs/features
Whether web-public streams and related anonymous access APIs/features
are enabled in this organization.

Can only be enabled if the `WEB_PUBLIC_STREAMS_ENABLED`
Expand Down Expand Up @@ -12663,7 +12663,7 @@ paths:
- name: include_web_public
in: query
description: |
Include all web public streams.
Include all web-public streams.
schema:
type: boolean
default: false
Expand Down Expand Up @@ -12914,7 +12914,7 @@ paths:
description: |
Change whether the stream is a web-public stream.

Note that creating web public streams requires the
Note that creating web-public streams requires the
`WEB_PUBLIC_STREAMS_ENABLED` [server setting][server-settings]
to be enabled on the Zulip server in question, the organization
to have enabled the `enable_spectator_access` realm setting, and
Expand Down
2 changes: 1 addition & 1 deletion zerver/tests/test_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_new_stream_link(self) -> None:
self.assertEqual(stream_count, 0)
self.assertEqual(stream_info["html"], [])

# but they do if we make it web public
# but they do if we make it web-public
stream.is_web_public = True
stream.save()

Expand Down
2 changes: 1 addition & 1 deletion zerver/tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ def do_test_subscribe_events(self, include_subscribers: bool) -> None:
check_stream_update("events[0]", events[0])
check_message("events[1]", events[1])

# Update stream privacy - make stream web public
# Update stream privacy - make stream web-public
action = lambda: do_change_stream_permission(
stream,
invite_only=False,
Expand Down
Loading

0 comments on commit 90e202c

Please sign in to comment.