summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_killcursors_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/commands/cluster_killcursors_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_killcursors_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_killcursors_cmd.cpp b/src/mongo/s/commands/cluster_killcursors_cmd.cpp
index b902dbf5de1..c05ac76d7fb 100644
--- a/src/mongo/s/commands/cluster_killcursors_cmd.cpp
+++ b/src/mongo/s/commands/cluster_killcursors_cmd.cpp
@@ -29,6 +29,7 @@
#include "mongo/platform/basic.h"
+#include "mongo/db/auth/authorization_checks.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/commands/killcursors_common.h"
#include "mongo/s/grid.h"
@@ -45,7 +46,7 @@ struct ClusterKillCursorsCmd {
CursorId cursorId) {
auto const authzSession = AuthorizationSession::get(opCtx->getClient());
auto authChecker = [&authzSession, &nss](UserNameIterator userNames) -> Status {
- return authzSession->checkAuthForKillCursors(nss, userNames);
+ return auth::checkAuthForKillCursors(authzSession, nss, userNames);
};
return Grid::get(opCtx)->getCursorManager()->checkAuthForKillCursors(