Skip to content

Commit 15335ec

Browse files
committed
DOCS-5902 DOCS-5903 createRole clarifications and fix parameter ordering for user/role methods
1 parent d60ac49 commit 15335ec

29 files changed

+91
-47
lines changed

source/core/authorization.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ the union of all the privileges of the respective roles.
3535
Roles
3636
-----
3737

38-
A role consists of privileges that pair resources with allowed operations.
39-
Each privilege is defined directly in the role or inherited from another
40-
role.
38+
A role consists of privileges that pair resources with allowed
39+
operations. Each privilege is specified explicitly in the role or
40+
inherited from another role or both.
4141

42-
A role's privileges apply to the database where the role is created. A role
43-
created on the ``admin`` database can include privileges that apply to all
44-
databases or to the :ref:`cluster <resource-cluster>`.
42+
.. include:: /includes/fact-roles-privileges-scope.rst
4543

4644
A user assigned a role receives all the privileges of that role. The user can
4745
have multiple roles and can have different roles on different databases.

source/includes/apiargs-dbcommand-createRole-field.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ type: string
1111
arg_name: field
1212
description: |
1313
The privileges to grant the role. A privilege consists of a resource
14-
and permitted actions. You must specify the ``privileges`` field. Use an
15-
empty array to specify *no* privileges. For the syntax of a privilege, see the
14+
and permitted actions. For the syntax of a privilege, see the
1615
:data:`~admin.system.roles.privileges` array.
16+
17+
You must include the ``privileges`` field. Use an
18+
empty array to specify *no* privileges.
1719
interface: dbcommand
1820
name: privileges
1921
operation: createRole
@@ -23,8 +25,10 @@ type: array
2325
---
2426
arg_name: field
2527
description: |
26-
An array of roles from which this role inherits privileges. You must
27-
specify the ``roles`` field. Use an empty array to specify *no* roles.
28+
An array of roles from which this role inherits privileges.
29+
30+
You must include the ``roles`` field. Use an empty array to specify
31+
*no* roles to inherit from.
2832
interface: dbcommand
2933
name: roles
3034
operation: createRole

source/includes/apiargs-method-db.collection.aggregate-options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface: method
2323
name: allowDiskUse
2424
operation: db.collection.aggregate
2525
optional: true
26-
position: 1
26+
position: 2
2727
type: boolean
2828
---
2929
arg_name: field

source/includes/apiargs-method-db.createRole-param.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ operation: db.createRole
1414
source:
1515
file: apiargs-dbcommand-createRole-field.yaml
1616
ref: writeConcern
17+
position: 2
1718
...

source/includes/apiargs-method-db.createRole-role-field.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ operation: db.createRole
1414
source:
1515
file: apiargs-dbcommand-createRole-field.yaml
1616
ref: privileges
17+
position: 2
1718
---
1819
arg_name: field
1920
interface: method
2021
operation: db.createRole
2122
source:
2223
file: apiargs-dbcommand-createRole-field.yaml
2324
ref: roles
25+
position: 3
2426
...

source/includes/apiargs-method-db.createUser-param.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ operation: db.createUser
1515
source:
1616
file: apiargs-dbcommand-createUser-field.yaml
1717
ref: writeConcern
18+
position: 2
1819
...

source/includes/apiargs-method-db.createUser-user-doc-param.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,21 @@ operation: db.createUser
1414
source:
1515
file: apiargs-dbcommand-createUser-field.yaml
1616
ref: pwd
17+
position: 2
1718
---
1819
arg_name: field
1920
interface: method
2021
operation: db.createUser
2122
source:
2223
file: apiargs-dbcommand-createUser-field.yaml
2324
ref: customData
25+
position: 3
2426
---
2527
arg_name: field
2628
interface: method
2729
operation: db.createUser
2830
source:
2931
file: apiargs-dbcommand-createUser-field.yaml
3032
ref: roles
33+
position: 4
3134
...

source/includes/apiargs-method-db.dropAllRoles-param.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ operation: db.dropAllRoles
33
source:
44
file: apiargs-dbcommand-dropAllRolesFromDatabase-field.yaml
55
ref: writeConcern
6+
position: 1
67
...

source/includes/apiargs-method-db.dropAllUsers-param.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ operation: db.dropAllUsers
33
source:
44
file: apiargs-dbcommand-dropUser-field.yaml
55
ref: writeConcern
6+
position: 1
67
...

source/includes/apiargs-method-db.dropRole-param.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ operation: db.dropRole
1515
source:
1616
file: apiargs-dbcommand-dropRole-field.yaml
1717
ref: writeConcern
18+
position: 2
1819
...

0 commit comments

Comments
 (0)