mirror of https://github.com/jumpserver/jumpserver
pref: 修改删掉 connection token type
parent
8f88b898d0
commit
1239247b5a
|
@ -210,7 +210,7 @@ class ConnectionTokenMixin:
|
||||||
|
|
||||||
class ConnectionTokenViewSet(ConnectionTokenMixin, RootOrgViewMixin, JMSModelViewSet):
|
class ConnectionTokenViewSet(ConnectionTokenMixin, RootOrgViewMixin, JMSModelViewSet):
|
||||||
filterset_fields = (
|
filterset_fields = (
|
||||||
'type', 'user_display', 'asset_display'
|
'user_display', 'asset_display'
|
||||||
)
|
)
|
||||||
search_fields = filterset_fields
|
search_fields = filterset_fields
|
||||||
serializer_classes = {
|
serializer_classes = {
|
||||||
|
|
|
@ -49,5 +49,9 @@ class Migration(migrations.Migration):
|
||||||
migrations.RemoveField(
|
migrations.RemoveField(
|
||||||
model_name='connectiontoken',
|
model_name='connectiontoken',
|
||||||
name='system_user',
|
name='system_user',
|
||||||
)
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='connectiontoken',
|
||||||
|
name='type',
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# Generated by Django 3.2.14 on 2022-10-26 08:07
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('authentication', '0012_auto_20220816_1629'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='connectiontoken',
|
|
||||||
name='type',
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -23,7 +23,7 @@ class ConnectionTokenSerializer(OrgResourceModelSerializerMixin):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ConnectionToken
|
model = ConnectionToken
|
||||||
fields_mini = ['id', 'type']
|
fields_mini = ['id']
|
||||||
fields_small = fields_mini + [
|
fields_small = fields_mini + [
|
||||||
'secret', 'date_expired', 'date_created', 'date_updated',
|
'secret', 'date_expired', 'date_created', 'date_updated',
|
||||||
'created_by', 'updated_by', 'org_id', 'org_name',
|
'created_by', 'updated_by', 'org_id', 'org_name',
|
||||||
|
|
Loading…
Reference in New Issue