zulip/zerver
Sahil Batra 1d026d9b2b streams: Make sure an anonymous group is used for only one setting.
When creating multiple streams using "POST /users/me/subscriptions"
endpoint, same anonymous group was being used for settings of all
the streams, like if can_subscribe_group was being set to an
anonymous group, all streams created using that endpoint would
use the same anonymous group for can_subscribe_group setting.

Using the same anonymous groups for multiple streams caused
unintended behavior  -

- Changing a setting for one stream also changed it for all
other streams sharing the the same anonymous group, because
eventually the members and subgroups of the group were updated.

- Changing the setting to a named user group failed because
`do_change_stream_permission_group` attempts to delete the
anonymous group during the update. However, deletion of
anonymous group is restricted if they are still referenced
by setting fields.

This commit fixes this so that one anonymous group is used
only for one setting for a single stream.
2025-11-04 11:51:31 -08:00
..
actions users: Send peer_remove for archived streams as well on deactivation. 2025-11-04 11:14:59 -08:00
data_import rocketchat: Emoji can have an ObjectID as an _id. 2025-11-03 13:55:47 -08:00
lib streams: Make sure an anonymous group is used for only one setting. 2025-11-04 11:51:31 -08:00
management custom_emails: Prevent duplicate emails from send_custom_email command. 2025-11-02 11:17:09 -08:00
migrations push_notifications: Clear push notifications on message deletion. 2025-10-31 16:05:21 -07:00
models custom_emails: Prevent duplicate emails from send_custom_email command. 2025-11-02 11:17:09 -08:00
openapi users: Send peer_remove for archived streams as well on deactivation. 2025-11-04 11:14:59 -08:00
tests streams: Make sure an anonymous group is used for only one setting. 2025-11-04 11:51:31 -08:00
tornado event_queue: Add compatibility code for push_device_registered_user_ids. 2025-09-19 09:19:36 -07:00
transaction_tests test_user_groups: Add durable=True to the independent transaction. 2024-11-21 14:55:15 -08:00
views streams: Make sure an anonymous group is used for only one setting. 2025-11-04 11:51:31 -08:00
webhooks slack_integration: Avoid showing sender username. 2025-11-03 16:42:07 -08:00
worker thumbnail: Avoid BytesIO.getbuffer. 2025-08-13 14:11:05 -07:00
__init__.py
apps.py forms: Use monkey-patched SetPasswordForm generic. 2025-07-15 07:32:44 -07:00
context_processors.py realm_creation_form: Capture import_from if realm import enabled. 2025-04-30 00:06:43 -07:00
decorator.py zephyr: Remove Zephyr mirroring support. 2025-09-16 11:18:18 -07:00
filters.py filters: Do not report AVATAR_SALT, or other salts. 2025-03-13 09:36:07 -07:00
forms.py new_registration: Move human verification from popup to inline style. 2025-11-03 12:19:57 -08:00
logging_handlers.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
middleware.py zephyr: Remove Zephyr mirroring support. 2025-09-16 11:18:18 -07:00
signals.py signals: Extract function to convert datetime to readable string. 2025-10-01 11:25:00 -07:00