diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2021-02-05 14:00:41 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-09 00:04:28 +0000 |
commit | 93bddb471583e84afc412b68c7e9c06871d42c43 (patch) | |
tree | a42ee943c596d6c0d203a4a4730980591f0b1189 /src/mongo/db/commands/count_cmd.cpp | |
parent | 3120087175678ec7a61a6d12cd9326ba8cfa2d45 (diff) | |
download | mongo-93bddb471583e84afc412b68c7e9c06871d42c43.tar.gz |
SERVER-54022 Simplify AuthorizationSession
Diffstat (limited to 'src/mongo/db/commands/count_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/count_cmd.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp index 8ca97e3ae2a..1347c0af83c 100644 --- a/src/mongo/db/commands/count_cmd.cpp +++ b/src/mongo/db/commands/count_cmd.cpp @@ -31,6 +31,7 @@ #include "mongo/platform/basic.h" +#include "mongo/db/auth/authorization_checks.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/client.h" #include "mongo/db/commands.h" @@ -125,10 +126,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, |