Skip to content

Commit 6b23b96

Browse files
committed
Improved auditing configuration.
1 parent cf47ba1 commit 6b23b96

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

src/AbpCompanyName.AbpProjectName.Application/Users/Dto/CreateUserInput.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.ComponentModel.DataAnnotations;
22
using Abp.Application.Services.Dto;
3+
using Abp.Auditing;
34
using Abp.Authorization.Users;
45
using Abp.AutoMapper;
56

@@ -27,6 +28,7 @@ public class CreateUserInput : IInputDto
2728

2829
[Required]
2930
[StringLength(User.MaxPlainPasswordLength)]
31+
[DisableAuditing]
3032
public string Password { get; set; }
3133

3234
public bool IsActive { get; set; }

src/AbpCompanyName.AbpProjectName.Core/AbpProjectNameCoreModule.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class AbpProjectNameCoreModule : AbpModule
1616
{
1717
public override void PreInitialize()
1818
{
19+
Configuration.Auditing.IsEnabledForAnonymousUsers = true;
20+
1921
//Declare entity types
2022
Configuration.Modules.Zero().EntityTypes.Tenant = typeof(Tenant);
2123
Configuration.Modules.Zero().EntityTypes.Role = typeof(Role);

src/AbpCompanyName.AbpProjectName.WebSpaAngular/Controllers/AccountController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public ActionResult Login(string returnUrl = "")
7474
}
7575

7676
[HttpPost]
77-
[DisableAuditing]
7877
public async Task<JsonResult> Login(LoginViewModel loginModel, string returnUrl = "", string returnUrlHash = "")
7978
{
8079
CheckModelState();

src/AbpCompanyName.AbpProjectName.WebSpaAngular/Models/Account/LoginViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.ComponentModel.DataAnnotations;
2+
using Abp.Auditing;
23

34
namespace AbpCompanyName.AbpProjectName.WebSpaAngular.Models.Account
45
{
@@ -10,6 +11,7 @@ public class LoginViewModel
1011
public string UsernameOrEmailAddress { get; set; }
1112

1213
[Required]
14+
[DisableAuditing]
1315
public string Password { get; set; }
1416

1517
public bool RememberMe { get; set; }

src/AbpCompanyName.AbpProjectName.WebSpaAngular/Models/Account/RegisterViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.ComponentModel.DataAnnotations;
33
using System.Text.RegularExpressions;
44
using Abp.Application.Services.Dto;
5+
using Abp.Auditing;
56
using AbpCompanyName.AbpProjectName.MultiTenancy;
67
using AbpCompanyName.AbpProjectName.Users;
78

@@ -32,6 +33,7 @@ public class RegisterViewModel : IInputDto, IValidatableObject
3233
public string EmailAddress { get; set; }
3334

3435
[StringLength(User.MaxPlainPasswordLength)]
36+
[DisableAuditing]
3537
public string Password { get; set; }
3638

3739
public bool IsExternalLogin { get; set; }

0 commit comments

Comments
 (0)