user_groups: Add can_mention_group setting.

This commit adds a new can_mention_group setting which will be
used to determine who can mention a particular group.

Fixes a part of #25927.
This commit is contained in:
Sahil Batra
2023-06-12 16:57:47 +05:30
committed by Tim Abbott
parent 9265954fd2
commit 2763f9b575
11 changed files with 170 additions and 3 deletions

View File

@@ -263,7 +263,9 @@ def create_user_group_data() -> Dict[str, object]:
["/user_groups/{user_group_id}:patch", "/user_groups/{user_group_id}:delete"]
)
def get_temp_user_group_id() -> Dict[str, object]:
user_group, _ = UserGroup.objects.get_or_create(name="temp", realm=get_realm("zulip"))
user_group, _ = UserGroup.objects.get_or_create(
name="temp", realm=get_realm("zulip"), can_mention_group_id=11
)
return {
"user_group_id": user_group.id,
}