Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

User-Defined Roles

Updated on 2023-10-08 GMT+08:00

A user-defined role is a customized role created by a user by running a command. It contains only one or more CRUD operations or one or more built-in roles. You can customize roles based on different resources and actions. User-defined roles are applied in the same way as built-in roles.

Creating, Modifying, and Deleting Roles

  • Before creating a role, connect to the DB instance as a user with the required permission (for example, rwuser).
  • You can use createRole to create a user-defined role to control permissions for different databases and collections or inherit permissions from other roles.
  • After a role is created, you can run grantPrivilegesToRole, grantRolesToRole, revokeRolesFromRole, or revokePrivilegesFromRole to obtain or revoke permissions of the role. For details, see Creating and Managing Roles.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback