Audit the last few backoffice user events

This commit is contained in:
Kenn Jacobsen
2021-03-01 20:31:04 +01:00
parent 67bd36e950
commit 335a62164c
4 changed files with 26 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ namespace Umbraco.Cms.Web.Common.Security
IdentityResult result = await base.ChangePasswordWithResetAsync(userId, token, newPassword);
if (result.Succeeded)
{
NotifyPasswordChanged(_httpContextAccessor.HttpContext?.User, userId);
NotifyPasswordReset(_httpContextAccessor.HttpContext?.User, userId);
}
return result;
@@ -225,6 +225,10 @@ namespace Umbraco.Cms.Web.Common.Security
(currentUserId, ip) => new UserPasswordChangedNotification(ip, userId, currentUserId)
);
public void NotifyPasswordReset(IPrincipal currentUser, string userId) => Notify(currentUser,
(currentUserId, ip) => new UserPasswordResetNotification(ip, userId, currentUserId)
);
public void NotifyResetAccessFailedCount(IPrincipal currentUser, string userId) => Notify(currentUser,
(currentUserId, ip) => new UserResetAccessFailedCountNotification(ip, userId, currentUserId)
);