feat: task trash, triage trash and retention settings for every area; admin can forbid keeping things for good
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m39s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-11-01 15:44:34 +01:00
1 parent a927a94a95
commit 5a9c5bac37
36 files changed
+1356 -175

No files matched your search

+14 -1
View File
@@ -340,6 +340,11 @@ func (s *Server) settingsForBrowser(settings *domain.SystemSettings) *domain.Sys
out.RegistrationVerifyEmail = s.cfg.RegistrationVerifyEmail == "true"
out.RegistrationVerifyViaEnv = true
}
if s.cfg.RetentionAllowNever != nil {
allow := *s.cfg.RetentionAllowNever
out.RetentionAllowNever = &allow
out.RetentionNeverViaEnv = true
}
out.EmailLinksAvailable = s.emailLinksAvailable()
return &out
}
@@ -372,6 +377,10 @@ func (s *Server) handleAdminUpdateSettings(w http.ResponseWriter, r *http.Reques
settings.RegistrationVerifyEmail = cur.RegistrationVerifyEmail
}
}
if s.cfg.RetentionAllowNever != nil {
settings.RetentionAllowNever = nil // fixed by RETENTION_ALLOW_NEVER, the stored value stays
}
settings.RetentionNeverViaEnv = false
previousMode := s.store.SharingMode()
if err := s.store.UpdateSystemSettings(&settings); err != nil {
writeError(w, http.StatusInternalServerError, err.Error())
@@ -384,7 +393,11 @@ func (s *Server) handleAdminUpdateSettings(w http.ResponseWriter, r *http.Reques
return
}
}
writeJSON(w, http.StatusOK, s.settingsForBrowser(&settings))
saved, _ := s.store.GetSystemSettings()
if saved == nil {
saved = &settings
}
writeJSON(w, http.StatusOK, s.settingsForBrowser(saved))
}
func (s *Server) handleAdminTestSMTP(w http.ResponseWriter, r *http.Request) {