perf: 提交禁用xrdp的开关 (#6788)

* perf: 提交禁用xrdp的开关

* perf: 修复换行

Co-authored-by: ibuler <ibuler@qq.com>
pull/6789/head
fit2bot 2021-09-09 19:18:37 +08:00 committed by GitHub
parent b1fceca8a6
commit dc742d1281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1072 additions and 451 deletions

View File

@ -271,6 +271,7 @@ class Config(dict):
'TERMINAL_TELNET_REGEX': '',
'TERMINAL_COMMAND_STORAGE': {},
'TERMINAL_RDP_ADDR': '',
'XRDP_ENABLED': True,
# 安全配置
'SECURITY_MFA_AUTH': 0, # 0 不开启 1 全局开启 2 管理员开启

View File

@ -130,3 +130,5 @@ LOGIN_REDIRECT_TO_BACKEND = CONFIG.LOGIN_REDIRECT_TO_BACKEND
LOGIN_REDIRECT_MSG_ENABLED = CONFIG.LOGIN_REDIRECT_MSG_ENABLED
CLOUD_SYNC_TASK_EXECUTION_KEEP_DAYS = CONFIG.CLOUD_SYNC_TASK_EXECUTION_KEEP_DAYS
XRDP_ENABLED = CONFIG.XRDP_ENABLED

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ __all__ = ('SystemMsgSubscription', 'UserMsgSubscription')
class UserMsgSubscription(JMSModel):
user = models.ForeignKey('users.User', unique=True, related_name='user_msg_subscriptions', on_delete=models.CASCADE)
user = models.OneToOneField('users.User', related_name='user_msg_subscriptions', on_delete=models.CASCADE)
receive_backends = models.JSONField(default=list)
def __str__(self):

View File

@ -10,7 +10,7 @@ from users.models import User
from notifications.backends import BACKEND
from .models import SystemMsgSubscription, UserMsgSubscription
__all__ = ('SystemMessage', 'UserMessage')
__all__ = ('SystemMessage', 'UserMessage', 'system_msgs')
system_msgs = []

View File

@ -74,6 +74,7 @@ class PublicSettingApi(generics.RetrieveAPIView):
"AUTH_FEISHU": settings.AUTH_FEISHU,
'SECURITY_WATERMARK_ENABLED': settings.SECURITY_WATERMARK_ENABLED,
'SECURITY_SESSION_SHARE': settings.SECURITY_SESSION_SHARE,
"XRDP_ENABLED": settings.XRDP_ENABLED,
}
}
return instance

View File

@ -35,8 +35,8 @@ class TerminalSettingSerializer(serializers.Serializer):
"if you cannot log in to the device through Telnet, set this parameter")
)
TERMINAL_RDP_ADDR = serializers.CharField(
required=False, label=_("RDP address"),
max_length=1024,
allow_blank=True,
required=False, label=_("RDP address"), max_length=1024, allow_blank=True,
help_text=_('RDP visit address, eg: dev.jumpserver.org:3389')
)
XRDP_ENABLED = serializers.BooleanField(label=_("Enable XRDP"))