mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-02 07:03:40 +00:00
perf: windows ssh 协议 默认开启 (#11158)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
parent
d182d14e26
commit
93ba4443dd
24
apps/assets/migrations/0122_auto_20230801_1940.py
Normal file
24
apps/assets/migrations/0122_auto_20230801_1940.py
Normal file
@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.1.10 on 2023-08-01 11:40
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def windows_platform_protocols_ssh_default(apps, schema_editor):
|
||||
platform_cls = apps.get_model('assets', 'Platform')
|
||||
windows_platform = platform_cls.objects.filter(
|
||||
name='Windows', internal=True, type='windows'
|
||||
).first()
|
||||
if not windows_platform:
|
||||
return
|
||||
|
||||
windows_platform.protocols.filter(name='ssh').update(default=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('assets', '0121_auto_20230725_1458'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(windows_platform_protocols_ssh_default)
|
||||
]
|
Loading…
Reference in New Issue
Block a user