summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/store_possible_cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query/store_possible_cursor.cpp')
-rw-r--r--src/mongo/s/query/store_possible_cursor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/s/query/store_possible_cursor.cpp b/src/mongo/s/query/store_possible_cursor.cpp
index 8647871b6a7..4f53b2441bc 100644
--- a/src/mongo/s/query/store_possible_cursor.cpp
+++ b/src/mongo/s/query/store_possible_cursor.cpp
@@ -32,6 +32,7 @@
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
+#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/query/cursor_response.h"
#include "mongo/s/query/cluster_client_cursor_impl.h"
#include "mongo/s/query/cluster_client_cursor_params.h"
@@ -58,7 +59,9 @@ StatusWith<BSONObj> storePossibleCursor(OperationContext* opCtx,
return cmdResult;
}
- ClusterClientCursorParams params(incomingCursorResponse.getValue().getNSS());
+ ClusterClientCursorParams params(
+ incomingCursorResponse.getValue().getNSS(),
+ AuthorizationSession::get(opCtx->getClient())->getAuthenticatedUserNames());
params.remotes.emplace_back(server, incomingCursorResponse.getValue().getCursorId());