FEATURE: Clean up previously logged information after permanently deleting posts (#28033)

* FEATURE: Clean up previously logged information after permanently deleting posts

When soft deleteing a topic or post, we will log some details in the
staff log, including the raw content of the post. Before this commit, we
will not clear the information in these records. Therefore, after
permanently deleting the post, `UserHistory` still retains copy of the
permanently deleted post. This is an unexpected behaviour and may raise
some potential legal issues.

This commit adds a behavior that when a post is permanently deleted, the
details column of the `UserHistory` associated with the post will be
overwritten to "(permanently deleted)". At the same time, for permanent
deletion, a new `action_id` is introduced to distinguish it from soft
deletion.

Related meta topic: https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546
This commit is contained in:
锦心
2024-07-23 15:27:11 +08:00
committed by GitHub
parent 129eb4ba59
commit a749387c80
7 changed files with 99 additions and 19 deletions

View File

@@ -6250,6 +6250,8 @@ en:
topic_slow_mode_removed: "remove topic slow mode"
custom_emoji_create: "create custom emoji"
custom_emoji_destroy: "delete custom emoji"
delete_post_permanently: "permanently delete post"
delete_topic_permanently: "permanently delete topic"
screened_emails:
title: "Screened Emails"
description: "When someone tries to create a new account, the following email addresses will be checked and the registration will be blocked, or some other action performed."