Introducing permanently delete post functionality

When a post is deleted in Discourse, we perform a soft-delete. This means that post is still present in the database in case an administrator wants to recover it later. A soft-delete is not sufficient when the deleted post contains sensitive information and must be pruned from the database completely. For those situations, we are introducing the ability to permanently delete a post.

This feature was implemented under a hidden site setting because of how dangerous it can be, once a post is destroyed it cannot be recovered. As an additional protection mechanism, posts can be permanently deleted by the same administrator who deleted the post only after 5 minutes have passed OR by a different administrator immediately. If post cannot be deleted because none of the preconditions were met, it will show an error message:

If your site is hosted by us, contact us and we will enable it for you. If you host it yourself, to enable it you must enter the console (rails c) and change the site setting value:

SiteSetting.can_permanently_delete = true
71 Likes

A post was split to a new topic: Introduce a way to also permanently delete the sensitive info from the staff logs

14 posts were split to a new topic: Where is the option to permanently delete?

A small update on the functionality of this feature…

You can now also permanently delete post revisions when this setting is enabled. :partying_face:

This can be done from the Revision History by first hiding the revision, and then the option to ‘Delete revisions’ appears:

13 Likes