user_groups: Add add_can_members_group to user group.

The default value for this field that we wanted to have was that group
itlself. But we are deferring that to later in order to reach the point
of switching over to the groups system sooner. Till then, we will use
`group_creator` as the default. See
https://chat.zulip.org/#narrow/stream/101-design/topic/Group.20add.20members.20dropdown/near/1952904
for more details.

For migration plan details, see
https://chat.zulip.org/#narrow/stream/101-design/topic/Group.20add.20members.20dropdown/near/1952902

The increase in query count from 7 to 9 in the query count test for
creating a user group is because of group_creator being the default for
the new field.
This commit is contained in:
Shubham Padia
2024-10-07 17:00:15 +00:00
committed by Tim Abbott
parent 553409c1ca
commit b305ca14dd
15 changed files with 334 additions and 7 deletions

View File

@@ -1848,6 +1848,7 @@ group_type = DictType(
("direct_subgroup_ids", ListType(int)),
("description", str),
("is_system_group", bool),
("can_add_members_group", group_setting_type),
("can_join_group", group_setting_type),
("can_manage_group", group_setting_type),
("can_mention_group", group_setting_type),
@@ -1898,6 +1899,7 @@ user_group_data_type = DictType(
optional_keys=[
("name", str),
("description", str),
("can_add_members_group", group_setting_type),
("can_join_group", group_setting_type),
("can_manage_group", group_setting_type),
("can_mention_group", group_setting_type),