-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathjs-user-management.txt
98 lines (56 loc) · 2.1 KB
/
js-user-management.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
=======================
User Management Methods
=======================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. include:: /includes/extracts/methods-toc-explanation.rst
.. list-table::
:widths: 30,70
:header-rows: 1
* - Name
- Description
* - :method:`db.auth()`
- Authenticates a user to a database.
* - :method:`db.changeUserPassword()`
- Changes an existing user's password.
* - :method:`db.createUser()`
- Creates a new user.
* - :method:`db.dropUser()`
- Removes a single user.
* - :method:`db.dropAllUsers()`
- Deletes all users associated with a database.
* - :method:`db.getUser()`
- Returns information about the specified user.
* - :method:`db.getUsers()`
- Returns information about all users associated with a database.
* - :method:`db.grantRolesToUser()`
- Grants a role and its privileges to a user.
* - :method:`db.removeUser()`
- Deprecated. Removes a user from a database.
* - :method:`db.revokeRolesFromUser()`
- Removes a role from a user.
* - :method:`db.updateUser()`
- Updates user data.
* - :method:`passwordPrompt()`
- Prompts for the password as an alternative to specifying passwords
directly in various :binary:`~bin.mongosh` user
authentication/management methods.
.. toctree::
:titlesonly:
:hidden:
db.auth </reference/method/db.auth>
db.changeUserPassword </reference/method/db.changeUserPassword>
db.createUser </reference/method/db.createUser>
db.dropUser </reference/method/db.dropUser>
db.dropAllUsers </reference/method/db.dropAllUsers>
db.getUser </reference/method/db.getUser>
db.getUsers </reference/method/db.getUsers>
db.grantRolesToUser </reference/method/db.grantRolesToUser>
db.removeUser </reference/method/db.removeUser>
db.revokeRolesFromUser </reference/method/db.revokeRolesFromUser>
db.updateUser </reference/method/db.updateUser>
passwordPrompt </reference/method/passwordPrompt>