Allow reversing service migrations.

This is probably the wrong way as we should really take care of removing the permission we added, but I don't see a reason anyone would need to migrate back that far as auth wouldn't work anymore without XML api (and even so newer installs don't have the settings referenced so permissions are not automagically added by the migration). So noop is bad but acceptable to me.

Thanks @mmolitor87
This commit is contained in:
Adarnof 2018-05-08 10:06:58 -04:00
parent 854096bac7
commit 86f57ccd56
10 changed files with 10 additions and 10 deletions

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='discorduser',
options={'permissions': (('access_discord', 'Can access the Discord service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -58,5 +58,5 @@ class Migration(migrations.Migration):
name='discourseuser',
options={'permissions': (('access_discourse', 'Can access the Discourse service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='ips4user',
options={'permissions': (('access_ips4', 'Can access the IPS4 service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='marketuser',
options={'permissions': (('access_market', 'Can access the Evernus Market service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='mumbleuser',
options={'permissions': (('access_mumble', 'Can access the Mumble service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='openfireuser',
options={'permissions': (('access_openfire', 'Can access the Openfire service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='phpbb3user',
options={'permissions': (('access_phpbb3', 'Can access the phpBB3 service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='smfuser',
options={'permissions': (('access_smf', 'Can access the SMF service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='teamspeak3user',
options={'permissions': (('access_teamspeak3', 'Can access the Teamspeak3 service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]

View File

@ -57,5 +57,5 @@ class Migration(migrations.Migration):
name='xenforouser',
options={'permissions': (('access_xenforo', 'Can access the XenForo service'),)},
),
migrations.RunPython(migrate_service_enabled),
migrations.RunPython(migrate_service_enabled, migrations.RunPython.noop),
]