User directory disabled, users list visible in mentions autocomplete

AI-generated summary

In a feature request regarding User directory disabled, users list visible in mentions autocomplete, user mferrero explains that while their Discourse instance has the user directory disabled, users can still browse names via the @mention autocomplete. They attempted to block this by setting max mentions per post to 0, but this only prevents the action, not the visibility of the list. mferrero suggests a minimum trust level for mentions or a plugin to hide the autocomplete and search dropdown results as potential solutions. Mittineague notes that completely hiding member names is difficult due to other exposure points like search and topic lists. mferrero confirms that groups are partitioned with strict mention settings and private messaging disabled, acknowledging that the autocomplete visibility is the remaining issue. They express willingness to develop a plugin to address these specific visibility gaps.

Hello, we are using Discourse for customer care, as described in Is it a security violation to show a directory of users?

We have already disabled enable_user_directory (thanks for the feature!)
When posting a user can @ mention other users and see the list of users in the autocompletion box, so in some way can still browse the list of users.

I have already tried to set the max mentions per post and newuser max mentions per post to 0, this prevents the user from mentioning but not from seeing the autocompletion list.

Is there any way to block this? A min trust level for mentions would be great.
I searched the plugins but could not find anything.

I know Discourse has been designed for public communities and this is not the way it is meant to be used, I read all the discussion about hiding the users directory, so I know this will be low level priority :slight_smile:

Many thanks.
Massimiliano

What are your “who can mention message this group” settings?

If your goal is to not expose member names anywhere that is quite a task.

Search drop down, topic lists, Badge pages to name a few.

All groups have “who can mention message this group” set to Nobody.

Badges are off, users can read and search topics only in their groups, so to this regard they are already partitioned.
They can see other users name in search drop down, true.

We have also turned off MPs, so if they see another user they cannot talk to each other.
I think that will do.

I don’t know what kind of hooks there are for the plugin system.
A plugin to:

  • disable mentions of mention autocomplete
  • disable user name as a result in the search drop down
    could be written?