mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
864 B
27 lines
864 B
# Generated by Django 3.1.13 on 2021-12-20 06:55
|
|
|
|
from django.db import migrations, models
|
|
|
|
ACTION_CONNECT = 1
|
|
|
|
|
|
def migrate_app_perms_actions(apps, schema_editor):
|
|
perm_model = apps.get_model("perms", "ApplicationPermission")
|
|
perm_model.objects.all().update(actions=ACTION_CONNECT)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('perms', '0021_auto_20211105_1605'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='applicationpermission',
|
|
name='actions',
|
|
field=models.IntegerField(choices=[(255, 'All'), (1, 'Connect'), (2, 'Upload file'), (4, 'Download file'), (6, 'Upload download'), (8, 'Clipboard copy'), (16, 'Clipboard paste'), (24, 'Clipboard copy paste')], default=255, verbose_name='Actions'),
|
|
),
|
|
migrations.RunPython(migrate_app_perms_actions)
|
|
]
|