Add activity logs, sidebar badges, and logout with working alert colors.
Record auth audits and surface them in Activity, poll sidebar counts without resetting idle, and add a profile logout path plus theme red/green/blue tokens so failure badges render.
This commit is contained in:
@@ -140,6 +140,15 @@ func (app *App) mePasswordHandler(writer http.ResponseWriter, request *http.Requ
|
||||
_ = app.Sessions.DestroySession(writer, request)
|
||||
}
|
||||
|
||||
appendAuthAudit(
|
||||
app.ConfigDir,
|
||||
"password_change",
|
||||
settings.AuthAuditOutcomeSuccess,
|
||||
settings.AuthAuditCategorySelf,
|
||||
user.Username,
|
||||
user.Username,
|
||||
"",
|
||||
)
|
||||
writeJSON(writer, http.StatusOK, map[string]bool{"ok": true})
|
||||
}
|
||||
|
||||
@@ -257,6 +266,15 @@ func (app *App) meTOTPConfirmHandler(writer http.ResponseWriter, request *http.R
|
||||
return
|
||||
}
|
||||
|
||||
appendAuthAudit(
|
||||
app.ConfigDir,
|
||||
"totp_enable",
|
||||
settings.AuthAuditOutcomeSuccess,
|
||||
settings.AuthAuditCategorySelf,
|
||||
user.Username,
|
||||
user.Username,
|
||||
"",
|
||||
)
|
||||
writeJSON(writer, http.StatusOK, map[string]bool{"ok": true})
|
||||
}
|
||||
|
||||
@@ -319,5 +337,14 @@ func (app *App) meTOTPDisableHandler(writer http.ResponseWriter, request *http.R
|
||||
return
|
||||
}
|
||||
|
||||
appendAuthAudit(
|
||||
app.ConfigDir,
|
||||
"totp_disable",
|
||||
settings.AuthAuditOutcomeSuccess,
|
||||
settings.AuthAuditCategorySelf,
|
||||
user.Username,
|
||||
user.Username,
|
||||
"",
|
||||
)
|
||||
writeJSON(writer, http.StatusOK, map[string]bool{"ok": true})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user