Skip to content

add blurb to system.users.roles array #1390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions source/reference/system-users-collection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ Each ``system.users`` document has the following fields:
.. data:: admin.system.users.roles

The :data:`~admin.system.users.roles` array contains role documents
that specify the roles granted to the user. Each role document has
the following syntax:
that specify the roles granted to the user. The array can specify both
:ref:`system-defined roles <system-user-roles>` and :ref:`user-defined
role <user-defined-roles>`.

A role document has the following syntax:

.. code-block:: javascript

Expand All @@ -83,6 +86,12 @@ Each ``system.users`` document has the following fields:

The name of the database where role is defined.

When specifying a role using the :ref:`role management
<role-management-commands>` or :ref:`user management
<user-management-commands>` commands, you can specify the role name alone
(e.g. ``"readWrite"``) if the role that exists on the database on which
the command is run.

.. data:: admin.system.users.customData

The :data:`~admin.system.users.customData` field contains optional
Expand Down