功能变化: 登录加入判断,超过5次账号密码不正确则锁定

This commit is contained in:
猿小天
2024-05-21 21:46:11 +08:00
parent 767cbbe366
commit 3786b4123b
3 changed files with 38 additions and 29 deletions

View File

@@ -70,6 +70,7 @@ class Users(CoreModel, AbstractUser):
blank=True,
help_text="关联部门",
)
login_error_count = models.IntegerField(default=0, verbose_name="登录错误次数", help_text="登录错误次数")
objects = CustomUserManager()
def set_password(self, raw_password):