# TL0がmessageable\_level=everyoneでグループにメッセージを送信できない recession

**URL:** https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205
**Category:** Bug
**Created:** [2022 年 12 月 17 日午前 3:30 UTC](https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205 "2022-12-17T03:30:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arthri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arthri/32/211355_2.png) [@Arthri](https://meta.discourse.org/u/Arthri)
#### Post date: [2022 年 12 月 17 日午前 3:30 UTC](https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205/1 "2022-12-17T03:30:31Z")

</div>

TL0 は、「このグループにメッセージを送信できるユーザーは誰ですか？」が「全員」に設定されているグループにメッセージを送信できましたが、これは次の機能によるものです。

> [@Allow TL0 to write messages to staff group, not to other members or non staff?](https://meta.discourse.org/t/124335):
>
> Is there any way to allow TL0 members to start messages to a specific discourse group, but not to other regular members or non staff members? I am currently not finding a way to make this work. When TL0 members write to our helpdeskteam group for help, they get an off putting and confusing error message - see below. [18%20PM] The TL0 user is writing to a group with “who can message this member” set to “everyone”. If I make the user TL1 the message is saved with no error. Everyone in the group…

しかし、これは過去1か月ほどのアップデート（フォーラムのバージョンは 2.9.0.beta14 です）により、もはや不可能になりました。この PR が後退の原因になったと思われます。

> <https://github.com/discourse/discourse/pull/18812>
>
> Since the system user is a regular user, it can have its \`allow\_private\_messages…\` user option turned off, which with our current \`can\_send\_private\_message?(Discourse.system\_user)\` check inside the CurrentUserSerializer, will prevent any user from sending messages in the UI if the system user is not accepting PMs.
> 
> This commit adds a new \`can\_send\_private\_messages?\` method to the Guardian, which can be used in serializers and not depend on the system user. When the user actually sends a message we still rely on the old \`can\_send\_private\_message?(target)\` call to see if they are allowed to send the message to the target. The new method is just to say they can "generally" send private messages.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [2022 年 12 月 20 日午前 3:11 UTC](https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205/3 "2022-12-20T03:11:30Z")

</div>

レポートありがとうございます、@Arthri さん。こちらで修正しました。

> <https://github.com/discourse/discourse/pull/19525>
>
> The commits https://github.com/discourse/discourse/commit/e62e93f83a77adfa80b38f…bfecf82bbee14e12fe and
> https://github.com/discourse/discourse/commit/d6bd4ad7ee1d3bf43ba0a2bb1948f8f306b6177a caused a regression
> to the behaviour added for
> https://meta.discourse.org/t/allow-tl0-to-write-messages-to-staff-group-not-to-other-members-or-non-staff/124335,
> which allowed a user to message a group with the messageable\_level
> set to Everyone even if they were TL0 (or otherwise did not reach
> the appropriate trust level). This commit fixes the issue and adjusts
> the spec to reflect the real scenario.
> 
> c.f. https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2022 年 12 月 24 日午前 8:00 UTC](https://meta.discourse.org/t/tl0-cant-message-groups-with-messageable-level-everyone-recession/249205/4 "2022-12-24T08:00:00Z")

</div>

このトピックは25時間後に自動的に閉じられました。返信はもうできません。
