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
|
|
|
|
|
2023-07-28 02:40:48 +00:00
|
|
|
__all__ = [
|
|
|
|
'PublicSettingSerializer', 'PrivateSettingSerializer', 'ServerInfoSerializer'
|
|
|
|
]
|
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()
|
2024-02-02 08:52:57 +00:00
|
|
|
COUNTRY_CALLING_CODES = serializers.ListField()
|
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()
|
|
|
|
|
2023-09-11 10:15:03 +00:00
|
|
|
AUTH_PASSKEY = serializers.BooleanField()
|
2022-05-06 08:27:14 +00:00
|
|
|
AUTH_WECOM = serializers.BooleanField()
|
|
|
|
AUTH_DINGTALK = serializers.BooleanField()
|
|
|
|
AUTH_FEISHU = serializers.BooleanField()
|
2024-03-22 10:05:43 +00:00
|
|
|
AUTH_LARK = serializers.BooleanField()
|
2022-05-06 08:27:14 +00:00
|
|
|
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
|
|
|
|
|
|
|
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()
|
2024-02-19 03:18:01 +00:00
|
|
|
TICKETS_DIRECT_APPROVE = serializers.BooleanField()
|
2023-05-09 05:43:46 +00:00
|
|
|
CONNECTION_TOKEN_REUSABLE = serializers.BooleanField()
|
2023-08-08 02:16:23 +00:00
|
|
|
CACHE_LOGIN_PASSWORD_ENABLED = serializers.BooleanField()
|
2023-08-17 04:12:58 +00:00
|
|
|
VAULT_ENABLED = serializers.BooleanField()
|
2023-12-05 08:52:11 +00:00
|
|
|
VIRTUAL_APP_ENABLED = serializers.BooleanField()
|
2023-12-08 09:46:40 +00:00
|
|
|
CHAT_AI_ENABLED = serializers.BooleanField()
|
|
|
|
GPT_MODEL = serializers.CharField()
|
2023-12-14 03:20:40 +00:00
|
|
|
FILE_UPLOAD_SIZE_LIMIT_MB = serializers.IntegerField()
|
2023-07-28 02:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ServerInfoSerializer(serializers.Serializer):
|
|
|
|
CURRENT_TIME = serializers.DateTimeField()
|