File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -424,7 +424,7 @@ functions.
424
424
- :authaction:`flushRouterConfig`
425
425
- :authaction:`fsync`
426
426
- :authaction:`invalidateUserCache`
427
-
427
+ - :authaction:`killAnyCursor` (New in version 3.6.3)
428
428
- :authaction:`killAnySession` (New in version 3.6)
429
429
430
430
- :authaction:`killop`
Original file line number Diff line number Diff line change @@ -41,6 +41,21 @@ Definition
41
41
42
42
.. include:: /includes/apiargs/dbcommand-killCursors-field.rst
43
43
44
+ Required Access
45
+ ---------------
46
+
47
+ .. versionchanged:: 3.6.3
48
+
49
+ To successfully execute a :dbcommand:`killCursors` command, all cursors
50
+ that you wish to kill must be associated with a currently authenticated
51
+ user. MongoDB associates cursors with the users that were authenticated when
52
+ the cursor was created. If the operation is not successful due to
53
+ permission issues, the command returns an error message.
54
+
55
+ Alternatively, if a user possesses the :authaction:`killAnyCursor`
56
+ privilege, that user may kill any cursor regardless of what users the
57
+ cursor is associated with.
58
+
44
59
Example
45
60
-------
46
61
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ Query and Write Actions
47
47
- :dbcommand:`getMore`
48
48
- :dbcommand:`getPrevError`
49
49
- :dbcommand:`group`
50
- - :dbcommand:`killCursors`
50
+ - :dbcommand:`killCursors`, provided that the cursor is associated
51
+ with a currently authenticated user.
51
52
- :dbcommand:`listCollections`
52
53
- :dbcommand:`listIndexes`
53
54
- :dbcommand:`mapReduce` with the ``{out: inline}`` option.
@@ -254,7 +255,16 @@ Database Management Actions
254
255
255
256
.. authaction:: killCursors
256
257
257
- User can kill cursors on the target collection.
258
+ User can kill cursors with which they are associated. Cursors are
259
+ associated with the users that were authenticated when the cursor was
260
+ created. Apply this action to collection resources.
261
+
262
+ .. authaction:: killAnyCursor
263
+
264
+ .. versionadded:: 3.6.3
265
+
266
+ User can kill **any** cursor regardless of their association
267
+ with the cursor. Apply this action to collection resources.
258
268
259
269
.. authaction:: revokeRole
260
270
You can’t perform that action at this time.
0 commit comments