summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authz_manager_external_state_d.h
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2013-08-23 17:13:35 -0400
committerAndy Schwerin <schwerin@10gen.com>2013-09-03 18:14:01 -0400
commit5fb2c2c35426d907057bccf6ffefec0493897af6 (patch)
tree3f4106feb72f3d3eb1f769a98c9b12de65dad785 /src/mongo/db/auth/authz_manager_external_state_d.h
parent2f0c929ee17921cf122a3f3fb73f826841126a0c (diff)
downloadmongo-5fb2c2c35426d907057bccf6ffefec0493897af6.tar.gz
SERVER-9516 Logic of system.users schema upgrade process.
Includes AuthorizationManagerExternalState interface changes and implementation in the mock, plus unit tests.
Diffstat (limited to 'src/mongo/db/auth/authz_manager_external_state_d.h')
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_d.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state_d.h b/src/mongo/db/auth/authz_manager_external_state_d.h
index e4cac9da17a..1d0b0eb9d8e 100644
--- a/src/mongo/db/auth/authz_manager_external_state_d.h
+++ b/src/mongo/db/auth/authz_manager_external_state_d.h
@@ -36,23 +36,45 @@ namespace mongo {
virtual ~AuthzManagerExternalStateMongod();
virtual Status insertPrivilegeDocument(const std::string& dbname,
- const BSONObj& userObj) const;
+ const BSONObj& userObj);
virtual Status updatePrivilegeDocument(const UserName& user,
- const BSONObj& updateObj) const;
+ const BSONObj& updateObj);
virtual Status removePrivilegeDocuments(const std::string& dbname,
- const BSONObj& query) const;
+ const BSONObj& query);
- virtual Status getAllDatabaseNames(std::vector<std::string>* dbnames) const;
+ virtual Status getAllDatabaseNames(std::vector<std::string>* dbnames);
virtual Status getAllV1PrivilegeDocsForDB(const std::string& dbname,
- std::vector<BSONObj>* privDocs) const;
+ std::vector<BSONObj>* privDocs);
+
+ virtual Status findOne(const NamespaceString& collectionName,
+ const BSONObj& query,
+ BSONObj* result);
+ virtual Status insert(const NamespaceString& collectionName,
+ const BSONObj& document);
+ virtual Status updateOne(const NamespaceString& collectionName,
+ const BSONObj& query,
+ const BSONObj& updatePattern,
+ bool upsert);
+ virtual Status remove(const NamespaceString& collectionName,
+ const BSONObj& query);
+ virtual Status createIndex(const NamespaceString& collectionName,
+ const BSONObj& pattern,
+ bool unique);
+ virtual Status dropCollection(const NamespaceString& collectionName);
+ virtual Status renameCollection(const NamespaceString& oldName,
+ const NamespaceString& newName);
+ virtual Status copyCollection(const NamespaceString& fromName,
+ const NamespaceString& toName);
+ virtual bool tryLockUpgradeProcess();
+ virtual void unlockUpgradeProcess();
protected:
virtual Status _findUser(const string& usersNamespace,
const BSONObj& query,
- BSONObj* result) const;
+ BSONObj* result);
};
} // namespace mongo