fix: 修改 ACL 排序 priority, date_updated, name

pull/9409/head
Bai 2023-02-02 14:53:18 +08:00 committed by Jiangjie.Bai
parent 6429b56a54
commit 88edc9191c
2 changed files with 4 additions and 4 deletions

View File

@ -20,14 +20,14 @@ class Migration(migrations.Migration):
), ),
migrations.AlterModelOptions( migrations.AlterModelOptions(
name='commandfilteracl', name='commandfilteracl',
options={'ordering': ('priority', 'name'), 'verbose_name': 'Command acl'}, options={'ordering': ('priority', 'date_updated', 'name'), 'verbose_name': 'Command acl'},
), ),
migrations.AlterModelOptions( migrations.AlterModelOptions(
name='loginacl', name='loginacl',
options={'ordering': ('priority', 'name'), 'verbose_name': 'Login acl'}, options={'ordering': ('priority', 'date_updated', 'name'), 'verbose_name': 'Login acl'},
), ),
migrations.AlterModelOptions( migrations.AlterModelOptions(
name='loginassetacl', name='loginassetacl',
options={'ordering': ('priority', 'name'), 'verbose_name': 'Login asset acl'}, options={'ordering': ('priority', 'date_updated', 'name'), 'verbose_name': 'Login asset acl'},
), ),
] ]

View File

@ -82,7 +82,7 @@ class BaseACL(JMSBaseModel):
objects = ACLManager.from_queryset(BaseACLQuerySet)() objects = ACLManager.from_queryset(BaseACLQuerySet)()
class Meta: class Meta:
ordering = ('priority', 'name') ordering = ('priority', 'date_updated', 'name')
abstract = True abstract = True
def is_action(self, action): def is_action(self, action):