mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-23 04:20:27 +00:00
@@ -18,7 +18,9 @@ class ConfirmType(TextChoices):
|
||||
@classmethod
|
||||
def get_can_confirm_types(cls, confirm_type):
|
||||
start = cls.values.index(confirm_type)
|
||||
return cls.values[start:]
|
||||
types = cls.values[start:]
|
||||
types.reverse()
|
||||
return types
|
||||
|
||||
@classmethod
|
||||
def get_can_confirm_backend_classes(cls, confirm_type):
|
||||
|
@@ -7,4 +7,4 @@ from ..const import ConfirmType, MFAType
|
||||
class ConfirmSerializer(serializers.Serializer):
|
||||
confirm_type = serializers.ChoiceField(required=True, allow_blank=True, choices=ConfirmType.choices)
|
||||
mfa_type = serializers.ChoiceField(required=False, allow_blank=True, choices=MFAType.choices)
|
||||
secret_key = EncryptedField()
|
||||
secret_key = EncryptedField(allow_blank=True)
|
||||
|
Reference in New Issue
Block a user