# 模板组允许私人模板中的“Everyone”会禁用它

**URL:** <https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943>\
**Category:** Bug\
**Tags:** templates\
**Created:** [2025年四月22日 10:03 UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943 "2025-04-22T10:03:18Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2025年四月22日 10:03 UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/1 "2025-04-22T10:03:18Z")

</div>

当“Everyone”被添加到 `discourse_templates_groups_allowed_private_templates` 时，除了管理员之外，所有人的功能都会中断。

所以“Everyone, trust\_level\_0”不起作用，而“trust\_level\_0”起作用。

罪魁祸首：

> <https://github.com/discourse/discourse-templates/blob/f724a7b31e454446065567a256b95f1c4c99cd49/lib/discourse_templates/user_extension.rb#L24-L39>

😱 😱 `return false if group_id == 0` 😱 😱

---

_[View the full topic](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943)._
