mirror of https://github.com/jumpserver/jumpserver
fix: 解决第三方登录一个不存在的本地用户时,改密日志会增加的问题
parent
132954ca81
commit
7e87f0bbf5
|
@ -34,6 +34,7 @@ class AuthMixin:
|
|||
history_passwords: models.Manager
|
||||
need_update_password: bool
|
||||
public_key: str
|
||||
username: str
|
||||
is_local: bool
|
||||
set_password: Callable
|
||||
save: Callable
|
||||
|
@ -54,6 +55,7 @@ class AuthMixin:
|
|||
|
||||
def set_password(self, raw_password):
|
||||
if self.can_update_password():
|
||||
if self.username:
|
||||
self.date_password_last_updated = timezone.now()
|
||||
post_user_change_password.send(self.__class__, user=self)
|
||||
super().set_password(raw_password)
|
||||
|
|
Loading…
Reference in New Issue