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/s/commands/cluster_create_cmd.cpp | |
parent | 3120087175678ec7a61a6d12cd9326ba8cfa2d45 (diff) | |
download | mongo-93bddb471583e84afc412b68c7e9c06871d42c43.tar.gz |
SERVER-54022 Simplify AuthorizationSession
Diffstat (limited to 'src/mongo/s/commands/cluster_create_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_create_cmd.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/s/commands/cluster_create_cmd.cpp b/src/mongo/s/commands/cluster_create_cmd.cpp index a288fbd8815..8999dd01aba 100644 --- a/src/mongo/s/commands/cluster_create_cmd.cpp +++ b/src/mongo/s/commands/cluster_create_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.h" #include "mongo/db/commands/create_gen.h" @@ -37,6 +38,7 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" + namespace mongo { namespace { @@ -105,8 +107,8 @@ public: } void doCheckAuthorization(OperationContext* opCtx) const final { - uassertStatusOK( - AuthorizationSession::get(opCtx->getClient())->checkAuthForCreate(request(), true)); + uassertStatusOK(auth::checkAuthForCreate( + AuthorizationSession::get(opCtx->getClient()), request(), true)); } CreateCommandReply typedRun(OperationContext* opCtx) final { |