Browse Source

feat(nocodb): prevent from inserting audit log if NC_DISABLE_AUDIT is true

pull/5137/head
Wing-Kam Wong 2 years ago
parent
commit
c2b1541778
  1. 3
      packages/nocodb/src/lib/models/Audit.ts

3
packages/nocodb/src/lib/models/Audit.ts

@ -44,6 +44,9 @@ export default class Audit implements AuditType {
forceAwait: process.env['TEST'] === 'true', forceAwait: process.env['TEST'] === 'true',
} }
) { ) {
if (process.env['NC_DISABLE_AUDIT'] ?? false) {
return;
}
const insertAudit = async () => { const insertAudit = async () => {
if (!audit.project_id && audit.fk_model_id) { if (!audit.project_id && audit.fk_model_id) {
audit.project_id = ( audit.project_id = (

Loading…
Cancel
Save