summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-04-09 17:33:03 -0400
committerEliot Horowitz <eliot@10gen.com>2014-04-10 14:47:36 -0400
commitfcbc6d24f26f91dab380245ca556c0ebbe4960b2 (patch)
treea246b7e19e85dc386cca68e518b808ce4d67308e /src/mongo/db/namespace_string.h
parentab19203faf2c00da23b06e7461764aec7d96102c (diff)
downloadmongo-fcbc6d24f26f91dab380245ca556c0ebbe4960b2.tar.gz
SERVER-13084: move legalClientSystemNS into namespace_string
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r--src/mongo/db/namespace_string.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h
index d1679eb01a1..85c89f6fab9 100644
--- a/src/mongo/db/namespace_string.h
+++ b/src/mongo/db/namespace_string.h
@@ -42,6 +42,12 @@ namespace mongo {
const size_t MaxDatabaseNameLen = 128; // max str len for the db name, including null char
+ /** @return true if a client can modify this namespace even though it is under ".system."
+ For example <dbname>.system.users is ok for regular clients to update.
+ @param write used when .system.js
+ */
+ bool legalClientSystemNS( const StringData& ns , bool write );
+
/* e.g.
NamespaceString ns("acme.orders");
cout << ns.coll; // "orders"