숨겨진 사용자 필드

:information_source: 요약 지정된 그룹에만 표시되는 사용자 필드를 생성합니다
:hammer_and_wrench: 저장소 discourse-hidden-user-fields
:question: 설치 가이드 테마 또는 테마 컴포넌트 설치 방법
:open_book: Discourse 테마를 처음 사용하시나요? Discourse 테마 사용 초보자를 위한 가이드

이 테마 컴포넌트 설치

상세 설명

:warning: 이러한 필드에 민감한 데이터를 사용할 때는 주의가 필요합니다. 필드는 소스에서 찾을 수 없으나, 문제가 발생하면 노출될 수 있습니다. 또한 검색 도구에서 검색 결과가 표시될 수 있습니다. :warning:

derek_test(왼쪽)와 anon9(오른쪽)라는 두 명의 사용자가 있습니다. 두 사용자의 프로필에는 모두 ID 및 Company 필드가 입력되어 있지만, 서로에게 보이는 필드는 하나뿐입니다. derek_test는 ID를 볼 수 있고, anon9는 Company를 볼 수 있습니다.

사용자 프로필

사용자 카드

사용자 디렉터리

이 경우, anon9(오른쪽)는 회사를 볼 수 있고 Acme으로 검색할 수 있습니다.


설정

CleanShot 2025-11-13 at 16.17.43

  • 필드 이름: 사용자 정의 필드 이름 입력 (개체당 하나)
  • 허용된 그룹: 목록에서 허용된 그룹 선택

선행 요구 사항

이 기능은 사용자 정의 필드를 활용합니다. 이 설정은 필드가 어디에 표시될지를 결정합니다:

:warning: 참고: Searchable(검색 가능)은 사이트 전체 검색이 아니라 사용자 디렉터리를 가리킵니다. 이 검색을 통해 일치하는 용어가 여전히 표시됩니다. :warning:

:white_check_mark: 필드가 입력된 후 이 설정을 다시 검토하거나, 미리 권한을 생성하여 이러한 필드가 절대 노출되지 않도록 하세요.

6개의 좋아요

What do users who are not logged in see? So, if the field is only visible to admins, then I would expect that users would not be able to see it even after logging out, correct?


Is there a reason why you chose the text field for the group setting instead of a group_list? It’s a bit more convenient for entering groups because you can select them instead of typing the name. However, it works with the ID, so you have to change the code a little. But it still works even if you rename the group.

1개의 좋아요

Good callout, I just updated it to account for this. Can confirm that logged-out users don’t see the field.

I’ll be honest and say that I did this with Claude Code, but it said that the list_type: group is not available in an object editor—only as a top-level setting.

So it would have to be something like this, but a fixed number of available fields

1개의 좋아요

That’s interesting. Based on the documentation I expected it to support something like that too

2개의 좋아요

Thank you for pointing that out! I was able to modify the group settings based on that documentation!

I’ll update the details above to reflect the change.

2개의 좋아요

Huh.. Although the settings in the object editor did accept the list_type:group, I couldn’t get past an error:

CleanShot 2025-11-13 at 13.52.29

I tried a few different transformations but couldn’t get through. The verdict is that “The groups type in object schemas is documented but the UI is not implemented in the frontend.”.

2개의 좋아요

I saw that error too, but after I used the reset button to reset the whole object setting, the error didn’t come back :woman_shrugging:

So all good now

Maybe it didn’t like changing the setting type on an existing configuration

2개의 좋아요

I can see this being very useful!

1개의 좋아요

HI, @putty !

Have some problems with it:

I need to hide user fields from every user not in User group - seems just the case?

  1. If user itself are not in this group - it also cannot see this fields at its own account - is it ok?
  2. Other users will continue not seeing the fields if they are not Admin or Moderator!
  3. BTW, Moderator and Admin should be also in this Group to see the Fileds, hidden by this Theme.

Could you help with it?

Hi Alexey,
Can you elaborate? I don’t see the problem. It currently has 1 & 2. Is your request to hide fields from mods/admins also? FWIW, admins would have to create the field initially.

Hi, thanks!

Just tested it again on my local clear latest github repo and on hosted solution with the latest build - only Admin category is affected and can see the Hidden field if he/she is a member of a group that allowed to see this field. Even Moderator access (as i thought before doesn’t work)

The case:

  1. Two users, admin and Alex_1
  2. User group L2_verified
  3. User field - Full Name (For all users, all On, only searchable Off)
  4. Both users has names: Alex Admin and Alex
  5. Theme settings:
    Include component on these themes (Foundation, Horizon)
    Field name: Full Name
    Allowed groups: L2_verified

Results:

  1. Both are not members of L2_verified - nobody sees Full Name field (even its own Full Name)
  2. admin is a member of L2_verified - can see Full Name of Alex_1 (and it’s own Full Name)
  3. Alex_1 is a member of L2_verified - cannon see Full Name of itself and of admin
  4. When I granted admin to Alex_1 - it can see both Full Name - itself and admin
1개의 좋아요

So… It sounds like we’re good? haha :sweat_smile:

1개의 좋아요

My Antigravity with Gemini 3 Pro High found the root cause:

Root Cause Identified: The group

L2_verified

exists and

Alex_1

is a member,BUTthe group’sVisibility Level is set to 4(Staff/Owners only).

Because of this restrictive setting, Discourse does not tell the browser that

Alex_1

is a member of this group (unless he is also Staff/Admin). Therefore, the Theme Component checks the list, doesn’t find

L2_verified

, and keeps the field hidden.

Fix:

  1. Go to GroupsL2_verifiedManageInteraction.

  2. Change Who can see this group? to “Members” or “Everyone”.

  3. Save.

  4. Refresh as

    Alex_1
    

    (non-admin). It should now work!

But it’s not a workaround for now - most of our groups are hidden from everyone:(

Hi @dereklputnam,

Thank you for this great component! It’s a fantastic foundation for managing user privacy on Discourse.

I’ve developed a specialized bidirectional (reciprocal) visibility fork based on your work. In our professional community, we needed a “Mutual Trust” model where verified members can see each other’s real names/business data, but remain completely anonymous to the general public or unverified users.

Key features of this fork:

  • Reciprocal Logic: A field is revealed only if both the viewer and the profile owner belong to the authorized group.

  • Staff Oversight: Admins and moderators retain full visibility for safety and moderation purposes.

  • Self-Visibility: Users can always see their own hidden fields, even if they are not yet part of the authorized group, so they can manage their own profile.

  • Peer-to-Peer Privacy: It ensures that even verified users don’t reveal their identity to someone who hasn’t undergone the same level of verification.

Roadmap: In future updates, I plan to add granular group settings to define exactly which groups can see and be seen (e.g., allowing Group A to see Group B, but not vice versa).

I’m currently polishing the documentation and plan to publish this as a standalone “Advanced Privacy” variant in a separate topic once I gain full access to the Theme Components category.

In the meantime, if anyone needs this bidirectional logic, you can check it out here: GitHub: https://github.com/AirVetra/discourse-hidden-user-fields-bidirectional

Thanks again for the inspiration!

1개의 좋아요

이 기능을 사용하시는 분들을 위해 참고사항을 공유드립니다. 이 테마 컴포넌트 대신 다른 경로를 선택하게 되었습니다. 검색 시 용어가 노출되는 것을 발견했는데, 이는 중대한 취약점이었습니다. 'Searchable’은 사이트 검색이 아니라 사용자 디렉토리를 가리킨다는 점을 명확히 추가하겠습니다.

이 컴포넌트를 계속 유지보수할 예정인가요, 아니면 unmaintained 태그를 붙여야 하나요?

1개의 좋아요

unmaintained 태그를 추가해 두겠습니다. 누군가에게 유용할 수 있으니 그대로 두겠지만, 최근 발견한 사실은 저에게는 치명적인 단점이었습니다. 누군가가 더 자세히 살펴볼 충분한 경고라고 생각합니다.

1개의 좋아요