feat(auth): add PasswordChanged audit action and ChangePasswordRequest DTO
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace ROLAC.API.DTOs.Auth;
|
||||||
|
|
||||||
|
public class ChangePasswordRequest
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string CurrentPassword { get; set; } = null!;
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
[MinLength(8)]
|
||||||
|
[MaxLength(128)]
|
||||||
|
public string NewPassword { get; set; } = null!;
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@ public static class AuditActions
|
|||||||
public const string Logout = "Logout";
|
public const string Logout = "Logout";
|
||||||
public const string LoginFailed = "LoginFailed";
|
public const string LoginFailed = "LoginFailed";
|
||||||
public const string RoleChanged = "RoleChanged";
|
public const string RoleChanged = "RoleChanged";
|
||||||
|
public const string PasswordChanged = "PasswordChanged";
|
||||||
public const string UserDeactivated = "UserDeactivated";
|
public const string UserDeactivated = "UserDeactivated";
|
||||||
public const string PermissionChanged = "PermissionChanged";
|
public const string PermissionChanged = "PermissionChanged";
|
||||||
public const string CheckIssued = "CheckIssued";
|
public const string CheckIssued = "CheckIssued";
|
||||||
@@ -55,8 +56,8 @@ public static class AuditActions
|
|||||||
public static readonly IReadOnlyList<string> All =
|
public static readonly IReadOnlyList<string> All =
|
||||||
[
|
[
|
||||||
Create, Update, Delete, Login, Logout, LoginFailed, RoleChanged,
|
Create, Update, Delete, Login, Logout, LoginFailed, RoleChanged,
|
||||||
UserDeactivated, PermissionChanged, CheckIssued, CheckVoided,
|
PasswordChanged, UserDeactivated, PermissionChanged, CheckIssued,
|
||||||
ExpenseApproved, StatementFinalized,
|
CheckVoided, ExpenseApproved, StatementFinalized,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user