diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2022-08-23 14:21:49 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-23 13:03:38 +0000 |
commit | a5c99e5fd1efbfcb203ba2ab2d7c422d5fa1434a (patch) | |
tree | 4a3e1dbb10dc67dd42236bf24df68a53a7a8fbfd /src/mongo/db/auth | |
parent | 4ed275ae52bba8f4fdfbe025f42a52b46d3a218d (diff) | |
download | mongo-a5c99e5fd1efbfcb203ba2ab2d7c422d5fa1434a.tar.gz |
SERVER-67900 Thread CollectionPtr into the onInsert OpObserver
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r-- | src/mongo/db/auth/auth_op_observer.cpp | 7 | ||||
-rw-r--r-- | src/mongo/db/auth/auth_op_observer.h | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/db/auth/auth_op_observer.cpp b/src/mongo/db/auth/auth_op_observer.cpp index 922069978e7..b974eda9973 100644 --- a/src/mongo/db/auth/auth_op_observer.cpp +++ b/src/mongo/db/auth/auth_op_observer.cpp @@ -51,15 +51,14 @@ AuthOpObserver::AuthOpObserver() = default; AuthOpObserver::~AuthOpObserver() = default; void AuthOpObserver::onInserts(OperationContext* opCtx, - const NamespaceString& nss, - const UUID& uuid, + const CollectionPtr& coll, std::vector<InsertStatement>::const_iterator first, std::vector<InsertStatement>::const_iterator last, bool fromMigrate) { for (auto it = first; it != last; it++) { - audit::logInsertOperation(opCtx->getClient(), nss, it->doc); + audit::logInsertOperation(opCtx->getClient(), coll->ns(), it->doc); AuthorizationManager::get(opCtx->getServiceContext()) - ->logOp(opCtx, "i", nss, it->doc, nullptr); + ->logOp(opCtx, "i", coll->ns(), it->doc, nullptr); } } diff --git a/src/mongo/db/auth/auth_op_observer.h b/src/mongo/db/auth/auth_op_observer.h index 480ee25ec79..1d92efbd197 100644 --- a/src/mongo/db/auth/auth_op_observer.h +++ b/src/mongo/db/auth/auth_op_observer.h @@ -78,8 +78,7 @@ public: bool fromMigrate) final {} void onInserts(OperationContext* opCtx, - const NamespaceString& nss, - const UUID& uuid, + const CollectionPtr& coll, std::vector<InsertStatement>::const_iterator first, std::vector<InsertStatement>::const_iterator last, bool fromMigrate) final; |