Possible to edit 'View/Contact Team Members' permission?


(In the Community Edition) Is it possible to restrict members from viewing or contacting other members in the same Team, unless they are also part of the same Channel, or have some custom role, like Manager?

Hi @shrey ,

There’s only the setting in System console → Site Configuration → Users and Teams → “Enable users to open Direct Message channels with” which would allow you to limit the scope to a specific team where you could put those users into, but they will also be able to see each other then because every user in a team will automatically be added to the town-square channel and in there, everyone could see a list of all available users in that team.

The feature you’re probably looking for is the guest account access, but this is a paid feature and not available in the free editions:

Could you describe your use case a bit? Maybe I can come up with an alternative.

Hi @agriesser, thank you for the response.

Our use-case:

There are a lot of users in the firm.
A lot of these users are common in several groups.

To me, it seems a bit too cumbersome and impractical to create several Teams, just to segregate different groups, and then have only 1 channel within each of these Teams.

Hence, i would like to:

  • Create a ‘Default’ Team, where all company users are included
  • These users should not be able to view other users or contact them
  • Then i would create separate Channels for each of the different groups and restrict the users to those channels/groups (which is currently doable)
  • Users within a Channel should be able to view/contact each other

There’s a plugin which would allow you to disable direct and group messages:

If you set that up and also disallow the creation of private and public channels, you should be good to go with most of your requirements. The only thing left is, that they are still able to see each other by looking at the members of the town-square channel or by using the search and mentions.


Thanks for the link!

Although, this plugin hasn’t been maintained for a long time now. And is facing a lot of issues while trying to set it up in my Windows machine :confused:

Is there any other workaround?

I’m not aware of any other workaround for that currently and please note that Mattermost and especially the plugins are not officially supported on Windows at all. The latest version still works and there have also been some modifications to it after users reported problems on Windows, but it’s not being tested against it and it might break with a new release and stay broken for some time due to the fact that a fix might also be denied.

I’ve mentioned Windows only because the Plugin also included instructions for building in Windows.

The Mattermost server, is deployed in a Docker container, on an Ubuntu machine (Cloudron).

Alright, although there is a windows release, didn’t see that :slight_smile:
Anyways, I quickly gave it a try and the plugin is working as expected on a 7.9.1 installation:

# mmctl --local plugin install-url https://github.com/Brightscout/mattermost-plugin-disable-dm/releases/download/v1.0.0/mattermost-plugin-disable-dm-v1.0.0-linux-amd64.tar.gz
Plugin Disable DM successfully installed
# mmctl --local plugin enable disable-dm
Enabled plugin: disable-dm

Immediately after you enabled it, direct messages (also in existing channels) are rejected: