Phase 10, part 6: Settings → Connections, with who connected each

Admins see every service Supermarket uses, whether it's connected,
failing or not set up, when it was last tested (every Test button now
records its result), and who connected or removed it and when. Keys and
sign-ins saved from the settings pages record the person; refreshed
tokens don't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:15:43 -07:00
co-authored by Claude Opus 5.5
parent 2b9d04297f
commit a4dd36f5a4
12 changed files with 364 additions and 8 deletions
+4 -2
View File
@@ -173,7 +173,7 @@ func (s *Server) searchSettingsSave(w http.ResponseWriter, r *http.Request) {
return
}
if r.PostForm.Get("remove:"+secrets.GoogleRefreshToken) == "on" {
if err := s.Secrets.Set(map[string]string{secrets.GoogleRefreshToken: ""}); err != nil {
if err := s.setSecrets(r, map[string]string{secrets.GoogleRefreshToken: ""}); err != nil {
s.serverError(w, err)
return
}
@@ -714,5 +714,7 @@ func (s *Server) weeklyAudits(now time.Time) {
func (s *Server) giteaTest(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
defer cancel()
s.fragment(w, r, "sources", "test-result", s.testGitea(ctx))
data := s.testGitea(ctx)
s.noteCheck("gitea", data)
s.fragment(w, r, "sources", "test-result", data)
}