|
|
|
@ -41,6 +41,7 @@ class AuthMixin:
|
|
|
|
|
history_passwords: models.Manager
|
|
|
|
|
need_update_password: bool
|
|
|
|
|
public_key: str
|
|
|
|
|
username: str
|
|
|
|
|
is_local: bool
|
|
|
|
|
set_password: Callable
|
|
|
|
|
save: Callable
|
|
|
|
@ -63,9 +64,10 @@ 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)
|
|
|
|
|
super().set_password(raw_password) # noqa
|
|
|
|
|
|
|
|
|
|
def set_public_key(self, public_key):
|
|
|
|
|
if self.can_update_ssh_key():
|
|
|
|
|