mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Adds audit log entry for user Logout event
GitOrigin-RevId: 5a305166ba0e017ae7cb3d426cdae541e8db62c3
This commit is contained in:
@@ -473,6 +473,16 @@ async function doLogout(req) {
|
||||
logger.debug({ user }, 'logging out')
|
||||
const sessionId = req.sessionID
|
||||
|
||||
if (user != null) {
|
||||
UserAuditLogHandler.addEntryInBackground(
|
||||
user._id,
|
||||
'logout',
|
||||
user._id,
|
||||
req.ip,
|
||||
{}
|
||||
)
|
||||
}
|
||||
|
||||
if (typeof req.logout === 'function') {
|
||||
// passport logout
|
||||
const logout = promisify(req.logout.bind(req))
|
||||
|
||||
Reference in New Issue
Block a user