mirror of https://github.com/jumpserver/jumpserver
fix: 去除系统用户资产相关权限
parent
5942037d81
commit
55a63477ed
|
@ -16,7 +16,7 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='systemuser',
|
||||
options={'ordering': ['name'], 'permissions': [('view_systemuserasset', 'Can view system user asset'), ('add_systemuserasset', 'Can add asset to system user'), ('remove_systemuserasset', 'Can remove system user asset'), ('match_systemuser', 'Can match system user')], 'verbose_name': 'System user'},
|
||||
options={'ordering': ['name'], 'permissions': [('match_systemuser', 'Can match system user')], 'verbose_name': 'System user'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='asset',
|
||||
|
|
|
@ -324,9 +324,6 @@ class SystemUser(ProtocolMixin, AuthMixin, BaseUser):
|
|||
unique_together = [('name', 'org_id')]
|
||||
verbose_name = _("System user")
|
||||
permissions = [
|
||||
('view_systemuserasset', _('Can view system user asset')),
|
||||
('add_systemuserasset', _('Can add asset to system user')),
|
||||
('remove_systemuserasset', _('Can remove system user asset')),
|
||||
('match_systemuser', _('Can match system user')),
|
||||
]
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ def clean_db_content_types():
|
|||
('rbac', 'menupermission', 'view_userview'),
|
||||
('rbac', 'menupermission', 'view_adminview'),
|
||||
('rbac', 'menupermission', 'view_auditview'),
|
||||
('assets', 'systemuser', 'view_systemuserasset'),
|
||||
('assets', 'systemuser', 'add_systemuserasset'),
|
||||
('assets', 'systemuser', 'remove_systemuserasset'),
|
||||
]
|
||||
for app, model, codename in permissions_delete_required:
|
||||
print('delete {}.{} ({})'.format(app, codename, model))
|
||||
|
|
Loading…
Reference in New Issue