diff options
Diffstat (limited to 'src/mongo/s/commands/cluster_killcursors_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_killcursors_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/s/commands/cluster_killcursors_cmd.cpp b/src/mongo/s/commands/cluster_killcursors_cmd.cpp index 716107f43d1..31faadc80f2 100644 --- a/src/mongo/s/commands/cluster_killcursors_cmd.cpp +++ b/src/mongo/s/commands/cluster_killcursors_cmd.cpp @@ -45,8 +45,9 @@ struct ClusterKillCursorsCmd { const NamespaceString& nss, CursorId cursorId) { auto const authzSession = AuthorizationSession::get(opCtx->getClient()); - auto authChecker = [&authzSession, &nss](UserNameIterator userNames) -> Status { - return auth::checkAuthForKillCursors(authzSession, nss, userNames); + auto authChecker = [&authzSession, + &nss](const boost::optional<UserName>& userName) -> Status { + return auth::checkAuthForKillCursors(authzSession, nss, userName); }; return Grid::get(opCtx)->getCursorManager()->checkAuthForKillCursors( |