fix: 删除一些perms相关的权限位

pull/7910/head
Jiangjie.Bai 2022-03-17 16:01:32 +08:00 committed by 老广
parent b5dea38164
commit 26b3c60e5c
4 changed files with 5 additions and 5 deletions

View File

@ -27,10 +27,10 @@ class Migration(migrations.Migration):
),
migrations.AlterModelOptions(
name='applicationpermission',
options={'ordering': ('name',), 'permissions': [('view_permuserapplication', 'Can view application of permission to user')], 'verbose_name': 'Application permission'},
options={'ordering': ('name',), 'permissions': [], 'verbose_name': 'Application permission'},
),
migrations.AlterModelOptions(
name='assetpermission',
options={'ordering': ('name',), 'permissions': [('view_permuserasset', 'Can view asset of permission to user'), ('view_permusergroupasset', 'Can view asset of permission to user group')], 'verbose_name': 'Asset permission'},
options={'ordering': ('name',), 'permissions': [], 'verbose_name': 'Asset permission'},
),
]

View File

@ -37,7 +37,6 @@ class ApplicationPermission(BasePermission):
unique_together = [('org_id', 'name')]
verbose_name = _('Application permission')
permissions = [
('view_permuserapplication', _('Can view application of permission to user'))
]
ordering = ('name',)

View File

@ -29,8 +29,6 @@ class AssetPermission(BasePermission):
verbose_name = _("Asset permission")
ordering = ('name',)
permissions = [
('view_permuserasset', _('Can view asset of permission to user')),
('view_permusergroupasset', _('Can view asset of permission to user group'))
]
@lazyproperty

View File

@ -55,6 +55,9 @@ def clean_db_content_types():
('perms', 'permedkubernetesapp', 'view_mykubernetesapp'),
('perms', 'permedremoteapp', 'connect_myremoteapp'),
('perms', 'permedremoteapp', 'view_myremoteapp'),
('perms', 'applicationpermission', 'view_permuserapplication'),
('perms', 'assetpermission', 'view_permuserasset'),
('perms', 'assetpermission', 'view_permusergroupasset'),
('applications', 'databaseapp', 'add_databaseapp'),
('applications', 'databaseapp', 'change_databaseapp'),