# 如何重新计算所有 trust\_levels？

**URL:** <https://meta.discourse.org/t/how-to-recalculate-all-trust-levels/370602>\
**Category:** Support\
**Created:** [2025年六月18日 01:12 UTC](https://meta.discourse.org/t/how-to-recalculate-all-trust-levels/370602 "2025-06-18T01:12:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [2025年六月25日 18:50 UTC](https://meta.discourse.org/t/how-to-recalculate-all-trust-levels/370602/4 "2025-06-25T18:50:35Z")

</div>

起初我有点当局者迷，但这正是我想要的：

> [@Discourse](#):
>
> ## 确保所有用户都处于其自动信任级别
> 
> * * *
> 
> 假设您将新用户或受邀用户的默认信任级别设置为一个不符合您预期（例如 TL4）的值。现在您想更改它，以便用户处于根据 [理解 Discourse 信任级别](https://blog.discourse.org/2018/06/understanding-discourse-trust-levels/) 自动获得的信任级别。以下命令将确保所有用户都处于他们应有的信任级别。 **注意** ：锁定信任级别的用户不会受到影响。
> 
> 确保所有用户都设置为正确的信任级别：
> 
> ```plaintext
> rails c
> User.all.find_each do |user|
> Promotion.recalculate(user)
> end
> 
> ```
> 
> 刷新组统计信息以反映更改：
> 
> ```plaintext
> Group.ensure_consistency!
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/how-to-recalculate-all-trust-levels/370602)._
