# 직원 로그에서 민감한 정보를 영구적으로 삭제할 수 있는 방법을 추가해 주세요

**URL:** https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546
**Category:** UX
**Tags:** completed, permanently-delete
**Created:** [11월 15, 2023, 1:53오후 UTC](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546 "2023-11-15T13:53:26Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [7월 23, 2024, 7:34오전 UTC](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546/5 "2024-07-23T07:34:54Z")

</div>

간단히 알려드립니다: 최근 커밋으로 Discourse가 영구 삭제된 민감한 로그 메시지를 자동으로 정리하도록 개선되었습니다.

> <https://github.com/discourse/discourse/pull/28033>
>
> 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.
> 
> \## Screenshots:
> 
> !\[image\](https://github.com/user-attachments/assets/6c3cb0d6-077b-42bd-adf5-b7e9a9054e21)
> 
> Related meta topic: https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546

그리고 `rails c`를 사용하여 로그를 다음과 같이 삭제할 수도 있습니다:

```ruby
UserHistory.where(post_id: xxx).destroy_all
# 또는 topic:
UserHistory.where(topic_id: xxx).destroy_all

```

---

_[View the full topic](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546)._
