Commit Graph

9 Commits

Author SHA1 Message Date
Vector73
a02614204a settings: Add can_set_delete_message_policy_group setting.
Adds new organization setting `can_set_delete_message_policy_group`
for defining who can set per-channel message delete permissions.

Fixes #34214.
2025-07-17 15:44:53 -07:00
Sahil Batra
70d18d7528 tests: Move test for permission to update topics_policy.
This commit updates tests for permission to update topics_policy
of a channel to test_channel_permissions.py.
2025-07-15 15:54:30 -07:00
Sahil Batra
7e6d487916 tests: Improve tests for checking permissions to update channel privacy.
This commit updates check_channel_privacy_update to use
do_change_stream_permission for setting the stream privacy
to its old state so that we do that in a reliable way and
can avoid bugs in future.
2025-07-15 15:54:30 -07:00
Sahil Batra
2126f365c0 tests: Refactor test for checking permission to update channel.
This commit updates how we check permission for updating
properties of an unsubscribed private channel.

There is no need of checking all can_administer_channel_group
values for unsubscribed private channel, when we check them
for a subscribed private channel. It is sufficient to check
one case where an unsubscribed user can update private channel
if they belong to can_administer_channel_group.

This also helps in avoiding repeated calls to subscribed_to_stream
which made a DB query that could make the test slow.
2025-07-15 15:54:30 -07:00
Sahil Batra
534fdc2ac1 test_channel_permissions: Use one parameter for error cases.
This commit updates check_channel_property_update to just
accept error_msg parameter instead of having both allow_fail
and error_msg, as error_msg is sufficient to determine
whether the request is expected to fail or not.
2025-07-15 15:54:30 -07:00
Sahil Batra
e06c181a95 tests: Move test to check permission to deactivate streams.
This commit moves test to check permission to deactivate
streams to test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
Sahil Batra
3f8518f9d1 tests: Move channel administering permission tests.
This commit moves tests to check permission for administering
streams as per can_administer_channel_group setting to
test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
Sahil Batra
79c2972232 tests: Move test to check permission to update message retention setting.
This commit moves test to check permission to update message retention
setting of a stream to test_channel_permissions.py.
2025-06-11 15:41:50 -07:00
Sahil Batra
bf7f567009 tests: Move stream permission tests to test_channel_permissions. 2025-05-28 17:02:41 -07:00