Docs Home → MongoDB Manual
Role Management Commands角色管理命令
Note 注意
For details on specific commands, including syntax and examples, click on the specific command to go to its reference page.有关特定命令的详细信息,包括语法和示例,请单击特定命令以转到其参考页。
Name名称 Description描述
createRole
Creates a role and specifies its privileges.创建角色并指定其权限。
dropRole
Deletes the user-defined role.删除用户定义的角色。
dropAllRolesFromDatabase
Deletes all user-defined roles from a database.从数据库中删除所有用户定义的角色。
grantPrivilegesToRole
Assigns privileges to a user-defined role.为用户定义的角色分配权限。
grantRolesToRole
Specifies roles from which a user-defined role inherits privileges.指定用户定义角色从中继承权限的角色。
invalidateUserCache
Flushes the in-memory cache of user information, including credentials and roles.刷新用户信息的内存缓存,包括凭据和角色。
revokePrivilegesFromRole
Removes the specified privileges from a user-defined role.从用户定义的角色中删除指定的权限。
revokeRolesFromRole
Removes specified inherited roles from a user-defined role.从用户定义的角色中删除指定的继承角色。
rolesInfo
Returns information for the specified role or roles.返回指定角色的信息。
updateRole
Updates a user-defined role.更新用户定义的角色。