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
68 Likes

5 posts were split to a new topic: How to I enable Permanently Delete when using a hosted service?

It seems that the design of this feature was to remove the post data from the database completely. However, we find that the data is still in the database via the /admin/logs/staff_action_logs

We were trying to remove the post from the database completely to comply with local regulations. Is there a way to remove the post data from the staff_action_logs?

4 Likes