summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2016-01-06 18:06:16 -0500
committerDianna Hohensee <dianna.hohensee@10gen.com>2016-01-15 15:23:14 -0500
commit2d8008289b9d075c56841dc08830bb7cff28aeaf (patch)
tree4b382af4f4f65765f55661b9a54a62f988e3a494 /src/mongo/db/auth
parent64a7daba1746dcda0f7d25eab82d35e2c093d54f (diff)
downloadmongo-2d8008289b9d075c56841dc08830bb7cff28aeaf.tar.gz
SERVER-22057 refactor OpObserver::onUpdate and MigrationSourceManager::logUpdateOp to directly take the updated document
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/authorization_manager.cpp2
-rw-r--r--src/mongo/db/auth/authorization_manager.h2
-rw-r--r--src/mongo/db/auth/authz_manager_external_state.h7
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_local.cpp2
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_local.h2
5 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp
index 37136f69114..0c93337e8f0 100644
--- a/src/mongo/db/auth/authorization_manager.cpp
+++ b/src/mongo/db/auth/authorization_manager.cpp
@@ -715,7 +715,7 @@ void AuthorizationManager::_invalidateRelevantCacheData(const char* op,
}
void AuthorizationManager::logOp(
- OperationContext* txn, const char* op, const char* ns, const BSONObj& o, BSONObj* o2) {
+ OperationContext* txn, const char* op, const char* ns, const BSONObj& o, const BSONObj* o2) {
_externalState->logOp(txn, op, ns, o, o2);
if (appliesToAuthzData(op, ns, o)) {
_invalidateRelevantCacheData(op, ns, o, o2);
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h
index 995207723c8..49b7cfb9a78 100644
--- a/src/mongo/db/auth/authorization_manager.h
+++ b/src/mongo/db/auth/authorization_manager.h
@@ -312,7 +312,7 @@ public:
const char* opstr,
const char* ns,
const BSONObj& obj,
- BSONObj* patt);
+ const BSONObj* patt);
private:
/**
diff --git a/src/mongo/db/auth/authz_manager_external_state.h b/src/mongo/db/auth/authz_manager_external_state.h
index 0efac6ec80b..78aac5ea832 100644
--- a/src/mongo/db/auth/authz_manager_external_state.h
+++ b/src/mongo/db/auth/authz_manager_external_state.h
@@ -132,8 +132,11 @@ public:
*/
virtual bool hasAnyPrivilegeDocuments(OperationContext* txn) = 0;
- virtual void logOp(
- OperationContext* txn, const char* op, const char* ns, const BSONObj& o, BSONObj* o2) {}
+ virtual void logOp(OperationContext* txn,
+ const char* op,
+ const char* ns,
+ const BSONObj& o,
+ const BSONObj* o2) {}
protected:
diff --git a/src/mongo/db/auth/authz_manager_external_state_local.cpp b/src/mongo/db/auth/authz_manager_external_state_local.cpp
index 674a06cfb6b..f3d4453e9fa 100644
--- a/src/mongo/db/auth/authz_manager_external_state_local.cpp
+++ b/src/mongo/db/auth/authz_manager_external_state_local.cpp
@@ -423,7 +423,7 @@ private:
};
void AuthzManagerExternalStateLocal::logOp(
- OperationContext* txn, const char* op, const char* ns, const BSONObj& o, BSONObj* o2) {
+ OperationContext* txn, const char* op, const char* ns, const BSONObj& o, const BSONObj* o2) {
if (ns == AuthorizationManager::rolesCollectionNamespace.ns() ||
ns == AuthorizationManager::adminCommandNamespace.ns()) {
txn->recoveryUnit()->registerChange(new AuthzManagerLogOpHandler(this, op, ns, o, o2));
diff --git a/src/mongo/db/auth/authz_manager_external_state_local.h b/src/mongo/db/auth/authz_manager_external_state_local.h
index 954374cf961..4b90bb3170d 100644
--- a/src/mongo/db/auth/authz_manager_external_state_local.h
+++ b/src/mongo/db/auth/authz_manager_external_state_local.h
@@ -95,7 +95,7 @@ public:
const stdx::function<void(const BSONObj&)>& resultProcessor) = 0;
virtual void logOp(
- OperationContext* txn, const char* op, const char* ns, const BSONObj& o, BSONObj* o2);
+ OperationContext* txn, const char* op, const char* ns, const BSONObj& o, const BSONObj* o2);
protected:
AuthzManagerExternalStateLocal() = default;