Docs HomeMongoDB Manual

Role Management Commands角色管理命令

Note

For details on a specific command, including syntax and examples, click on the link to the command's reference page.有关特定命令的详细信息,包括语法和示例,请单击该命令参考页的链接。

Name名称Description描述
createRoleCreates a role and specifies its privileges.创建角色并指定其权限。
dropRoleDeletes the user-defined role.删除用户定义的角色。
dropAllRolesFromDatabaseDeletes all user-defined roles from a database.从数据库中删除所有用户定义的角色。
grantPrivilegesToRoleAssigns privileges to a user-defined role.为用户定义的角色分配权限。
grantRolesToRoleSpecifies roles from which a user-defined role inherits privileges.指定用户定义的角色从中继承权限的角色。
invalidateUserCacheFlushes the in-memory cache of user information, including credentials and roles.刷新内存中的用户信息缓存,包括凭据和角色。
revokePrivilegesFromRoleRemoves the specified privileges from a user-defined role.从用户定义的角色中删除指定的权限。
revokeRolesFromRoleRemoves specified inherited roles from a user-defined role.从用户定义的角色中删除指定的继承角色。
rolesInfoReturns information for the specified role or roles.返回指定角色的信息。
updateRoleUpdates a user-defined role.更新用户定义的角色。