settings: Add realm setting for Zulip communities directory.

Adds `want_advertise_in_communities_directory` to the realm model
to track organizations that give permission to be listed on such
a site / directory on zulip.com.

Adds a checkbox to the organization profile admin for
organizations to give permission to be advertised in the
Zulip communities directory.

Adds a help center article about the Zulip communities directory
and uses a shared intro documentation file to create sections in
the articles on creating an organization profile and moderating
open organizations.

Co-authored-by: Alya Abbott <alya@zulip.com>
This commit is contained in:
Lauryn Menard 2022-04-22 18:45:30 +02:00 committed by Tim Abbott
parent 1ac8673989
commit 44c9b788f9
19 changed files with 175 additions and 1 deletions

View File

@ -384,6 +384,9 @@ run_test("realm settings", ({override}) => {
event = event_fixtures.realm__update__invite_to_realm_policy;
test_realm_integer(event, "realm_invite_to_realm_policy");
event = event_fixtures.realm__update__want_advertise_in_communities_directory;
test_realm_boolean(event, "realm_want_advertise_in_communities_directory");
event = event_fixtures.realm__update__name;
test_electron_dispatch(event, (key, val) => {

View File

@ -356,6 +356,13 @@ exports.fixtures = {
value: 41,
},
realm__update__want_advertise_in_communities_directory: {
type: "realm",
op: "update",
property: "want_advertise_in_communities_directory",
value: false,
},
realm__update_dict__default: {
type: "realm",
op: "update_dict",

View File

@ -17,6 +17,10 @@ import * as settings_sections from "./settings_sections";
import * as settings_toggle from "./settings_toggle";
const admin_settings_label = {
// Organization profile
realm_want_advertise_in_communities_directory: $t({
defaultMessage: "Advertise organization in the Zulip communities directory",
}),
// Organization settings
realm_allow_edit_history: $t({defaultMessage: "Enable message edit history"}),
realm_mandatory_topics: $t({defaultMessage: "Require topics in stream messages"}),
@ -164,6 +168,10 @@ export function build_page() {
can_sort_by_email: settings_data.show_email(),
realm_push_notifications_enabled: page_params.realm_push_notifications_enabled,
realm_org_type_values: settings_org.get_org_type_dropdown_options(),
realm_want_advertise_in_communities_directory:
page_params.realm_want_advertise_in_communities_directory,
disable_want_advertise_in_communities_directory:
!page_params.server_web_public_streams_enabled,
};
if (options.realm_logo_source !== "D" && options.realm_night_logo_source === "D") {

View File

@ -224,6 +224,7 @@ export function dispatch_normal_event(event) {
video_chat_provider: compose.update_video_chat_button_display,
giphy_rating: giphy.update_giphy_rating,
waiting_period_threshold: noop,
want_advertise_in_communities_directory: noop,
wildcard_mention_policy: noop,
};
switch (event.op) {

View File

@ -25,6 +25,13 @@
{{> dropdown_options_widget option_values=realm_org_type_values}}
</select>
</div>
{{> settings_checkbox
setting_name="realm_want_advertise_in_communities_directory"
prefix="id_"
is_checked=realm_want_advertise_in_communities_directory
is_disabled=disable_want_advertise_in_communities_directory
label=admin_settings_label.realm_want_advertise_in_communities_directory
help_link="/help/communities-directory"}}
<div class="input-group admin-realm">
<label for="realm_description">{{t "Organization description" }}</label>
<textarea id="id_realm_description" name="realm_description" class="admin-realm-description setting-widget prop-element"

View File

@ -20,6 +20,13 @@ format used by the Zulip server that they are interacting with.
## Changes in Zulip 6.0
**Feature level 129**
* [`POST /register`](/api/register-queue),
[`GET/events`](/api/get-events), `PATCH /realm`: Added realm setting
`want_advertise_in_communities_directory` for organizations to give
permission to be advertised in the Zulip communities directory.
**Feature level 128**
* [`POST /register`](/api/register-queue), [`GET

View File

@ -0,0 +1,42 @@
# Zulip communities directory
{!communities-directory-intro.md!}
In order to be eligible for listing in the communities directory, an
organization must be open to the public. Your organization is eligible if users are
allowed [join without an invitation][join-without-invite] and/or the [public
access option](/help/public-access-option) is enabled.
The directory will be organized by [organization type](/help/organization-type),
so it is highly recommended that you make sure the appropriate category is
selected.
To prevent spam, Zulip reserves the right to use editorial discretion. Giving
Zulip permission to promote your organization in the communities directory does
not guarantee that it will be listed.
If you administer a self-hosted Zulip community that you would like to be
listed, please contact [Zulip support](mailto:support@zulip.com).
[join-without-invite]: /help/restrict-account-creation#set-whether-invitations-are-required-to-join
[communities-directory-permission]: /help/communities-directory#give-permission-to-be-in-the-zulip-communities-directory
## Change whether your organization may be listed in the Zulip communities directory
{!admin-only.md!}
{!communities-directory-instructions.md!}
!!! tip ""
Organizations that are not open to the public will not be listed at this time.
If you administer a non-public organization, please check the box to request
to be listed in the future.
## Related topics
* [Create your organization profile](/help/create-your-organization-profile)
* [Public access option](/help/public-access-option)
* [Restrict account creation](/help/restrict-account-creation)
* [Moderating open organizations](/help/moderating-open-organizations)
* [Organization type](/help/organization-type)

View File

@ -12,6 +12,16 @@ registration/login page:
{!edit-organization-profile.md!}
## Zulip communities directory
{!communities-directory-intro.md!}
### Change whether your organization may be listed in the Zulip communities directory
{!communities-directory-instructions.md!}
For more details, see [Communities directory](/help/communities-directory).
## Add a wide logo
{!add-a-wide-logo.md!}
@ -21,4 +31,5 @@ registration/login page:
* [Setting up your organization](/help/getting-your-organization-started-with-zulip)
* [Customize organization settings](/help/customize-organization-settings)
* [Create streams](/help/create-streams)
* [Communities directory](/help/communities-directory)
* [Getting started with Zulip](/help/getting-started-with-zulip)

View File

@ -0,0 +1,13 @@
{start_tabs}
{settings_tab|organization-profile}
1. To be listed in the appropriate category, under **Organization type**, select
the option that best fits your organization.
1. Toggle **Advertise organization in the Zulip communities
directory**.
{!save-changes.md!}
{end_tabs}

View File

@ -0,0 +1,17 @@
!!! tip ""
Coming to the [Zulip website](https://zulip.com) summer 2022 —
[sign up][communities-directory-instructions] to be listed when it launches!
The Zulip communities directory offers publicly accessible [Zulip Cloud][zulip-cloud]
organizations an opportunity to be listed on the [Zulip website](https://zulip.com). It's a way
for open-source projects, research communities, and others to advertise their
Zulip community and support the Zulip project.
The directory will display your community's name, logo, and a link to you Zulip
chat. Other information from your [organization
profile](/help/create-your-organization-profile) and the size of your
organization may be included as well.
[zulip-cloud]: https://zulip.com/plans/
[communities-directory-instructions]: /help/communities-directory#change-whether-your-organization-may-be-listed-in-the-zulip-communities-directory

View File

@ -129,6 +129,7 @@
## Organization basics
* [Review your organization's settings](/help/review-your-organization-settings)
* [Organization type](/help/organization-type)
* [Communities directory](/help/communities-directory)
* [Import from Mattermost](/help/import-from-mattermost)
* [Import from Slack](/help/import-from-slack)
* [Import from Gitter](/help/import-from-gitter)

View File

@ -57,7 +57,15 @@ organization's policy choices.
{!web-public-streams-intro.md!}
## Zulip communities directory
{!communities-directory-intro.md!}
For details on how to get your community listed, see [Communities
directory](/help/communities-directory).
## Related articles
* [Setting up your organization](/help/getting-your-organization-started-with-zulip)
* [Public access option](/help/public-access-option)
* [Communities directory](/help/communities-directory)

View File

@ -22,3 +22,4 @@ your organization.
## Related articles
* [Configure default new user settings](/help/configure-default-new-user-settings)
* [Communities directory](/help/communities-directory)

View File

@ -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 = 128
API_FEATURE_LEVEL = 129
# 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

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2022-04-22 11:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0392_non_nullable_fields"),
]
operations = [
migrations.AddField(
model_name="realm",
name="want_advertise_in_communities_directory",
field=models.BooleanField(default=False),
),
]

View File

@ -293,6 +293,10 @@ class Realm(models.Model):
# setting also controls API access of web-public streams.
enable_spectator_access: bool = models.BooleanField(default=False)
# Whether organization has given permission to be advertised in the
# Zulip communities directory.
want_advertise_in_communities_directory: bool = models.BooleanField(default=False)
# Whether the organization has enabled inline image and URL previews.
inline_image_preview: bool = models.BooleanField(default=True)
inline_url_embed_preview: bool = models.BooleanField(default=False)
@ -711,6 +715,7 @@ class Realm(models.Model):
user_group_edit_policy=int,
video_chat_provider=int,
waiting_period_threshold=int,
want_advertise_in_communities_directory=bool,
wildcard_mention_policy=int,
)

View File

@ -4013,6 +4013,13 @@ paths:
for the purpose of settings that restrict access to new members.
[calc-full-member]: /api/roles-and-permissions#determining-if-a-user-is-a-full-member
want_advertise_in_communities_directory:
type: boolean
description: |
Whether the organization has given permission to be advertised in the
Zulip [communities directory](/help/communities-directory).
**Changes**: New in Zulip 6.0 (feature level 129).
wildcard_mention_policy:
type: integer
description: |
@ -11167,7 +11174,21 @@ paths:
**Changes**: New in Zulip 5.0 (feature level 109).
[server-settings]: https://zulip.readthedocs.io/en/stable/production/settings.html
realm_want_advertise_in_communities_directory:
type: boolean
description: |
Present if `realm` is present in `fetch_event_types`.
Whether the organization has given permission to be advertised in the
Zulip [communities directory](/help/communities-directory).
Useful only to clients supporting changing this setting for the
organization.
Giving permission via this setting does not guarantee that an
organization will be listed in the Zulip communities directory.
**Changes**: New in Zulip 6.0 (feature level 129).
realm_video_chat_provider:
type: integer
description: |

View File

@ -182,6 +182,7 @@ class HomeTest(ZulipTestCase):
"realm_users",
"realm_video_chat_provider",
"realm_waiting_period_threshold",
"realm_want_advertise_in_communities_directory",
"realm_wildcard_mention_policy",
"recent_private_conversations",
"request_language",

View File

@ -143,6 +143,9 @@ def update_realm(
),
org_type: Optional[int] = REQ(json_validator=check_int_in(ORG_TYPE_IDS), default=None),
enable_spectator_access: Optional[bool] = REQ(json_validator=check_bool, default=None),
want_advertise_in_communities_directory: Optional[bool] = REQ(
json_validator=check_bool, default=None
),
) -> HttpResponse:
realm = user_profile.realm