mirror of https://github.com/jumpserver/jumpserver
fix: 修复重置 mfa 的提示问题
parent
85a017b2c4
commit
62cbca7eb2
|
@ -207,7 +207,7 @@ class UserResetMFAApi(UserQuerysetMixin, generics.RetrieveAPIView):
|
||||||
user = self.get_object() if kwargs.get('pk') else request.user
|
user = self.get_object() if kwargs.get('pk') else request.user
|
||||||
if user == request.user:
|
if user == request.user:
|
||||||
msg = _("Could not reset self otp, use profile reset instead")
|
msg = _("Could not reset self otp, use profile reset instead")
|
||||||
return Response({"error": msg}, status=401)
|
return Response({"error": msg}, status=400)
|
||||||
|
|
||||||
backends = user.active_mfa_backends_mapper
|
backends = user.active_mfa_backends_mapper
|
||||||
for backend in backends.values():
|
for backend in backends.values():
|
||||||
|
|
Loading…
Reference in New Issue