diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2020-10-29 12:14:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-07 11:20:50 +0000 |
commit | 90c89d33c400d2f1eb8972170b7a17e3315c4198 (patch) | |
tree | 2aaee3468e4350950b546b2b24783d9ddc2d8e2e /src/mongo/db/commands/user_management_commands.cpp | |
parent | 66cdb6d0fccf3b65c61a1bea5d6171591d21c9da (diff) | |
download | mongo-90c89d33c400d2f1eb8972170b7a17e3315c4198.tar.gz |
SERVER-51649 Convert aggregate command input to IDL
Diffstat (limited to 'src/mongo/db/commands/user_management_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/user_management_commands.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index f32b686f5a6..0d3387048fb 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -65,6 +65,7 @@ #include "mongo/db/jsobj.h" #include "mongo/db/operation_context.h" #include "mongo/db/ops/write_ops.h" +#include "mongo/db/pipeline/aggregation_request_helper.h" #include "mongo/db/query/cursor_response.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" @@ -1417,13 +1418,13 @@ UsersInfoReply CmdUMCTyped<UsersInfoCommand, UsersInfoReply, UMCInfoParams>::Inv DBDirectClient client(opCtx); rpc::OpMsgReplyBuilder replyBuilder; - AggregationRequest aggRequest(AuthorizationManager::usersCollectionNamespace, - std::move(pipeline)); + AggregateCommand aggRequest(AuthorizationManager::usersCollectionNamespace, + std::move(pipeline)); // Impose no cursor privilege requirements, as cursor is drained internally uassertStatusOK(runAggregate(opCtx, AuthorizationManager::usersCollectionNamespace, aggRequest, - aggRequest.serializeToCommandObj().toBson(), + aggregation_request_helper::serializeToCommandObj(aggRequest), PrivilegeVector(), &replyBuilder)); auto bodyBuilder = replyBuilder.getBodyBuilder(); |