mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-27 15:27:11 +00:00
feat: 添加 window RDP TLS 平台
This commit is contained in:
parent
55775f0deb
commit
d57f52ee24
28
apps/assets/migrations/0079_auto_20211102_1922.py
Normal file
28
apps/assets/migrations/0079_auto_20211102_1922.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.1.12 on 2021-11-02 11:22
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def create_internal_platform(apps, schema_editor):
|
||||
model = apps.get_model("assets", "Platform")
|
||||
db_alias = schema_editor.connection.alias
|
||||
type_platforms = (
|
||||
('Windows-RDP', 'Windows', {'security': 'rdp'}),
|
||||
('Windows-TLS', 'Windows', {'security': 'tls'}),
|
||||
)
|
||||
for name, base, meta in type_platforms:
|
||||
defaults = {'name': name, 'base': base, 'meta': meta}
|
||||
model.objects.using(db_alias).update_or_create(
|
||||
name=name, defaults=defaults
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assets', '0078_auto_20211014_2209'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(create_internal_platform)
|
||||
]
|
Loading…
Reference in New Issue
Block a user