diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-08-29 12:49:19 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-09-09 12:54:42 -0400 |
commit | da86d5ed4f14dbd05fa713b530759a11ab9b149c (patch) | |
tree | 205f9046cb887e28a4e853275dcf3d63cabbfe76 /src/mongo/db/auth/authorization_manager.h | |
parent | fe1c74d2656b3609f529842a7c810034671ddea1 (diff) | |
download | mongo-da86d5ed4f14dbd05fa713b530759a11ab9b149c.tar.gz |
SERVER-14668 remove no-OpCtx DBDirectClient and update all former users
Diffstat (limited to 'src/mongo/db/auth/authorization_manager.h')
-rw-r--r-- | src/mongo/db/auth/authorization_manager.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h index 6962e9d137a..b45712847d0 100644 --- a/src/mongo/db/auth/authorization_manager.h +++ b/src/mongo/db/auth/authorization_manager.h @@ -181,14 +181,15 @@ namespace mongo { * * Do not call if getAuthorizationVersion() reports a value other than schemaVersion26Final. */ - Status writeAuthSchemaVersionIfNeeded(); + Status writeAuthSchemaVersionIfNeeded(OperationContext* txn); /** * Creates the given user object in the given database. * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status insertPrivilegeDocument(const std::string& dbname, + Status insertPrivilegeDocument(OperationContext* txn, + const std::string& dbname, const BSONObj& userObj, const BSONObj& writeConcern) const; @@ -197,7 +198,8 @@ namespace mongo { * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status updatePrivilegeDocument(const UserName& user, + Status updatePrivilegeDocument(OperationContext* txn, + const UserName& user, const BSONObj& updateObj, const BSONObj& writeConcern) const; @@ -207,7 +209,8 @@ namespace mongo { * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status removePrivilegeDocuments(const BSONObj& query, + Status removePrivilegeDocuments(OperationContext* txn, + const BSONObj& query, const BSONObj& writeConcern, int* numRemoved) const; @@ -216,14 +219,17 @@ namespace mongo { * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status insertRoleDocument(const BSONObj& roleObj, const BSONObj& writeConcern) const; + Status insertRoleDocument(OperationContext* txn, + const BSONObj& roleObj, + const BSONObj& writeConcern) const; /** * Updates the given role object with the given update modifier. * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status updateRoleDocument(const RoleName& role, + Status updateRoleDocument(OperationContext* txn, + const RoleName& role, const BSONObj& updateObj, const BSONObj& writeConcern) const; @@ -232,7 +238,8 @@ namespace mongo { * Should only be called on collections with authorization documents in them * (ie admin.system.users and admin.system.roles). */ - Status updateAuthzDocuments(const NamespaceString& collectionName, + Status updateAuthzDocuments(OperationContext* txn, + const NamespaceString& collectionName, const BSONObj& query, const BSONObj& updatePattern, bool upsert, @@ -246,7 +253,8 @@ namespace mongo { * 'writeConcern' contains the arguments to be passed to getLastError to block for * successful completion of the write. */ - Status removeRoleDocuments(const BSONObj& query, + Status removeRoleDocuments(OperationContext* txn, + const BSONObj& query, const BSONObj& writeConcern, int* numRemoved) const; |