fix(audit): fehlende Audit-Logs für DNS-Zone/Record-Delete + NTP-Pool-Delete

DeleteZone, DeleteRecord und NTPPool.DeletePool hatten keine Audit-
Einträge. Alle anderen Mutations derselben Handler loggen korrekt —
nur Delete war vergessen worden. Jetzt konsistent:
  dns.zone.delete, dns.record.delete, ntp.pool.delete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-28 14:57:35 +02:00
parent 1c39a0e533
commit a6ef320c57
6 changed files with 11 additions and 4 deletions

View File

@@ -150,6 +150,8 @@ func (h *DNSHandler) DeleteZone(c *gin.Context) {
response.Internal(c, err)
return
}
_ = h.Audit.Log(c.Request.Context(), actorOf(c), "dns.zone.delete",
strconv.FormatInt(id, 10), gin.H{"id": id}, h.NodeID)
response.NoContent(c)
h.reload(c.Request.Context(), "zone.delete")
}
@@ -261,6 +263,8 @@ func (h *DNSHandler) DeleteRecord(c *gin.Context) {
response.Internal(c, err)
return
}
_ = h.Audit.Log(c.Request.Context(), actorOf(c), "dns.record.delete",
strconv.FormatInt(id, 10), gin.H{"id": id}, h.NodeID)
response.NoContent(c)
h.reload(c.Request.Context(), "record.delete")
}