Restrict user visibility outside team/group

In my requirement, I am supposed to create a few teams (groups) and assign users to those groups.
Users cannot see any user other than the users in assigned groups. How to achieve this?

Server Setup Information

  • Version of Rocket.Chat Server: Latest
  • Operating System: Amazon Linux
  • Deployment Method: docker
  • Number of Running Instances: 1
  • MongoDB Version: 5
  • Firewalls involved: N/A