隐藏用户资料设置未完成

The 'Hide User Profiles from Public’ option is a great feature for hiding user details, particularly their Display name, from anonymous users, but it is incomplete.

Even when this feature is enabled, the lists in the Users, Groups and Badges directories (available to all visitors via the Hamburger menu) still show the user’s Display Name. Why are these not hidden here as well?

My use case is:

  • site can be browsed by public
  • users’ details are private (so cards only load for logged-in members)
  • the site offers a list of groups and badges, without revealing private information

This could be achieved by removing the Display Name from the fields shown on these lists, or by removing the Directory aspect of these pages and leaving only the list of Badges or Groups with their descriptions, but not who belongs to them, for all Anonymous users.

Am I missing something? Is there a way to achieve this?

https://github.com/discourse/discourse/commit/bb79e6aff7acd95d1dac8fcf367978af2ad81162

Example of page where Hide Profiles is enabled, and visitor is not logged in, but names are displayed:

1 个赞

What is the value of the enable names site setting?

Do you mean the value of hiding them?

We have a membership organisation where we would have wanted to insist on real names but that might have put more private members off participating in a public forum, so we compromised by allowing (and showing) usernames only, but keeping ‘real names’ in the Display Name field so at least other members would always know who they were talking to.

It works great across the rest of the site, but there is no point turning off the user cards with the private information (including name) if you then display this same information on another page. It seems it is inconsistent when it comes to privacy.

No. There is a site setting called enable names

Is it turned off?

Ah! It is enabled, but turning that off goes too far the other way (as I understand it)

I DO want their names to be shown to other logged-in users (i.e. other members of the society). I do not want to remove them from the site as a whole or 'Disable to hide full name everywhere'. I only want to hide this field to anonymous users. There is no reason to display anything other than usernames to anonymous users. That is what happens in the topics, why is this not the case in the directories?

Hmm…so I just tested this. If I have enable names, display name on posts, and hide user profiles from public all checked, full names do appear on posts for anonymous users. I couldn’t find a setting combination that would display full names on posts on for logged-in users.

Hide User Profiles from Public is doing what it’s intended to, it’s preventing access to the user’s profiles. A “full name” is not generally a secret, nor is it part of the “user profile”, hence why it is not hidden by this setting.

What you can do is hide the names via CSS. The following CSS hides the name field on badge pages for anonymous users only.

.anon .show-badge .name {
    display: none;
}
4 个赞

Thanks - that works well for the Badges

Can the same be done for Groups? What’s the class for that?

EDIT: I think I got it working with (is this going to cause any issues?):

.anon .user-detail .name {
    display: none;
}
1 个赞

With any CSS change there can always be unexpected side effects, but given that the rule only targets anonymous users, and removes any name references (which is your goal) I think you’re set.

3 个赞

能否将此功能化?启用“隐藏用户个人资料”,但仍然列出所有 TL1 用户,这仍然会向没有帐户的用户显示大量用户列表。我知道创建帐户很容易,但这个小门槛很好。没有它,“隐藏用户个人资料”选项就不完整,因此实际上无效。

将此问题重新提出来(因为它也刚刚发生在我身上),我有一个半私有的实例(betterstreets.nz)。一些类别是公开的,但大部分(包括用户的东西)不是。除了徽章!

似乎如今用户列表被程序化地隐藏了(太棒了!),并且您可以毫不费力地配置每个组以隐藏。

但是,徽章仍然对匿名用户可见。有原因吗?我已经使用以下方法隐藏了我的:

// hide badges from anon
.anon .hamburger-panel .menu-panel a.badge-link {
    display: none;
}
.anon .badges-page div#main-outlet-wrapper {
    display: none;
}
1 个赞

此主题已在 2454 天后自动关闭。不允许回复。