# 특정 사용자 필드의 업데이트를 방지하는 방법

**URL:** <https://meta.discourse.org/t/how-to-prevent-the-updating-of-specific-user-fields/353627>\
**Category:** Development\
**Created:** [2월 21, 2025, 3:31오후 UTC](https://meta.discourse.org/t/how-to-prevent-the-updating-of-specific-user-fields/353627 "2025-02-21T15:31:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [2월 21, 2025, 9:13오후 UTC](https://meta.discourse.org/t/how-to-prevent-the-updating-of-specific-user-fields/353627/3 "2025-02-21T21:13:08Z")

</div>

> [@IJK\_Rick](#):
>
> aforementioned 방법들을 사용하여 아무도 이 필드들(예: 웹사이트나 위치)을 업데이트하지 못하도록 어떻게 보장할 수 있을까요?

이 값들의 표시를 숨기는 중이라면, 사용자가 그 값들을 채워 넣는 것이 무슨 문제가 되나요? 위치를 추가하려면 한 사용자가 일부러 조작을 해야 하고, 또 다른 사용자가 그 사용자의 프로필을 일부러 방문하여 입력된 내용을 확인해야 하기 때문입니다.

Discourse 포크를 통해 모델에서 해당 필드들을 제거하는 것 외에는, Rails 콘솔에 접근 권한이 있는 사용자가 그 필드에 데이터를 입력하는 것을 막을 방법은 거의 없습니다.

주기적으로 실행되어 원하는 필드들을 nil로 설정하는 플러그인을 작성할 수 있습니다. 또는 사용자 프로필이 업데이트될 때 호출되는 훅을 만들어 해당 필드들을 nil로 설정할 수도 있습니다. 예시로, [GitHub - discourse/all-the-plugins · GitHub](https://github.com/discourse/all-the-plugins) 에서 "add\_model\_callback"과 ":before\_save"를 사용하는 플러그인을 찾아보세요. 그런 다음 `UserProfile`에 대해 이를 적용하면 됩니다.

---

_[View the full topic](https://meta.discourse.org/t/how-to-prevent-the-updating-of-specific-user-fields/353627)._
