MongoDB Compass users require specific privileges to access various Compass features if authentication/authorization is enforced on the connected MongoDB instance.如果在连接的MongoDB实例上强制执行身份验证/授权,则MongoDB Compass用户需要特定权限才能访问各种Compass功能。
The following table lists the privileges required to access the features as well as the built-in roles that can provide these privileges:下表列出了访问功能所需的权限以及可以提供这些权限的内置角色:
| Home/MongoDB Instance | clusterMonitor | ||
| Database | createCollection | readWrite | |
| Database | dropDatabase | dbAdmin | |
| Collection | createCollection | readWrite | |
| Collection | dropCollection | readWrite | |
| Schema | find | read | |
| Documents | find | read | |
| Documents | readWrite | ||
| Indexes | listIndexes | read | |
| Indexes | readWrite | ||
| Explain Plan | find | read | |
| Validation | listCollections | read | |
| Validation | collMod | dbAdmin |
Note
The built-in roles may provide more access than required. You can also create a User-Defined Roles on Self-Managed Deployments to grant specific privileges.内置角色可能提供比所需更多的访问权限。您还可以在自我管理部署上创建用户定义角色,以授予特定权限。