summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/distinct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r--src/mongo/db/commands/distinct.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp
index 738db9ffb2c..2c01df647bc 100644
--- a/src/mongo/db/commands/distinct.cpp
+++ b/src/mongo/db/commands/distinct.cpp
@@ -35,6 +35,7 @@
#include <string>
#include <vector>
+#include "mongo/db/auth/authorization_checks.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/bson/dotted_path_support.h"
#include "mongo/db/client.h"
@@ -124,10 +125,10 @@ public:
}
const auto hasTerm = false;
- return authSession->checkAuthForFind(
- CollectionCatalog::get(opCtx)->resolveNamespaceStringOrUUID(
- opCtx, CommandHelpers::parseNsOrUUID(dbname, cmdObj)),
- hasTerm);
+ return auth::checkAuthForFind(authSession,
+ CollectionCatalog::get(opCtx)->resolveNamespaceStringOrUUID(
+ opCtx, CommandHelpers::parseNsOrUUID(dbname, cmdObj)),
+ hasTerm);
}
Status explain(OperationContext* opCtx,