mirror of https://github.com/jumpserver/jumpserver
fix: 修改角色列表排序问题
parent
be151523f4
commit
a045eb9936
|
@ -13,7 +13,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='playbook',
|
||||
name='create_method',
|
||||
field=models.CharField(choices=[('blank', 'Blank'), ('upload', 'Upload'), ('vcs', 'VCS')], default='blank', max_length=128, verbose_name='CreateMethod'),
|
||||
field=models.CharField(choices=[('blank', 'Blank'), ('vcs', 'VCS')], default='blank', max_length=128, verbose_name='CreateMethod'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='playbook',
|
||||
|
|
|
@ -4,7 +4,6 @@ from rest_framework.exceptions import PermissionDenied
|
|||
from rest_framework.decorators import action
|
||||
|
||||
from common.api import JMSModelViewSet
|
||||
from common.api import PaginatedResponseMixin
|
||||
from ..filters import RoleFilter
|
||||
from ..serializers import RoleSerializer, RoleUserSerializer
|
||||
from ..models import Role, SystemRole, OrgRole
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 3.2.16 on 2023-02-02 08:03
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rbac', '0011_remove_redundant_permission'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='role',
|
||||
options={'ordering': ('scope', 'name'), 'verbose_name': 'Role'},
|
||||
),
|
||||
]
|
|
@ -43,6 +43,7 @@ class Role(JMSBaseModel):
|
|||
|
||||
class Meta:
|
||||
unique_together = [('name', 'scope')]
|
||||
ordering = ('scope', 'name')
|
||||
verbose_name = _('Role')
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Reference in New Issue