# "Everyone" in template\_groups\_allowed\_private\_templates disables it

**URL:** https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943
**Category:** Bug
**Tags:** templates
**Created:** [April 22, 2025, 10:03am 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:** 5
**Page:** 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: [April 22, 2025, 10:03am UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/1 "2025-04-22T10:03:18Z")

</div>

When “Everyone” is added to `discourse_templates_groups_allowed_private_templates`, the functionality breaks for everyone except staff.

So “Everyone, trust\_level\_0” does not work, while “trust\_level\_0” does work.

Culprit:

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

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

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 22, 2025, 10:29am UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/2 "2025-04-22T10:29:42Z")

</div>

I think the problem with ‘everyone’ and #templates has already been reported in ["everyone" group unable to see private templates](https://meta.discourse.org/t/everyone-group-unable-to-see-private-templates/277514)

---

<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: [April 22, 2025, 10:42am UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/3 "2025-04-22T10:42:14Z")

</div>

Yes, I see it now, thanks.  
I misread that bug, I thought that simply “everyone” did not work, I did not realize it broke it for all other added groups as well.

Reported 1.5 years ago 😭

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [April 23, 2025, 8:04am UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/6 "2025-04-23T08:04:52Z")

</div>

Thank you for reporting this bug. It was fixed in this PR:

[https://github.com/discourse/discourse-templates/pull/103](https://github.com/discourse/discourse-templates/pull/103)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 22, 2025, 1:07am UTC](https://meta.discourse.org/t/everyone-in-template-groups-allowed-private-templates-disables-it/362943/9 "2025-05-22T01:07:10Z")

</div>


