settings: Use can_add_subscribers_group instead of realm policy.

We are using `can_add_subscribers_group` instead of
`invite_to_stream_policy` to check whether a user can subscribe other
users.
We've removed `invite_to_stream_policy` from the frontend wherever
applicable.
This commit is contained in:
Shubham Padia
2025-01-13 20:03:37 +00:00
committed by Tim Abbott
parent 34ade0d9a2
commit 3bf87228a2
14 changed files with 70 additions and 211 deletions

View File

@@ -685,11 +685,8 @@ test_ui("warn_if_mentioning_unsubscribed_user", ({override, mock_template}) => {
const $textarea = $("<textarea>").attr("id", "compose-textarea");
stub_message_row($textarea);
compose_state.set_stream_id("");
override(
realm,
"realm_invite_to_stream_policy",
settings_config.common_policy_values.by_members.code,
);
override(realm, "realm_can_add_subscribers_group", everyone.id);
let mentioned_details = {
user: {