Unverified Commit 3a812c22 authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

Merge pull request #3456 from jumpserver/dev_bai

[Update] 发送重置密钥邮件时,清除用户公钥
parents 72ea036a f47781a3
......@@ -119,7 +119,7 @@ class UserResetPKApi(UserQuerysetMixin, generics.UpdateAPIView):
def perform_update(self, serializer):
from ..utils import send_reset_ssh_key_mail
user = self.get_object()
user.is_public_key_valid = False
user.public_key = None
user.save()
send_reset_ssh_key_mail(user)
......
......@@ -142,7 +142,6 @@ class UserFirstLoginView(PermissionsMixin, SessionWizardView):
if field.value():
setattr(user, field.name, field.value())
user.is_first_login = False
user.is_public_key_valid = True
user.save()
context = {
'user_guide_url': settings.USER_GUIDE_URL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment