summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authz_manager_external_state.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2013-09-09 15:33:45 -0400
committerSpencer T Brody <spencer@10gen.com>2013-09-12 13:58:46 -0400
commit5d0cb99278bcd6a476fd85b901f37170ce64c2af (patch)
tree00a660b8ba8213e40ed8f2789df6cf755131be91 /src/mongo/db/auth/authz_manager_external_state.h
parentb7565690f4f3e40df4d959cfcac095d7d85b7a48 (diff)
downloadmongo-5d0cb99278bcd6a476fd85b901f37170ce64c2af.tar.gz
SERVER-9980 Add write concern to user management commands
Diffstat (limited to 'src/mongo/db/auth/authz_manager_external_state.h')
-rw-r--r--src/mongo/db/auth/authz_manager_external_state.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state.h b/src/mongo/db/auth/authz_manager_external_state.h
index 37d26f854ae..0762e5f075e 100644
--- a/src/mongo/db/auth/authz_manager_external_state.h
+++ b/src/mongo/db/auth/authz_manager_external_state.h
@@ -67,15 +67,19 @@ namespace mongo {
// Creates the given user object in the given database.
// TODO(spencer): remove dbname argument once users are only written into the admin db
virtual Status insertPrivilegeDocument(const std::string& dbname,
- const BSONObj& userObj) = 0;
+ const BSONObj& userObj,
+ const BSONObj& writeConcern) = 0;
// Updates the given user object with the given update modifier.
virtual Status updatePrivilegeDocument(const UserName& user,
- const BSONObj& updateObj) = 0;
+ const BSONObj& updateObj,
+ const BSONObj& writeConcern) = 0;
// Removes users for the given database matching the given query.
// Writes into *numRemoved the number of user documents that were modified.
- virtual Status removePrivilegeDocuments(const BSONObj& query, int* numRemoved) = 0;
+ virtual Status removePrivilegeDocuments(const BSONObj& query,
+ const BSONObj& writeConcern,
+ int* numRemoved) = 0;
/**
* Puts into the *dbnames vector the name of every database in the cluster.
@@ -104,7 +108,8 @@ namespace mongo {
* Inserts "document" into "collectionName".
*/
virtual Status insert(const NamespaceString& collectionName,
- const BSONObj& document) = 0;
+ const BSONObj& document,
+ const BSONObj& writeConcern) = 0;
/**
* Update one document matching "query" according to "updatePattern" in "collectionName".
@@ -115,39 +120,45 @@ namespace mongo {
virtual Status updateOne(const NamespaceString& collectionName,
const BSONObj& query,
const BSONObj& updatePattern,
- bool upsert) = 0;
+ bool upsert,
+ const BSONObj& writeConcern) = 0;
/**
* Removes all documents matching "query" from "collectionName".
*/
virtual Status remove(const NamespaceString& collectionName,
- const BSONObj& query) = 0;
+ const BSONObj& query,
+ const BSONObj& writeConcern) = 0;
/**
* Creates an index with the given pattern on "collectionName".
*/
virtual Status createIndex(const NamespaceString& collectionName,
const BSONObj& pattern,
- bool unique) = 0;
+ bool unique,
+ const BSONObj& writeConcern) = 0;
/**
* Drops the named collection.
*/
- virtual Status dropCollection(const NamespaceString& collectionName) = 0;
+ virtual Status dropCollection(const NamespaceString& collectionName,
+ const BSONObj& writeConcern) = 0;
/**
* Renames collection "oldName" to "newName", possibly dropping the previous
* collection named "newName".
*/
virtual Status renameCollection(const NamespaceString& oldName,
- const NamespaceString& newName) = 0;
+ const NamespaceString& newName,
+ const BSONObj& writeConcern) = 0;
/**
* Copies the contents of collection "fromName" into "toName". Fails
* if "toName" is already a collection.
*/
virtual Status copyCollection(const NamespaceString& fromName,
- const NamespaceString& toName) = 0;
+ const NamespaceString& toName,
+ const BSONObj& writeConcern) = 0;
/**
* Tries to acquire the global lock guarding modifications to all persistent data related