Skip to content

Commit c31cf83

Browse files
authored
DOCSP-27062 Role Interlinks - Backport 4.4 #2275) (#2320)
* DOCSP-27062 Adds Interlinks for mongosh Role Methods (#2275) * Build error * Build error
1 parent 317f63c commit c31cf83

16 files changed

+55
-27
lines changed

source/reference/command/createRole.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Definition
2121
command returns a *duplicate role* error if the role already exists in
2222
the database.
2323

24+
.. |method| replace:: :method:`db.createRole` helper method
25+
.. include:: /includes/fact-dbcommand-tip
26+
2427
The :dbcommand:`createRole` command uses the following syntax:
2528

2629
.. code-block:: javascript

source/reference/command/dropAllRolesFromDatabase.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Definition
2323
The :dbcommand:`dropAllRolesFromDatabase` removes *all*
2424
:ref:`user-defined <user-defined-roles>` roles from the database.
2525

26+
.. |method| replace:: :method:`db.dropAllRoles` helper method
27+
.. include:: /includes/fact-dbcommand-tip
28+
2629
The :dbcommand:`dropAllRolesFromDatabase` command takes the following
2730
form:
2831

source/reference/command/dropRole.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Definition
1818
Deletes a :ref:`user-defined <user-defined-roles>` role from the
1919
database on which you run the command.
2020

21+
.. |method| replace:: :method:`db.dropRole` helper method
22+
.. include:: /includes/fact-dbcommand-tip
23+
2124
The :dbcommand:`dropRole` command uses the following syntax:
2225

2326
.. code-block:: javascript

source/reference/command/grantPrivilegesToRole.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ Definition
1717

1818
Assigns additional :ref:`privileges <privileges>` to a :ref:`user-defined
1919
<user-defined-roles>` role defined on the database on which the
20-
command is run. The :dbcommand:`grantPrivilegesToRole` command uses
21-
the following syntax:
20+
command is run.
21+
22+
.. |method| replace:: :method:`db.grantPrivilegesToRole` helper method
23+
.. include:: /includes/fact-dbcommand-tip
24+
25+
The :dbcommand:`grantPrivilegesToRole` command uses the following syntax:
2226

2327
.. code-block:: javascript
2428

source/reference/command/grantRolesToRole.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Definition
1717

1818
Grants roles to a :ref:`user-defined role <user-defined-roles>`.
1919

20+
.. |method| replace:: :method:`db.grantRolesToRole` helper method
21+
.. include:: /includes/fact-dbcommand-tip
22+
2023
The :dbcommand:`grantRolesToRole` command affects roles on the
2124
database where the command runs. :dbcommand:`grantRolesToRole` has
2225
the following syntax:

source/reference/command/revokePrivilegesFromRole.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Definition
2020
command is run. The :dbcommand:`revokePrivilegesFromRole` command
2121
has the following syntax:
2222

23+
.. |method| replace:: :method:`db.revokePrivilegesFromRole` helper method
24+
.. include:: /includes/fact-dbcommand-tip
25+
2326
.. code-block:: javascript
2427

28+
2529
{
2630
revokePrivilegesFromRole: "<role>",
2731
privileges:

source/reference/command/revokeRolesFromRole.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Definition
1818
Removes the specified inherited roles from a role. The
1919
:dbcommand:`revokeRolesFromRole` command has the following syntax:
2020

21+
.. |method| replace:: :method:`db.revokeRolesFromRole` helper method
22+
.. include:: /includes/fact-dbcommand-tip
23+
2124
.. code-block:: javascript
2225

2326
{ revokeRolesFromRole: "<role>",

source/reference/command/updateRole.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Definition
1818
Updates a :ref:`user-defined role <user-defined-roles>`. The
1919
:dbcommand:`updateRole` command must run on the role's database.
2020

21+
.. |method| replace:: :method:`db.updateRole` helper method
22+
.. include:: /includes/fact-dbcommand-tip
23+
2124
An update to a field **completely replaces** the previous field's values.
2225
To grant or remove roles or :ref:`privileges <privileges>` without
2326
replacing all values, use one or more of the following commands:

source/reference/method/db.createRole.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Definition
2020
inherit privileges from other roles or both. The role applies to
2121
the database on which you run the method.
2222

23+
.. |dbcommand| replace:: :dbcommand:`createRole` command
24+
.. include:: /includes/fact-mongo-shell-method-alt.rst
25+
2326
The :method:`db.createRole()` method accepts the following arguments:
2427

2528

@@ -129,12 +132,6 @@ Definition
129132

130133
.. include:: /includes/fact-auth-restrictions-role-desc.rst
131134

132-
133-
134-
135-
136-
The :method:`db.createRole()` method wraps the :dbcommand:`createRole`
137-
command.
138135

139136
Roles
140137
~~~~~

source/reference/method/db.dropAllRoles.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Definition
2323
The :method:`db.dropAllRoles()` method removes *all*
2424
:ref:`user-defined <user-defined-roles>` roles from the database.
2525

26+
.. |dbcommand| replace:: :dbcommand:`dropAllRolesFromDatabase` command
27+
.. include:: /includes/fact-mongo-shell-method-alt.rst
28+
2629
The :method:`db.dropAllRoles()` method takes the following argument:
2730

2831

@@ -55,9 +58,6 @@ Definition
5558
:returns:
5659
The number of :ref:`user-defined <user-defined-roles>` roles dropped.
5760

58-
The :method:`db.dropAllRoles()` method wraps the
59-
:dbcommand:`dropAllRolesFromDatabase` command.
60-
6161
.. |local-cmd-name| replace:: :method:`db.dropAllRoles()`
6262

6363
Behavior

0 commit comments

Comments
 (0)