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.
25 lines
826 B
25 lines
826 B
# Generated by Django 3.2.16 on 2022-12-27 02:41
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def migrate_remove_redundant_permission(apps, *args):
|
|
model = apps.get_model('rbac', 'ContentType')
|
|
model.objects.filter(app_label='applications').delete()
|
|
model.objects.filter(app_label='ops', model='task').delete()
|
|
model.objects.filter(app_label='xpack', model__in=[
|
|
'applicationchangeauthplan', 'applicationchangeauthplanexecution',
|
|
'applicationchangeauthplantask', 'changeauthplan', 'changeauthplanexecution',
|
|
'changeauthplantask', 'gatherusertask', 'gatherusertaskexecution'
|
|
]).delete()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('rbac', '0010_auto_20221220_1956'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(migrate_remove_redundant_permission)
|
|
]
|