streams: Add can_resolve_topics_group setting.

Fixes #19955.
This commit is contained in:
opmkumar
2025-07-09 00:11:05 +05:30
committed by Tim Abbott
parent 05b6672777
commit 8786b12f0c
28 changed files with 562 additions and 13 deletions

View File

@@ -157,6 +157,9 @@ class Stream(models.Model):
UserGroup, on_delete=models.RESTRICT, related_name="+"
)
can_subscribe_group = models.ForeignKey(UserGroup, on_delete=models.RESTRICT, related_name="+")
can_resolve_topics_group = models.ForeignKey(
UserGroup, on_delete=models.RESTRICT, related_name="+"
)
# The very first message ID in the stream. Used to help clients
# determine whether they might need to display "show all topics" for a
@@ -206,6 +209,11 @@ class Stream(models.Model):
allow_everyone_group=False,
default_group_name=SystemGroups.NOBODY,
),
"can_resolve_topics_group": GroupPermissionSetting(
allow_nobody_group=True,
allow_everyone_group=True,
default_group_name=SystemGroups.NOBODY,
),
}
stream_permission_group_settings_requiring_content_access = [
@@ -272,6 +280,7 @@ class Stream(models.Model):
"can_send_message_group_id",
"can_remove_subscribers_group_id",
"can_subscribe_group_id",
"can_resolve_topics_group_id",
"is_recently_active",
"topics_policy",
]