mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
stream: Add do_change_can_remove_subscribers_group and field to objects.
This commit adds do_change_can_remove_subscriber_group function for changing can_remove_subscribers_group field of a stream. We also add can_remove_subscribers_group_id field to stream and subscription objects. This function will be helpful for writing tests in next commit. We would add API and UI support to change this setting in further commits.
This commit is contained in:
@@ -2552,6 +2552,7 @@ class Stream(models.Model):
|
||||
"name",
|
||||
"rendered_description",
|
||||
"stream_post_policy",
|
||||
"can_remove_subscribers_group_id",
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
@@ -2561,6 +2562,7 @@ class Stream(models.Model):
|
||||
|
||||
def to_dict(self) -> APIStreamDict:
|
||||
return APIStreamDict(
|
||||
can_remove_subscribers_group_id=self.can_remove_subscribers_group_id,
|
||||
date_created=datetime_to_timestamp(self.date_created),
|
||||
description=self.description,
|
||||
first_message_id=self.first_message_id,
|
||||
@@ -4364,6 +4366,7 @@ class AbstractRealmAuditLog(models.Model):
|
||||
STREAM_REACTIVATED = 604
|
||||
STREAM_MESSAGE_RETENTION_DAYS_CHANGED = 605
|
||||
STREAM_PROPERTY_CHANGED = 607
|
||||
STREAM_CAN_REMOVE_SUBSCRIBERS_GROUP_CHANGED = 608
|
||||
|
||||
# The following values are only for RemoteZulipServerAuditLog
|
||||
# Values should be exactly 10000 greater than the corresponding
|
||||
|
||||
Reference in New Issue
Block a user