# Allow login to a read-only site

**URL:** <https://meta.discourse.org/t/allow-login-to-a-read-only-site/54270>\
**Category:** Feature\
**Tags:** read-only\
**Created:** [2016年十二月14日 22:30 UTC](https://meta.discourse.org/t/allow-login-to-a-read-only-site/54270 "2016-12-14T22:30:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)\
**Post date:** [2020年四月12日 13:57 UTC](https://meta.discourse.org/t/allow-login-to-a-read-only-site/54270/7 "2020-04-12T13:57:17Z")

</div>

阅读此主题的任何人，我在另一个类似主题中找到了一个解决方案 [这里](https://meta.discourse.org/t/shut-down-the-forum-turn-off-posting/89542/8?u=bathinda)。

如果我们被锁在外面，可以在 Rails 控制台中运行以下命令来禁用“只读”模式：

`Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)`

---

_[View the full topic](https://meta.discourse.org/t/allow-login-to-a-read-only-site/54270)._
