# 是否有简单的方法将 Discourse 实例临时设置为只读模式？

**URL:** <https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380>\
**Category:** Support\
**Tags:** read-only\
**Created:** [2019年十二月18日 06:52 UTC](https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380 "2019-12-18T06:52:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**Post date:** [2019年十二月18日 06:52 UTC](https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380/1 "2019-12-18T06:52:30Z")

</div>

是否有简单的方法可以将 Discourse 实例临时设置为只读模式，而无需更改所有分类？

我们希望让版主团队度过圣诞节和新年假期，因此我们正在寻找一种方法，将实例设置为只读模式，而无需更改每个分类的权限。这样，用户仍然可以阅读文档，但无法创建新主题或发布新回复。在此期间无需版主介入，因为很可能也不会有人标记帖子。

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [2019年十二月18日 07:11 UTC](https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380/2 "2019-12-18T07:11:45Z")

</div>

当然，您可以从 `discourse.example.com/admin/backups` 启用或禁用只读模式。

 ![Screen Shot 2019-12-18 at 12.38.07](https://global.discourse-cdn.com/meta/original/3X/0/4/04131452e12e03cb530bc3664a66319d4057eae4.png)

---

<div class="post-metadata">

**Author:** ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**Post date:** [2019年十二月18日 18:34 UTC](https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380/3 "2019-12-18T18:34:36Z")

</div>

顺便提一下，我们刚刚测试时发现了一个在只读模式下的 bug。  
你可以开始创建帖子或主题，但无法保存，此时会显示“网站处于只读模式”的提示，这没问题。  
但你也无法取消该操作。😉  
因此提示信息会一直保留，直到网站恢复在线后，你才能取消该帖子。  
如果能在只读模式下也能取消该提示，那就太好了。

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2023年十一月7日 11:30 UTC](https://meta.discourse.org/t/is-there-an-easy-way-to-set-a-discouse-instance-temporarly-in-read-only-mode/136380/5 "2023-11-07T11:30:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
