summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-06-04 13:43:13 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2018-06-05 16:53:57 -0400
commit076c5057d7508df28ebe3af0870be8328dc280af (patch)
tree0b82ed9d8acb2420ad762190fdeb22aa797c10d9
parent48738cf690a1b14974af3750ced131ff903fa973 (diff)
downloadmongo-076c5057d7508df28ebe3af0870be8328dc280af.tar.gz
SERVER-35382 _isSelf requiresAuth false
(cherry picked from commit a54afcecfd5b802904c3224de9e35348621bd2dc)
-rw-r--r--src/mongo/db/commands/isself.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/commands/isself.cpp b/src/mongo/db/commands/isself.cpp
index f0cb399a73a..83718139e7a 100644
--- a/src/mongo/db/commands/isself.cpp
+++ b/src/mongo/db/commands/isself.cpp
@@ -51,9 +51,12 @@ public:
std::string help() const override {
return "{ _isSelf : 1 } INTERNAL ONLY";
}
- virtual void addRequiredPrivileges(const std::string& dbname,
- const BSONObj& cmdObj,
- std::vector<Privilege>* out) const {} // No auth required
+ bool requiresAuth() const override {
+ return false;
+ }
+ void addRequiredPrivileges(const std::string& dbname,
+ const BSONObj& cmdObj,
+ std::vector<Privilege>* out) const override {}
bool run(OperationContext* opCtx,
const string& dbname,
const BSONObj& cmdObj,