[web] Add auditing of email removals (#8904)

* [web] Add auditing of email removals

* [web] Improve auditing of email removal from script

GitOrigin-RevId: ccb948f01616a0bcb2d8f718d6b9e69585e8bb89
This commit is contained in:
Mathias Jakobsen
2022-07-27 12:17:31 +00:00
committed by Copybot
parent eb63eadca1
commit e0c23d83da
7 changed files with 146 additions and 15 deletions
+14 -1
View File
@@ -47,6 +47,19 @@ async function removeEmail() {
)
}
const auditLog = {
initiatorId: undefined,
ipAddress: '0.0.0.0',
extraInfo: {
script: true,
},
}
const skipParseEmail = true
await UserUpdater.promises.removeEmailAddress(userId, email, skipParseEmail)
await UserUpdater.promises.removeEmailAddress(
userId,
email,
auditLog,
skipParseEmail
)
}