mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-15 08:32:48 +00:00
Compare commits
6 Commits
refactor_p
...
v2.12.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b754cfe073 | ||
|
|
b3499a0675 | ||
|
|
e5d3fe696f | ||
|
|
8f3fb60332 | ||
|
|
1116d1d353 | ||
|
|
5b239cd340 |
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ from django.db import models
|
||||
from django.db.models import TextChoices
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common.utils.strings import no_special_chars
|
||||
from orgs.mixins.models import OrgModelMixin
|
||||
from .base import BaseUser
|
||||
|
||||
@@ -64,8 +63,6 @@ class Gateway(BaseUser):
|
||||
def test_connective(self, local_port=None):
|
||||
if local_port is None:
|
||||
local_port = self.port
|
||||
if self.password and not no_special_chars(self.password):
|
||||
return False, _("Password should not contains special characters")
|
||||
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
|
||||
@@ -4,7 +4,6 @@ from rest_framework import serializers
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
|
||||
from common.validators import NoSpecialChars
|
||||
from ..models import Domain, Gateway
|
||||
from .base import AuthSerializerMixin
|
||||
|
||||
@@ -58,7 +57,7 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||
fields_fk = ['domain']
|
||||
fields = fields_small + fields_fk
|
||||
extra_kwargs = {
|
||||
'password': {'write_only': True, 'validators': [NoSpecialChars()]},
|
||||
'password': {'write_only': True},
|
||||
'private_key': {"write_only": True},
|
||||
'public_key': {"write_only": True},
|
||||
}
|
||||
@@ -67,7 +66,7 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||
class GatewayWithAuthSerializer(GatewaySerializer):
|
||||
class Meta(GatewaySerializer.Meta):
|
||||
extra_kwargs = {
|
||||
'password': {'write_only': False, 'validators': [NoSpecialChars()]},
|
||||
'password': {'write_only': False},
|
||||
'private_key': {"write_only": False},
|
||||
'public_key': {"write_only": False},
|
||||
}
|
||||
|
||||
@@ -97,10 +97,10 @@ class UserConnectionTokenViewSet(RootOrgViewMixin, SerializerMixin, GenericViewS
|
||||
options = {
|
||||
'full address:s': '',
|
||||
'username:s': '',
|
||||
'screen mode id:i': '0',
|
||||
'screen mode id:i': '1',
|
||||
# 'desktopwidth:i': '1280',
|
||||
# 'desktopheight:i': '800',
|
||||
'use multimon:i': '1',
|
||||
'use multimon:i': '0',
|
||||
'session bpp:i': '32',
|
||||
'audiomode:i': '0',
|
||||
'disable wallpaper:i': '0',
|
||||
|
||||
Binary file not shown.
@@ -412,7 +412,7 @@ msgstr "激活"
|
||||
#: assets/models/user.py:190 assets/models/user.py:325 templates/_nav.html:44
|
||||
#: xpack/plugins/cloud/models.py:92 xpack/plugins/cloud/serializers.py:179
|
||||
msgid "Admin user"
|
||||
msgstr "管理用户"
|
||||
msgstr "特权用户"
|
||||
|
||||
#: assets/models/asset.py:196
|
||||
msgid "Public IP"
|
||||
@@ -652,8 +652,8 @@ msgid "Gateway"
|
||||
msgstr "网关"
|
||||
|
||||
#: assets/models/domain.py:68
|
||||
msgid "Password should not contains special characters"
|
||||
msgstr "密码不能包含特殊字符"
|
||||
msgid "Password cannot be empty"
|
||||
msgstr "密码不能为空"
|
||||
|
||||
#: assets/models/gathered_user.py:16
|
||||
msgid "Present"
|
||||
@@ -805,7 +805,7 @@ msgstr "组织名称"
|
||||
|
||||
#: assets/serializers/asset.py:98
|
||||
msgid "Admin user display"
|
||||
msgstr "管理用户名称"
|
||||
msgstr "特权用户名称"
|
||||
|
||||
#: assets/serializers/base.py:41
|
||||
msgid "private key invalid"
|
||||
|
||||
Binary file not shown.
@@ -73,7 +73,7 @@ msgid ""
|
||||
"User list、User group、Asset list、Domain list、Admin user、System user、"
|
||||
"Labels、Asset permission"
|
||||
msgstr ""
|
||||
"用户列表、用户组、资产列表、网域列表、管理用户、系统用户、标签管理、资产授权"
|
||||
"用户列表、用户组、资产列表、网域列表、特权用户、系统用户、标签管理、资产授权"
|
||||
"规则"
|
||||
|
||||
#: static/js/jumpserver.js:416
|
||||
|
||||
@@ -146,7 +146,7 @@ class ApplyApplicationSerializer(ApplySerializer, ApproveSerializer):
|
||||
queries &= Q(type=apply_type)
|
||||
|
||||
with tmp_to_org(self.root.instance.org_id):
|
||||
application_ids = Application.objects.filter(queries).values_list('id', flat=True)[:5]
|
||||
application_ids = Application.objects.filter(queries).values_list('id', flat=True)[:15]
|
||||
application_ids = [str(application_id) for application_id in application_ids]
|
||||
return application_ids
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class ApplyAssetSerializer(ApplySerializer, ApproveSerializer):
|
||||
if not queries:
|
||||
return []
|
||||
with tmp_to_org(self.root.instance.org_id):
|
||||
asset_ids = Asset.objects.filter(queries).values_list('id', flat=True)[:5]
|
||||
asset_ids = Asset.objects.filter(queries).values_list('id', flat=True)[:100]
|
||||
asset_ids = [str(asset_id) for asset_id in asset_ids]
|
||||
return asset_ids
|
||||
|
||||
|
||||
Reference in New Issue
Block a user