# TL0グループが見えないユーザーは公開イベントを作成できません

**URL:** <https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946>\
**Category:** Bug\
**Tags:** events\
**Created:** [2023 年 9 月 24 日午後 10:25 UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946 "2023-09-24T22:25:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [2023 年 9 月 24 日午後 11:30 UTC](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946/2 "2023-09-24T23:30:07Z")

</div>

> [@davidkingham](#):
>
> 「エラーが発生しました：許可されたグループが無効です。」というエラーが表示され、イベント内の許可されたグループはデフォルトの `trust_level_0` です。

問題は、あなたのサイトの `trust_level_0` グループが、ユーザーがそのメンバーであっても、ユーザーから「見えない」ことにあると思います。それを確認するために、サイトの `trust_level_0` グループ管理ページの「インタラクション」タブを確認してもらえますか？

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/8/3/18380d724d1cb9ce2d92a4e4f05e49794b3dfa79.png)

「このグループを誰が見ることができますか？」の設定値は、「グループオーナーとモデレーター」または「グループオーナー」のいずれかであると推測します。プラグインのコードは、`trust_level_0` グループが常に「全員」が見ることができるように設定されていることを前提としていると思われます。

もしこれが正しい場合、グループの可視性設定をデフォルト値の「全員」に戻すことで、現時点での問題を修正できます。

これはプラグインのバグと見なされる可能性があります。公開イベントが作成されると、イベントを作成するために使用されるコードは次のようになります。

```plaintext
[event start="2023-10-05 16:00" status="public" timezone="America/Vancouver" end="2023-10-05 17:00" allowedGroups="trust_level_0"]
[/event]

```

公開イベントの場合、`allowedGroups` の値は自動的に `trust_level_0` に設定されることに注意してください。ユーザーはTL0グループのメンバーであっても、それを「見ることが」できない場合があります。この場合、これらのユーザーは公開イベントを作成できません。

参考までに、関連するコードは次のとおりです。[discourse-calendar/lib/discourse\_post\_event/event\_validator.rb at main · discourse/discourse-calendar · GitHub](https://github.com/discourse/discourse-calendar/blob/main/lib/discourse_post_event/event_validator.rb#L149-L154)

---

_[View the full topic](https://meta.discourse.org/t/public-events-cant-be-created-by-users-who-cant-see-tl0-group/279946)._
