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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user