Skip to content

Commit

Permalink
log modifications with success: true
Browse files Browse the repository at this point in the history
  • Loading branch information
sjvans committed Aug 17, 2023
1 parent 9b1134d commit c65de5e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions srv/log2restv2.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ module.exports = class AuditLog2RESTv2 extends AuditLogService {
const { event, data } = req

// event.match() is used to support the old event names
if (event === 'SensitiveDataRead' || event.match(/^dataAccess/i)) return this._handle(data, 'DATA_ACCESS')
if (event === 'PersonalDataModified' || event.match(/^dataModification/i))
if (event === 'SensitiveDataRead' || event.match(/^dataAccess/i)) {
return this._handle(data, 'DATA_ACCESS')
}
if (event === 'PersonalDataModified' || event.match(/^dataModification/i)) {
data.success = true
return this._handle(data, 'DATA_MODIFICATION')
if (event === 'ConfigurationModified' || event.match(/^configChange/i))
}
if (event === 'ConfigurationModified' || event.match(/^configChange/i)) {
data.success = true
return this._handle(data, 'CONFIGURATION_CHANGE')
}
if (event === 'SecurityEvent' || event.match(/^security/i)) {
if (typeof data.data === 'object') data.data = JSON.stringify(data.data)
return this._handle(data, 'SECURITY_EVENT')
Expand Down

0 comments on commit c65de5e

Please sign in to comment.