summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.h
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2018-04-02 06:18:06 +0100
committerBernard Gorman <bernard.gorman@gmail.com>2018-04-04 17:00:32 +0100
commit718c71966f7a9350cd747604409cd0adb913fb5e (patch)
treeb2b26a2d91de68867e623ab6c3e04136d4049f11 /src/mongo/db/namespace_string.h
parent7e01d162e7d7dec44dfeca42d5e986bd241b2444 (diff)
downloadmongo-718c71966f7a9350cd747604409cd0adb913fb5e.tar.gz
SERVER-34040 Disallow $changeStream on internal databases and system collections
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r--src/mongo/db/namespace_string.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h
index a8fac0a2a58..3e5a0d07793 100644
--- a/src/mongo/db/namespace_string.h
+++ b/src/mongo/db/namespace_string.h
@@ -212,6 +212,9 @@ public:
bool isSystem() const {
return coll().startsWith("system.");
}
+ bool isAdminDB() const {
+ return db() == kAdminDb;
+ }
bool isLocal() const {
return db() == kLocalDb;
}