2019-12-05 07:09:25 +00:00
|
|
|
# coding: utf-8
|
2022-05-11 09:09:23 +00:00
|
|
|
#
|
2019-12-05 07:09:25 +00:00
|
|
|
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
2022-05-06 08:27:14 +00:00
|
|
|
__all__ = ['PublicSettingSerializer', 'PrivateSettingSerializer']
|
2019-12-05 07:09:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PublicSettingSerializer(serializers.Serializer):
|
2022-05-06 08:27:14 +00:00
|
|
|
XPACK_ENABLED = serializers.BooleanField()
|
2022-07-05 06:43:56 +00:00
|
|
|
INTERFACE = serializers.DictField()
|
2022-05-06 08:27:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PrivateSettingSerializer(PublicSettingSerializer):
|
|
|
|
WINDOWS_SKIP_ALL_MANUAL_PASSWORD = serializers.BooleanField()
|
|
|
|
OLD_PASSWORD_HISTORY_LIMIT_COUNT = serializers.IntegerField()
|
2022-07-22 07:23:16 +00:00
|
|
|
TICKET_AUTHORIZE_DEFAULT_TIME = serializers.IntegerField()
|
2022-11-15 09:30:29 +00:00
|
|
|
TICKET_AUTHORIZE_DEFAULT_TIME_UNIT = serializers.CharField()
|
2023-05-25 09:35:36 +00:00
|
|
|
AUTH_LDAP_SYNC_ORG_IDS = serializers.ListField()
|
2022-05-06 08:27:14 +00:00
|
|
|
SECURITY_MAX_IDLE_TIME = serializers.IntegerField()
|
|
|
|
SECURITY_VIEW_AUTH_NEED_MFA = serializers.BooleanField()
|
|
|
|
SECURITY_MFA_VERIFY_TTL = serializers.IntegerField()
|
|
|
|
SECURITY_COMMAND_EXECUTION = serializers.BooleanField()
|
2023-05-31 09:16:48 +00:00
|
|
|
SECURITY_COMMAND_BLACKLIST = serializers.ListField()
|
2022-05-06 08:27:14 +00:00
|
|
|
SECURITY_PASSWORD_EXPIRATION_TIME = serializers.IntegerField()
|
|
|
|
SECURITY_LUNA_REMEMBER_AUTH = serializers.BooleanField()
|
2022-05-11 09:09:23 +00:00
|
|
|
SECURITY_WATERMARK_ENABLED = serializers.BooleanField()
|
|
|
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = serializers.BooleanField()
|
2022-05-06 08:27:14 +00:00
|
|
|
PASSWORD_RULE = serializers.DictField()
|
|
|
|
SECURITY_SESSION_SHARE = serializers.BooleanField()
|
|
|
|
XPACK_LICENSE_IS_VALID = serializers.BooleanField()
|
|
|
|
XPACK_LICENSE_INFO = serializers.DictField()
|
|
|
|
HELP_DOCUMENT_URL = serializers.CharField()
|
|
|
|
HELP_SUPPORT_URL = serializers.CharField()
|
|
|
|
|
|
|
|
AUTH_WECOM = serializers.BooleanField()
|
|
|
|
AUTH_DINGTALK = serializers.BooleanField()
|
|
|
|
AUTH_FEISHU = serializers.BooleanField()
|
|
|
|
AUTH_TEMP_TOKEN = serializers.BooleanField()
|
|
|
|
|
2022-06-06 10:04:11 +00:00
|
|
|
TERMINAL_RAZOR_ENABLED = serializers.BooleanField()
|
2022-05-06 08:27:14 +00:00
|
|
|
TERMINAL_MAGNUS_ENABLED = serializers.BooleanField()
|
|
|
|
TERMINAL_KOKO_SSH_ENABLED = serializers.BooleanField()
|
2022-07-05 03:04:12 +00:00
|
|
|
TERMINAL_OMNIDB_ENABLED = serializers.BooleanField()
|
2022-05-06 08:27:14 +00:00
|
|
|
|
2022-11-07 10:19:56 +00:00
|
|
|
TERMINAL_GRAPHICAL_RESOLUTION = serializers.CharField()
|
|
|
|
|
2022-05-06 08:27:14 +00:00
|
|
|
ANNOUNCEMENT_ENABLED = serializers.BooleanField()
|
2022-05-27 09:21:03 +00:00
|
|
|
ANNOUNCEMENT = serializers.DictField()
|
2022-07-05 06:43:56 +00:00
|
|
|
|
2022-05-17 10:57:04 +00:00
|
|
|
TICKETS_ENABLED = serializers.BooleanField()
|
2023-05-09 05:43:46 +00:00
|
|
|
CONNECTION_TOKEN_REUSABLE = serializers.BooleanField()
|