mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
register: Rename stream_creator_or_nobody
to channel_creator
.
This commit renames `stream_creator_or_nobody` value for `default_group_name` field in `server_supported_permission_settings` object to `channel_creator`.
This commit is contained in:
@@ -20,6 +20,12 @@ format used by the Zulip server that they are interacting with.
|
||||
|
||||
## Changes in Zulip 12.0
|
||||
|
||||
**Feature level 427**
|
||||
|
||||
* [`POST /register`](/api/register-queue): `stream_creator_or_nobody`
|
||||
value for `default_group_name` field in `server_supported_permission_settings`
|
||||
object is renamed to `channel_creator`.
|
||||
|
||||
**Feature level 426**
|
||||
|
||||
* [`POST /register`](/api/register-queue): Removed the
|
||||
|
@@ -34,7 +34,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"
|
||||
# new level means in api_docs/changelog.md, as well as "**Changes**"
|
||||
# entries in the endpoint's documentation in `zulip.yaml`.
|
||||
|
||||
API_FEATURE_LEVEL = 426
|
||||
API_FEATURE_LEVEL = 427
|
||||
|
||||
# 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
|
||||
|
@@ -1829,7 +1829,7 @@ export function create_stream_group_setting_widget({
|
||||
setting_name,
|
||||
"stream",
|
||||
)!.default_group_name;
|
||||
if (default_group_name === "stream_creator_or_nobody") {
|
||||
if (default_group_name === "channel_creator") {
|
||||
set_group_setting_widget_value(pill_widget, {
|
||||
direct_members: [current_user.user_id],
|
||||
direct_subgroups: [],
|
||||
|
@@ -15,7 +15,7 @@ exports.server_supported_permission_settings = {
|
||||
allow_internet_group: false,
|
||||
allow_nobody_group: true,
|
||||
allow_everyone_group: false,
|
||||
default_group_name: "stream_creator_or_nobody",
|
||||
default_group_name: "channel_creator",
|
||||
allowed_system_groups: [],
|
||||
},
|
||||
can_remove_subscribers_group: {
|
||||
|
@@ -234,7 +234,7 @@ def get_stream_permission_default_group(
|
||||
creator: UserProfile | None = None,
|
||||
) -> UserGroup:
|
||||
setting_default_name = Stream.stream_permission_group_settings[setting_name].default_group_name
|
||||
if setting_default_name == "stream_creator_or_nobody":
|
||||
if setting_default_name == "channel_creator":
|
||||
if creator:
|
||||
default_group = UserGroup(
|
||||
realm=creator.realm,
|
||||
|
@@ -171,7 +171,7 @@ class Stream(models.Model):
|
||||
"can_administer_channel_group": GroupPermissionSetting(
|
||||
allow_nobody_group=True,
|
||||
allow_everyone_group=False,
|
||||
default_group_name="stream_creator_or_nobody",
|
||||
default_group_name="channel_creator",
|
||||
),
|
||||
"can_delete_any_message_group": GroupPermissionSetting(
|
||||
allow_nobody_group=True,
|
||||
|
@@ -27977,7 +27977,7 @@ components:
|
||||
description: |
|
||||
Name of the default system group for the setting.
|
||||
|
||||
For some channel settings, this can also be `stream_creator_or_nobody`.
|
||||
For some channel settings, this can also be `channel_creator`.
|
||||
In that case:
|
||||
|
||||
- If the channel's [`creator_id`][channel-response] is not `null`, default for the
|
||||
@@ -27986,6 +27986,9 @@ components:
|
||||
- If the channel's [`creator_id`][channel-response] is `null`, default for the setting
|
||||
is `role:nobody` system group.
|
||||
|
||||
**Changes**: In Zulip 12.0 (feature level 427), renamed
|
||||
`stream_creator_or_nobody` value to `channel_creator`.
|
||||
|
||||
[channel-response]: /api/get-stream-by-id#response
|
||||
default_for_system_groups:
|
||||
type: string
|
||||
|
@@ -706,7 +706,7 @@ class TestCreateStreams(ZulipTestCase):
|
||||
result = self.subscribe_via_post(user, subscriptions, subdomain="zulip")
|
||||
self.assert_json_success(result)
|
||||
stream = get_stream("new_stream", realm)
|
||||
if permission_config.default_group_name == "stream_creator_or_nobody":
|
||||
if permission_config.default_group_name == "channel_creator":
|
||||
self.assertEqual(list(getattr(stream, setting_name).direct_members.all()), [user])
|
||||
self.assertEqual(
|
||||
list(getattr(stream, setting_name).direct_subgroups.all()),
|
||||
|
@@ -694,7 +694,7 @@ def access_requested_group_permissions(
|
||||
group_settings_map[setting_name] = get_stream_permission_default_group(
|
||||
setting_name, system_groups_name_dict, creator=user_profile
|
||||
)
|
||||
if permission_configuration.default_group_name == "stream_creator_or_nobody":
|
||||
if permission_configuration.default_group_name == "channel_creator":
|
||||
# Default for some settings like "can_administer_channel_group"
|
||||
# is anonymous group with stream creator.
|
||||
anonymous_group_membership[group_settings_map[setting_name].id] = (
|
||||
|
Reference in New Issue
Block a user