diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-09-09 15:33:45 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-09-12 13:58:46 -0400 |
commit | 5d0cb99278bcd6a476fd85b901f37170ce64c2af (patch) | |
tree | 00a660b8ba8213e40ed8f2789df6cf755131be91 /src/mongo/db/auth/authz_manager_external_state_mock.h | |
parent | b7565690f4f3e40df4d959cfcac095d7d85b7a48 (diff) | |
download | mongo-5d0cb99278bcd6a476fd85b901f37170ce64c2af.tar.gz |
SERVER-9980 Add write concern to user management commands
Diffstat (limited to 'src/mongo/db/auth/authz_manager_external_state_mock.h')
-rw-r--r-- | src/mongo/db/auth/authz_manager_external_state_mock.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state_mock.h b/src/mongo/db/auth/authz_manager_external_state_mock.h index 62d053df346..6b19164f1cc 100644 --- a/src/mongo/db/auth/authz_manager_external_state_mock.h +++ b/src/mongo/db/auth/authz_manager_external_state_mock.h @@ -51,13 +51,17 @@ namespace mongo { AuthzManagerExternalStateMock() {}; virtual Status insertPrivilegeDocument(const std::string& dbname, - const BSONObj& userObj); + const BSONObj& userObj, + const BSONObj& writeConcern); virtual Status updatePrivilegeDocument(const UserName& user, - const BSONObj& updateObj); + const BSONObj& updateObj, + const BSONObj& writeConcern); // no-op for the mock - virtual Status removePrivilegeDocuments(const BSONObj& query, int* numRemoved); + virtual Status removePrivilegeDocuments(const BSONObj& query, + const BSONObj& writeConcern, + int* numRemoved); void clearPrivilegeDocuments(); @@ -76,24 +80,31 @@ namespace mongo { // This implementation does not understand uniqueness constraints. virtual Status insert(const NamespaceString& collectionName, - const BSONObj& document); + const BSONObj& document, + const BSONObj& writeConcern); - // This implementation does not understand uniqueness constraints, + // This implementation does not understand uniqueness constraints, ignores writeConcern, // and only correctly handles some upsert behaviors. virtual Status updateOne(const NamespaceString& collectionName, const BSONObj& query, const BSONObj& updatePattern, - bool upsert); + bool upsert, + const BSONObj& writeConcern); virtual Status remove(const NamespaceString& collectionName, - const BSONObj& query); + const BSONObj& query, + const BSONObj& writeConcern); virtual Status createIndex(const NamespaceString& collectionName, const BSONObj& pattern, - bool unique); - virtual Status dropCollection(const NamespaceString& collectionName); + bool unique, + const BSONObj& writeConcern); + virtual Status dropCollection(const NamespaceString& collectionName, + const BSONObj& writeConcern); virtual Status renameCollection(const NamespaceString& oldName, - const NamespaceString& newName); + const NamespaceString& newName, + const BSONObj& writeConcern); virtual Status copyCollection(const NamespaceString& fromName, - const NamespaceString& toName); + const NamespaceString& toName, + const BSONObj& writeConcern); virtual bool tryAcquireAuthzUpdateLock(const StringData& why); virtual void releaseAuthzUpdateLock(); |