Paramètre Masquer les Profils Utilisateur incomplet

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 « J'aime »

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 « J'aime »

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 « J'aime »

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 « J'aime »

Cela ne peut-il pas devenir une fonctionnalité ? Activer « Masquer les profils utilisateur du public », tout en ayant toujours une liste de tous les utilisateurs TL1, donne toujours une longue liste d’utilisateurs aux personnes qui n’ont pas de compte. Je sais que créer un compte est facile, mais le petit seuil est agréable. Et sans cela, l’option « Masquer les profils utilisateur du public » est incomplète et donc pas vraiment efficace.

Remontée de ce sujet (car il vient de me concerner), j’ai une instance qui est semi-privée (betterstreets.nz). Quelques catégories sont publiques, mais une grande partie (y compris les éléments utilisateur) ne l’est pas. Sauf les badges !

Il semble que de nos jours, la liste des utilisateurs soit cachée de anon par programmation (hourra !), et vous pouvez configurer chaque groupe pour qu’il soit également caché sans trop de difficulté.

Cependant, les badges sont toujours visibles pour les anonymes. Y a-t-il une raison à cela ? J’ai caché les miens en utilisant :

// cacher les badges pour les anonymes
.anon .hamburger-panel .menu-panel a.badge-link {
    display: none;
}
.anon .badges-page div#main-outlet-wrapper {
    display: none;
}
1 « J'aime »

Ce sujet a été automatiquement fermé après 2454 jours. Les nouvelles réponses ne sont plus autorisées.