mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
message_send: Fix old guests being treated as full members.
For streams in which only full members are allowed to post, we block guest users from posting there. Guests users were blocked from posting to admin only streams already. So now, guest users can only post to STREAM_POST_POLICY_EVERYONE streams. This is not a new feature but a bugfix which should have happened when implementing full member stream policy / guest users.
This commit is contained in:
@@ -544,6 +544,11 @@ function validate_stream_message_post_policy(sub) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (page_params.is_guest && stream_post_policy !== stream_post_permission_type.everyone.code) {
|
||||
compose_error(i18n.t("Guests are not allowed to post to this stream."));
|
||||
return false;
|
||||
}
|
||||
|
||||
const person = people.get_by_user_id(page_params.user_id);
|
||||
const current_datetime = new Date(Date.now());
|
||||
const person_date_joined = new Date(person.date_joined);
|
||||
|
||||
Reference in New Issue
Block a user