Skip to content

Commit

Permalink
feat(edit-logs): adds 'confidential: true' to confidential changes in…
Browse files Browse the repository at this point in the history
… edit's diff
  • Loading branch information
naholyr committed Sep 8, 2017
1 parent 6f7abe8 commit 3103525
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/routes/editLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,16 @@ function formatEdits(data, model, removeConfidential){
})
}


// Handle confidential changes
const test = isNotConfidentialChange(model)
if (removeConfidential) {
edit.diff = edit.diff.filter(isNotConfidentialChange(model))
edit.diff = edit.diff.filter(test)
}
edit.diff = edit.diff.map(change => test(change)
? change
: Object.assign({}, change, { confidential: true }))

// Handle accessMonitoring on changes
edit.diff = getAccessMonitorings(model, edit.diff)

// TEMPFIX FOR CLIENT
Expand Down

0 comments on commit 3103525

Please sign in to comment.