feat(PROJ-51): Aufbewahrungsfristen nach Dokumentenart (Retention-Kategorien)
Fuehrt archiving_rules ein (PROJ-43-Basis: Tabelle + CRUD-API + Admin-UI) und erweitert die Retention-Logik (PROJ-34) um Regel-basierte Fristen, eine globale Mindestfrist (min_retention_days) sowie Nachvollziehbarkeit der Frist-Quelle (retain_until_source) in API und Mail-Detailansicht.
This commit is contained in:
@@ -325,6 +325,18 @@ func (s *Server) handleGetMail(w http.ResponseWriter, r *http.Request) {
|
||||
ocrStatus = "pending"
|
||||
}
|
||||
|
||||
// PROJ-51: retention lock + its source for auditor traceability.
|
||||
var retainUntil interface{} = nil
|
||||
var retainSource interface{} = nil
|
||||
if until, source, rerr := s.store.GetRetentionInfo(r.Context(), id); rerr == nil {
|
||||
if until != nil {
|
||||
retainUntil = until.UTC().Format(time.RFC3339)
|
||||
}
|
||||
if source != "" {
|
||||
retainSource = source
|
||||
}
|
||||
}
|
||||
|
||||
writeJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"id": id,
|
||||
"from": pm.From,
|
||||
@@ -342,6 +354,8 @@ func (s *Server) handleGetMail(w http.ResponseWriter, r *http.Request) {
|
||||
"thread_id": threadID,
|
||||
"ocr_status": ocrStatus,
|
||||
"ocr_chars": ocrChars,
|
||||
"retain_until": retainUntil,
|
||||
"retain_until_source": retainSource,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user