diff --git a/apps/acls/migrations/0002_auto_20211130_1037.py b/apps/acls/migrations/0003_auto_20211130_1037.py similarity index 92% rename from apps/acls/migrations/0002_auto_20211130_1037.py rename to apps/acls/migrations/0003_auto_20211130_1037.py index 903a9685e..d4d3524be 100644 --- a/apps/acls/migrations/0002_auto_20211130_1037.py +++ b/apps/acls/migrations/0003_auto_20211130_1037.py @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('acls', '0001_initial'), + ('acls', '0002_auto_20210926_1047'), ] operations = [ diff --git a/apps/applications/migrations/0013_auto_20220211_1401.py b/apps/applications/migrations/0013_auto_20220211_1401.py deleted file mode 100644 index bbbc3a677..000000000 --- a/apps/applications/migrations/0013_auto_20220211_1401.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.12 on 2022-02-11 06:01 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('applications', '0012_auto_20211130_1037'), - ] - - operations = [ - migrations.AlterModelOptions( - name='account', - options={'permissions': [('view_applicationaccountsecret', 'Can view application account secret'), ('change_appplicationaccountsecret', 'Can view application account secret')], 'verbose_name': 'Application account'}, - ), - ] diff --git a/apps/applications/migrations/0012_auto_20211130_1037.py b/apps/applications/migrations/0017_auto_20220217_2135.py similarity index 63% rename from apps/applications/migrations/0012_auto_20211130_1037.py rename to apps/applications/migrations/0017_auto_20220217_2135.py index f6fd8b925..4807b570d 100644 --- a/apps/applications/migrations/0012_auto_20211130_1037.py +++ b/apps/applications/migrations/0017_auto_20220217_2135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.13 on 2021-11-30 02:37 +# Generated by Django 3.1.13 on 2022-02-17 13:35 from django.db import migrations @@ -6,17 +6,13 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('applications', '0011_auto_20210826_1759'), + ('applications', '0016_auto_20220118_1455'), ] operations = [ migrations.AlterModelOptions( name='account', - options={'verbose_name': 'Application account'}, - ), - migrations.AlterModelOptions( - name='application', - options={'ordering': ('name',), 'verbose_name': 'Application'}, + options={'permissions': [('view_applicationaccountsecret', 'Can view application account secret'), ('change_appplicationaccountsecret', 'Can view application account secret')], 'verbose_name': 'Application account'}, ), migrations.AlterModelOptions( name='applicationuser', diff --git a/apps/assets/migrations/0077_auto_20211130_1037.py b/apps/assets/migrations/0077_auto_20211130_1037.py deleted file mode 100644 index 49cf2d2be..000000000 --- a/apps/assets/migrations/0077_auto_20211130_1037.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.13 on 2021-11-30 02:37 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('assets', '0076_delete_assetuser'), - ] - - operations = [ - migrations.AlterModelOptions( - name='label', - options={'verbose_name': 'Label'}, - ), - ] diff --git a/apps/assets/migrations/0078_auto_20220211_1401.py b/apps/assets/migrations/0086_auto_20220217_2135.py similarity index 74% rename from apps/assets/migrations/0078_auto_20220211_1401.py rename to apps/assets/migrations/0086_auto_20220217_2135.py index d1b234b2a..fcdb9e0c8 100644 --- a/apps/assets/migrations/0078_auto_20220211_1401.py +++ b/apps/assets/migrations/0086_auto_20220217_2135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.12 on 2022-02-11 06:01 +# Generated by Django 3.1.13 on 2022-02-17 13:35 from django.db import migrations @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('assets', '0077_auto_20211130_1037'), + ('assets', '0085_commandfilterrule_ignore_case'), ] operations = [ @@ -18,4 +18,8 @@ class Migration(migrations.Migration): name='authbook', options={'permissions': [('view_assetaccountsecret', 'Can view asset account secret'), ('change_assetaccountsecret', 'Can change asset account secret')], 'verbose_name': 'AuthBook'}, ), + migrations.AlterModelOptions( + name='label', + options={'verbose_name': 'Label'}, + ), ] diff --git a/apps/authentication/migrations/0005_auto_20210929_1106.py b/apps/authentication/migrations/0005_auto_20210929_1106.py deleted file mode 100644 index 3197d5d43..000000000 --- a/apps/authentication/migrations/0005_auto_20210929_1106.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.12 on 2021-09-29 03:06 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('authentication', '0004_ssotoken'), - ] - - operations = [ - migrations.AlterModelOptions( - name='loginconfirmsetting', - options={'verbose_name': 'Login Confirm'}, - ), - ] diff --git a/apps/authentication/migrations/0007_connectiontoken.py b/apps/authentication/migrations/0007_connectiontoken.py index b5d404c97..c017c5d76 100644 --- a/apps/authentication/migrations/0007_connectiontoken.py +++ b/apps/authentication/migrations/0007_connectiontoken.py @@ -6,7 +6,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('authentication', '0006_auto_20211130_1037'), + ('authentication', '0006_auto_20211227_1059'), ] operations = [ diff --git a/apps/authentication/migrations/0006_auto_20211130_1037.py b/apps/authentication/migrations/0008_auto_20220217_2135.py similarity index 78% rename from apps/authentication/migrations/0006_auto_20211130_1037.py rename to apps/authentication/migrations/0008_auto_20220217_2135.py index c1023be9d..3f6b55248 100644 --- a/apps/authentication/migrations/0006_auto_20211130_1037.py +++ b/apps/authentication/migrations/0008_auto_20220217_2135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.13 on 2021-11-30 02:37 +# Generated by Django 3.1.13 on 2022-02-17 13:35 from django.db import migrations @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('authentication', '0005_auto_20210929_1106'), + ('authentication', '0007_connectiontoken'), ] operations = [ diff --git a/apps/ops/migrations/0021_auto_20211130_1037.py b/apps/ops/migrations/0021_auto_20211130_1037.py index 355abeb40..362abe030 100644 --- a/apps/ops/migrations/0021_auto_20211130_1037.py +++ b/apps/ops/migrations/0021_auto_20211130_1037.py @@ -26,4 +26,8 @@ class Migration(migrations.Migration): name='task', options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'verbose_name': 'Task'}, ), + migrations.AlterModelOptions( + name='task', + options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'permissions': [('view_taskmonitor', 'Can view task monitor')], 'verbose_name': 'Task'}, + ), ] diff --git a/apps/ops/migrations/0022_auto_20220211_1423.py b/apps/ops/migrations/0022_auto_20220211_1423.py deleted file mode 100644 index d5fa58734..000000000 --- a/apps/ops/migrations/0022_auto_20220211_1423.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.12 on 2022-02-11 06:23 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('ops', '0021_auto_20211130_1037'), - ] - - operations = [ - migrations.AlterModelOptions( - name='task', - options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'permissions': [('view_taskmonitor', 'Can view task monitor')], 'verbose_name': 'Task'}, - ), - ] diff --git a/apps/perms/migrations/0021_auto_20220104_1537.py b/apps/perms/migrations/0024_auto_20220217_2135.py similarity index 90% rename from apps/perms/migrations/0021_auto_20220104_1537.py rename to apps/perms/migrations/0024_auto_20220217_2135.py index e74afff2a..60fc2cb03 100644 --- a/apps/perms/migrations/0021_auto_20220104_1537.py +++ b/apps/perms/migrations/0024_auto_20220217_2135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.13 on 2022-01-04 07:37 +# Generated by Django 3.1.13 on 2022-02-17 13:35 from django.db import migrations @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('perms', '0020_auto_20210910_1103'), + ('perms', '0023_auto_20220112_2035'), ] operations = [ diff --git a/apps/terminal/migrations/0041_auto_20211130_1037.py b/apps/terminal/migrations/0041_auto_20211130_1037.py deleted file mode 100644 index e87b0082c..000000000 --- a/apps/terminal/migrations/0041_auto_20211130_1037.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 3.1.13 on 2021-11-30 02:37 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('terminal', '0040_sessionjoinrecord_sessionsharing'), - ] - - operations = [ - migrations.AlterModelOptions( - name='command', - options={'ordering': ('-timestamp',), 'verbose_name': 'Command record'}, - ), - migrations.AlterModelOptions( - name='commandstorage', - options={'verbose_name': 'Command storage'}, - ), - migrations.AlterModelOptions( - name='replaystorage', - options={'verbose_name': 'Replay storage'}, - ), - migrations.AlterModelOptions( - name='session', - options={'ordering': ['-date_start'], 'verbose_name': 'Session record'}, - ), - migrations.AlterModelOptions( - name='sessionjoinrecord', - options={'ordering': ('-date_joined',), 'verbose_name': 'Session join record'}, - ), - migrations.AlterModelOptions( - name='sessionsharing', - options={'ordering': ('-date_created',), 'verbose_name': 'Session sharing'}, - ), - migrations.AlterModelOptions( - name='status', - options={'get_latest_by': 'date_created', 'verbose_name': 'Status'}, - ), - migrations.AlterModelOptions( - name='task', - options={'verbose_name': 'Task'}, - ), - migrations.AlterModelOptions( - name='terminal', - options={'ordering': ('is_accepted',), 'verbose_name': 'Terminal'}, - ), - ] diff --git a/apps/terminal/migrations/0042_auto_20220211_1401.py b/apps/terminal/migrations/0042_auto_20220211_1401.py deleted file mode 100644 index 7ff4d603f..000000000 --- a/apps/terminal/migrations/0042_auto_20220211_1401.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.12 on 2022-02-11 06:01 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('terminal', '0041_auto_20211130_1037'), - ] - - operations = [ - migrations.AlterModelOptions( - name='terminal', - options={'ordering': ('is_accepted',), 'permissions': (('view_terminalconfig', 'Can view terminal config'),), 'verbose_name': 'Terminal'}, - ), - ] diff --git a/apps/terminal/migrations/0043_auto_20220217_2135.py b/apps/terminal/migrations/0043_auto_20220217_2135.py new file mode 100644 index 000000000..1456d7239 --- /dev/null +++ b/apps/terminal/migrations/0043_auto_20220217_2135.py @@ -0,0 +1,64 @@ +# Generated by Django 3.1.13 on 2022-02-17 13:35 + +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ('terminal', '0042_auto_20211229_1619'), + ] + + operations = [ + migrations.AlterModelOptions( + name='command', + options={'ordering': ('-timestamp',), 'verbose_name': 'Command record'}, + ), + migrations.AlterModelOptions( + name='commandstorage', + options={'verbose_name': 'Command storage'}, + ), + migrations.AlterModelOptions( + name='replaystorage', + options={'verbose_name': 'Replay storage'}, + ), + migrations.AlterModelOptions( + name='session', + options={'ordering': ['-date_start'], 'permissions': [('monitor_session', 'Can monitor session'), ('share_session', 'Can share session'), ('terminate_session', 'Can terminate session'), ('validate_sessionactionperm', 'Can validate session action perm')], 'verbose_name': 'Session record'}, + ), + migrations.AlterModelOptions( + name='sessionjoinrecord', + options={'ordering': ('-date_joined',), 'verbose_name': 'Session join record'}, + ), + migrations.AlterModelOptions( + name='sessionsharing', + options={'ordering': ('-date_created',), 'permissions': [('add_supersessionsharing', 'Can add super session sharing')], 'verbose_name': 'Session sharing'}, + ), + migrations.AlterModelOptions( + name='status', + options={'get_latest_by': 'date_created', 'verbose_name': 'Status'}, + ), + migrations.AlterModelOptions( + name='task', + options={'verbose_name': 'Task'}, + ), + migrations.AlterModelOptions( + name='terminal', + options={'ordering': ('is_accepted',), 'permissions': (('view_terminalconfig', 'Can view terminal config'),), 'verbose_name': 'Terminal'}, + ), + migrations.CreateModel( + name='SessionReplay', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), + ('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')), + ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')), + ('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')), + ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='terminal.session', verbose_name='Session')), + ], + options={ + 'permissions': [('upload_sessionreplay', 'Can upload session replay'), ('download_sessionreplay', 'Can download session replay')], + }, + ), + ] diff --git a/apps/tickets/migrations/0011_auto_20211130_1037.py b/apps/tickets/migrations/0014_auto_20220217_2135.py similarity index 85% rename from apps/tickets/migrations/0011_auto_20211130_1037.py rename to apps/tickets/migrations/0014_auto_20220217_2135.py index aa3325e4e..246ef1bed 100644 --- a/apps/tickets/migrations/0011_auto_20211130_1037.py +++ b/apps/tickets/migrations/0014_auto_20220217_2135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.13 on 2021-11-30 02:37 +# Generated by Django 3.1.13 on 2022-02-17 13:35 from django.db import migrations @@ -6,7 +6,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('tickets', '0010_auto_20210812_1618'), + ('tickets', '0013_ticket_serial_num'), ] operations = [ diff --git a/apps/users/migrations/0037_auto_20210929_1403.py b/apps/users/migrations/0037_auto_20210929_1403.py deleted file mode 100644 index 6028282c2..000000000 --- a/apps/users/migrations/0037_auto_20210929_1403.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.1.12 on 2021-09-29 06:03 - -from django.db import migrations, models - - -def migrate_app_users(apps, schema_editor): - user_model = apps.get_model('users', 'User') - app_users = user_model.objects.filter(role='App') - app_users.update(is_app=True) - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0036_user_feishu_id'), - ] - - operations = [ - migrations.AddField( - model_name='user', - name='is_app', - field=models.BooleanField(default=False), - ), - migrations.RunPython(migrate_app_users), - ] diff --git a/apps/users/migrations/0038_auto_20211208_1133.py b/apps/users/migrations/0038_auto_20211208_1133.py deleted file mode 100644 index c1c8150e6..000000000 --- a/apps/users/migrations/0038_auto_20211208_1133.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 3.1.13 on 2021-12-08 03:33 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0037_auto_20210929_1403'), - ] - - operations = [ - migrations.AlterModelOptions( - name='userpasswordhistory', - options={'verbose_name': 'User password history'}, - ), - migrations.AlterField( - model_name='user', - name='role', - field=models.CharField(blank=True, default='User', max_length=10, verbose_name='Role'), - ), - ] diff --git a/apps/users/migrations/0039_auto_20211229_1852.py b/apps/users/migrations/0039_auto_20211229_1852.py index a3fa22935..3e0b5b749 100644 --- a/apps/users/migrations/0039_auto_20211229_1852.py +++ b/apps/users/migrations/0039_auto_20211229_1852.py @@ -1,17 +1,42 @@ # Generated by Django 3.1.13 on 2021-12-29 10:52 -from django.db import migrations +from django.db import migrations, models + + +def migrate_app_users(apps, schema_editor): + user_model = apps.get_model('users', 'User') + app_users = user_model.objects.filter(role='App') + app_users.update(is_app=True) class Migration(migrations.Migration): dependencies = [ - ('users', '0038_auto_20211208_1133'), + ('users', '0038_auto_20211209_1140'), ] operations = [ + migrations.AddField( + model_name='user', + name='is_app', + field=models.BooleanField(default=False), + ), + migrations.RunPython(migrate_app_users), migrations.AlterModelOptions( name='user', options={'ordering': ['username'], 'permissions': [('invite', 'Can invite user'), ('remove', 'Can remove user')], 'verbose_name': 'User'}, ), + migrations.AlterModelOptions( + name='userpasswordhistory', + options={'verbose_name': 'User password history'}, + ), + migrations.AlterField( + model_name='user', + name='role', + field=models.CharField(blank=True, default='User', max_length=10, verbose_name='Role'), + ), + migrations.AlterModelOptions( + name='user', + options={'ordering': ['username'], 'permissions': [('invite_user', 'Can invite user'), ('remove_user', 'Can remove user'), ('match_user', 'Can match user')], 'verbose_name': 'User'}, + ), ] diff --git a/apps/users/migrations/0040_auto_20220211_1401.py b/apps/users/migrations/0040_auto_20220211_1401.py deleted file mode 100644 index 7cc4c10eb..000000000 --- a/apps/users/migrations/0040_auto_20220211_1401.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.1.12 on 2022-02-11 06:01 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('users', '0039_auto_20211229_1852'), - ] - - operations = [ - migrations.AlterModelOptions( - name='user', - options={'ordering': ['username'], 'permissions': [('invite_user', 'Can invite user'), ('remove_user', 'Can remove user'), ('match_user', 'Can match user')], 'verbose_name': 'User'}, - ), - ]