# 为未列出的话题设置无法公开访问的选项

**URL:** <https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862>\
**Category:** Feature\
**Tags:** unlisting\
**Created:** [2023年九月5日 13:53 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862 "2023-09-05T13:53:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)\
**Post date:** [2023年九月5日 13:53 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/1 "2023-09-05T13:53:35Z")

</div>

继续讨论 [暂时移除用户主题的公开访问的最佳方法？](https://meta.discourse.org/t/best-way-to-temporarily-remove-public-access-to-a-users-topics/277242)：

大家好，在阅读了 [Understanding closed, unlisted, and archived topics](https://meta.discourse.org/t/the-difference-between-closed-unlisted-and-archived-topics/51238) 后，似乎对于以后可能需要恢复为普通主题的未列出主题，仍然存在功能上的不足，但 _目前它们 **不应该** 对公众完全可访问_（无论是来自参与用户点击旧通知电子邮件中的链接，还是尚未更新的搜索引擎结果）。添加一个站点设置选项以防止公开访问未列出主题似乎是个好主意，即当除站点管理员以外的任何人访问 URL 时，都返回 404 错误。

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2023年九月5日 14:03 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/2 "2023-09-05T14:03:56Z")

</div>

也许您真正想要的是该功能，而不是变通方法，但变通方法是将其移至私有类别。

---

<div class="post-metadata">

**Author:** ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)\
**Post date:** [2023年九月5日 14:25 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/3 "2023-09-05T14:25:20Z")

</div>

嗨 Jay，不幸的是，对于成百上千的主题来说，这并不可行，因为它需要手动或以编程方式将它们恢复到之前的修订版本，才能将它们放回正确的类别。

---

<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:** [2023年九月5日 17:37 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/4 "2023-09-05T17:37:24Z")

</div>

2 篇帖子已合并到现有主题：[暂时移除用户主题公开访问的最佳方法？](https://meta.discourse.org/t/best-way-to-temporarily-remove-public-access-to-a-users-topics/277242/27)

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2023年九月7日 14:02 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/5 "2023-09-07T14:02:08Z")

</div>

已删除的主题无法访问，工作人员可以将其恢复。

---

<div class="post-metadata">

**Author:** ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)\
**Post date:** [2023年九月7日 16:21 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/6 "2023-09-07T16:21:49Z")

</div>

嗨 Jay，是的，但困难在于没有批量取消删除：

> [@Bulk un-deletion](https://meta.discourse.org/t/bulk-un-deletion/277861):
>
> Continuing the discussion from [Best way to temporarily remove public access to a user's topics?](https://meta.discourse.org/t/best-way-to-temporarily-remove-public-access-to-a-users-topics/277242): Would it be possible to enable a bulk un-delete selector in the /u/username/deleted-posts list? From what I can tell it would require a technically [very challenging and potentially dangerous](https://meta.discourse.org/t/best-way-to-temporarily-remove-public-access-to-a-users-topics/277242/23) SQL/rails script to undelete them programatically. For this feature to be most useful it would be best to differentiate between deleted topics and deleted replies. Maybe the existing /u/username/deleted-posts …

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2023年九月7日 23:59 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/7 "2023-09-07T23:59:14Z")

</div>

您删除/隐藏数百个帖子，然后又想恢复它们的用例是什么？

如果您是自托管的，应该可以从 Rails 进行批量删除。

---

<div class="post-metadata">

**Author:** ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)\
**Post date:** [2023年九月8日 00:51 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/8 "2023-09-08T00:51:19Z")

</div>

我有一位长期用户，由于个人原因，要求暂时删除他所有的帖子（约 300 篇）。如果他们的情况发生变化，将来可能需要恢复这些帖子。当帖子处于删除状态时，即使有人拥有网址，帖子也不应公开访问，并且它们目前都已被搜索引擎索引。因此，我发现唯一可以批量使其无法公开访问的方法是删除它们。（我选择不将它们移至私有类别，因为将来以编程方式/批量方式将每个帖子恢复到其先前类别似乎更加艰巨，而且似乎比批量修订恢复功能更有用，因此在此主题中询问设置选项以及/或 [Bulk un-deletion](https://meta.discourse.org/t/bulk-un-deletion/277861) 更有用。）

> [@pfaffman](#):
>
> 如果您是自托管用户，应该可以通过 Rails 进行批量删除。

有意思。您对此有何看法？

> [@Best way to temporarily remove public access to a user's topics?](https://meta.discourse.org/t/best-way-to-temporarily-remove-public-access-to-a-users-topics/277242/23?u=rahim123):
>
> You can’t, at least not easily. Here’s why: You would need the following info: the user id the date in UTC the bulk deletion happened the post ID of each deleted topic’s OP advanced knowledge of using the rails console and/or psql directly to run a very advanced SQL query as you need to clear the deleted\_at field on both the topic itself and the post that is the OP of the topic. And please don’t ask why I know this…

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2023年九月8日 01:48 UTC](https://meta.discourse.org/t/setting-option-to-make-unlisted-topics-inaccesible-to-public/277862/9 "2023-09-08T01:48:40Z")

</div>

你无法及时获得一个功能。

通过在 Rails 中进行编辑，然后稍后撤销这些编辑，将它们全部批量移动到私有类别应该不难。

我一时不知道该怎么做。
