diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-04-02 06:18:06 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2018-04-04 17:00:32 +0100 |
commit | 718c71966f7a9350cd747604409cd0adb913fb5e (patch) | |
tree | b2b26a2d91de68867e623ab6c3e04136d4049f11 /src/mongo/db/namespace_string.h | |
parent | 7e01d162e7d7dec44dfeca42d5e986bd241b2444 (diff) | |
download | mongo-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.h | 3 |
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; } |