Merge pull request #5366 from overleaf/jk-move-password-reset-audit-log
[web] audit password reset before taking action GitOrigin-RevId: 672f712658b4669a5a750dbc6f97d24ce35c332d
This commit is contained in:
@@ -93,11 +93,6 @@ async function setNewUserPassword(token, password, auditLog) {
|
||||
}
|
||||
}
|
||||
|
||||
const reset = await AuthenticationManager.promises.setUserPassword(
|
||||
user,
|
||||
password
|
||||
)
|
||||
|
||||
await UserAuditLogHandler.promises.addEntry(
|
||||
user._id,
|
||||
'reset-password',
|
||||
@@ -105,6 +100,11 @@ async function setNewUserPassword(token, password, auditLog) {
|
||||
auditLog.ip
|
||||
)
|
||||
|
||||
const reset = await AuthenticationManager.promises.setUserPassword(
|
||||
user,
|
||||
password
|
||||
)
|
||||
|
||||
return { found: true, reset, userId: user._id }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user