diff options
author | Isabella Siu <isabella.siu@10gen.com> | 2019-01-11 11:16:24 -0500 |
---|---|---|
committer | Isabella Siu <isabella.siu@10gen.com> | 2019-02-08 14:34:32 -0500 |
commit | 8e5e745e98d33633e7d24a2629f22cdba79d9851 (patch) | |
tree | 9e02d92dadcf67140fe8707d792e55cf12b5443e /src/mongo/db/commands/distinct.cpp | |
parent | 7a7baa2539ec169335086e45c7d0b85ba7cdb877 (diff) | |
download | mongo-8e5e745e98d33633e7d24a2629f22cdba79d9851.tar.gz |
SERVER-37836 re-evaluate authorization for originating command in getMore
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r-- | src/mongo/db/commands/distinct.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 4d0f1dd70ea..f26feb2cf80 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -144,8 +144,14 @@ public: return viewAggRequest.getStatus(); } - return runAggregate( - opCtx, nss, viewAggRequest.getValue(), viewAggregation.getValue(), result); + // An empty PrivilegeVector is acceptable because these privileges are only checked on + // getMore and explain will not open a cursor. + return runAggregate(opCtx, + nss, + viewAggRequest.getValue(), + viewAggregation.getValue(), + PrivilegeVector(), + result); } Collection* const collection = ctx->getCollection(); |