Enhance audit logging: add new audit types for password reset and prospect image actions, and update related services to log these events

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
a.beging@eas-solutions.de
2026-04-29 15:57:30 +02:00
parent 0dd0c1bf4c
commit 6807f2b6e6
7 changed files with 71 additions and 3 deletions

View File

@@ -151,8 +151,14 @@ namespace FoodsharingSiegen.Server.Data.Service
if (saveR < 1) return new(new Exception("Fehler beim Speichern"));
var auditData = CurrentUser?.Id == user.Id ? "sich selbst" : user.Mail;
await AuditService.Insert(AuditType.SetUserPassword, auditData);
if (CurrentUser?.Id == user.Id)
{
await AuditService.Insert(AuditType.ChangeOwnPassword);
}
else
{
await AuditService.Insert(AuditType.SetUserPassword, user.Mail);
}
return new();
}