From c2b1541778993a5e99991832305dc56998f7445d Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Feb 2023 18:43:52 +0800 Subject: [PATCH] feat(nocodb): prevent from inserting audit log if NC_DISABLE_AUDIT is true --- packages/nocodb/src/lib/models/Audit.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nocodb/src/lib/models/Audit.ts b/packages/nocodb/src/lib/models/Audit.ts index ae2c9f2f6a..3b8eb43d1a 100644 --- a/packages/nocodb/src/lib/models/Audit.ts +++ b/packages/nocodb/src/lib/models/Audit.ts @@ -44,6 +44,9 @@ export default class Audit implements AuditType { forceAwait: process.env['TEST'] === 'true', } ) { + if (process.env['NC_DISABLE_AUDIT'] ?? false) { + return; + } const insertAudit = async () => { if (!audit.project_id && audit.fk_model_id) { audit.project_id = (