Disable user lockout
See original GitHub issueI want to disable user lockout by default for all users.
I already checked some ways but no success.
Firstly, i set IsLockoutEnabled = false
in User
class, but when i create user, this column value is 1 in DB.
public override async Task<UserDto> Create(CreateUserDto input)
{
CheckCreatePermission();
var user = ObjectMapper.Map<User>(input);
user.TenantId = AbpSession.TenantId;
user.Password = new PasswordHasher().HashPassword(input.Password);
user.IsEmailConfirmed = true;
//Assign roles
user.Roles = new Collection<UserRole>();
foreach (var roleName in input.RoleNames)
{
var role = await _roleManager.GetRoleByNameAsync(roleName);
user.Roles.Add(new UserRole(AbpSession.TenantId, user.Id, role.Id));
}
CheckErrors(await _userManager.CreateAsync(user));
return MapToEntityDto(user);
}
Here, UserAppService Create method, before CheckErrors method call IsLockoutEnabled is set to false, but after that line it is true.
Then, i checked to set UserLockoutEnabledByDefault
to false in UserManager class, but again it is 1 in DB, when user created.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
disable the account lockout policy for one user
hi community. I want disable the account lockout policy for one local user only. All local users should have account lockout after 4...
Read more >Account Lockout Policy - Windows Security
The Account Lockout Policy settings can be configured in the following location in the Group Policy Management Console: Computer Configuration\ ...
Read more >Enable or Disable Built-in Administrator Account Lockout ...
1 Open Local Security Policy (secpol. · 2 Double click/tap on Account Policies in the left pane to expand, and click/tap on Account...
Read more >How can I disable account lockout policy for one user in a ...
There are legitimate use cases for disabling lock out on a single account. A significant amount of releases and migrations are not thoroughly ......
Read more >How to Configure Account Lockout Policy in Active Directory?
Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Account Lockout Policy. gpo lockout ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/aspnetboilerplate/aspnetboilerplate/blob/d6765239d0003af4e2cce78fbaa33fe1c9c8377a/src/Abp.ZeroCore/Authorization/Users/AbpUserManager.cs#L599
https://github.com/aspnetboilerplate/aspnetboilerplate/blob/e0ded5d8702f389aa1f5947d3446f16aec845287/src/Abp.Zero.Common/Zero/Configuration/AbpZeroSettingProvider.cs#L60-L64
See AspNetCore Identity document,
AllowedForNewUsers
defaults totrue
. You need to change tofalse