mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 01:11:57 +00:00
[Update] 修改mfa
This commit is contained in:
@@ -172,7 +172,7 @@ class UserResetOTPApi(UserQuerysetMixin, generics.RetrieveAPIView):
|
||||
if user == request.user:
|
||||
msg = _("Could not reset self otp, use profile reset instead")
|
||||
return Response({"error": msg}, status=401)
|
||||
if user.otp_enabled and user.otp_secret_key:
|
||||
if user.mfa_enabled and user.otp_secret_key:
|
||||
user.otp_secret_key = ''
|
||||
user.save()
|
||||
logout(request)
|
||||
|
Reference in New Issue
Block a user