mirror of https://github.com/jumpserver/jumpserver
fix: 修改tokent中信息中没有返回 Protocols 的问题
fix: 优化protocols fix: session bpp token 时间加长pull/6086/head
parent
72f9d0d371
commit
8ca2522c71
|
@ -79,7 +79,7 @@ class UserConnectionTokenViewSet(RootOrgViewMixin, SerializerMixin2, GenericView
|
||||||
})
|
})
|
||||||
|
|
||||||
key = self.CACHE_KEY_PREFIX.format(token)
|
key = self.CACHE_KEY_PREFIX.format(token)
|
||||||
cache.set(key, value, timeout=20)
|
cache.set(key, value, timeout=30*60)
|
||||||
return token
|
return token
|
||||||
|
|
||||||
def create(self, request, *args, **kwargs):
|
def create(self, request, *args, **kwargs):
|
||||||
|
@ -102,7 +102,7 @@ class UserConnectionTokenViewSet(RootOrgViewMixin, SerializerMixin2, GenericView
|
||||||
'desktopwidth:i': '1280',
|
'desktopwidth:i': '1280',
|
||||||
'desktopheight:i': '800',
|
'desktopheight:i': '800',
|
||||||
'use multimon:i': '1',
|
'use multimon:i': '1',
|
||||||
'session bpp:i': '24',
|
'session bpp:i': '32',
|
||||||
'audiomode:i': '0',
|
'audiomode:i': '0',
|
||||||
'disable wallpaper:i': '0',
|
'disable wallpaper:i': '0',
|
||||||
'disable full window drag:i': '0',
|
'disable full window drag:i': '0',
|
||||||
|
|
|
@ -8,6 +8,7 @@ from users.models import User
|
||||||
from assets.models import Asset, SystemUser, Gateway
|
from assets.models import Asset, SystemUser, Gateway
|
||||||
from applications.models import Application
|
from applications.models import Application
|
||||||
from users.serializers import UserProfileSerializer
|
from users.serializers import UserProfileSerializer
|
||||||
|
from assets.serializers import ProtocolsField
|
||||||
from perms.serializers.asset.permission import ActionsField
|
from perms.serializers.asset.permission import ActionsField
|
||||||
from .models import AccessKey, LoginConfirmSetting, SSOToken
|
from .models import AccessKey, LoginConfirmSetting, SSOToken
|
||||||
|
|
||||||
|
@ -150,9 +151,11 @@ class ConnectionTokenUserSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
|
|
||||||
class ConnectionTokenAssetSerializer(serializers.ModelSerializer):
|
class ConnectionTokenAssetSerializer(serializers.ModelSerializer):
|
||||||
|
protocols = ProtocolsField(label='Protocols', read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Asset
|
model = Asset
|
||||||
fields = ['id', 'hostname', 'ip', 'port', 'org_id']
|
fields = ['id', 'hostname', 'ip', 'protocols', 'org_id']
|
||||||
|
|
||||||
|
|
||||||
class ConnectionTokenSystemUserSerializer(serializers.ModelSerializer):
|
class ConnectionTokenSystemUserSerializer(serializers.ModelSerializer):
|
||||||
|
|
Loading…
Reference in New Issue