mirror of https://github.com/jumpserver/jumpserver
				
				
				
			perf: 提交禁用xrdp的开关 (#6788)
* perf: 提交禁用xrdp的开关 * perf: 修复换行 Co-authored-by: ibuler <ibuler@qq.com>pull/6789/head
							parent
							
								
									b1fceca8a6
								
							
						
					
					
						commit
						dc742d1281
					
				| 
						 | 
				
			
			@ -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 管理员开启
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
											
										
									
								
							| 
						 | 
				
			
			@ -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):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 = []
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue