summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2022-08-23 14:21:49 +0200
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-23 13:03:38 +0000
commita5c99e5fd1efbfcb203ba2ab2d7c422d5fa1434a (patch)
tree4a3e1dbb10dc67dd42236bf24df68a53a7a8fbfd /src/mongo/db/auth
parent4ed275ae52bba8f4fdfbe025f42a52b46d3a218d (diff)
downloadmongo-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.cpp7
-rw-r--r--src/mongo/db/auth/auth_op_observer.h3
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;