Browse Source

fix: del connect my asset

pull/7846/head
feng626 3 years ago committed by Jiangjie.Bai
parent
commit
faf82d7cfb
  1. 1
      apps/perms/models/asset_permission.py
  2. 2
      utils/clean_db_content_types.py

1
apps/perms/models/asset_permission.py

@ -185,7 +185,6 @@ class PermedAsset(Asset):
verbose_name = _('Permed asset') verbose_name = _('Permed asset')
permissions = [ permissions = [
('view_myassets', _('Can view my assets')), ('view_myassets', _('Can view my assets')),
('connect_myassets', _('Can connect my assets')),
('view_userassets', _('Can view user assets')), ('view_userassets', _('Can view user assets')),
('view_usergroupassets', _('Can view usergroup assets')), ('view_usergroupassets', _('Can view usergroup assets')),
] ]

2
utils/clean_db_content_types.py

@ -22,6 +22,8 @@ def clean_db_content_types():
ContentType.objects.filter(app_label=app, model=model).delete() ContentType.objects.filter(app_label=app, model=model).delete()
permissions_delete_required = [ permissions_delete_required = [
('perms', 'permedasset', 'connect_myassets'),
('perms', 'assetpermission', 'connect_myassets'), ('perms', 'assetpermission', 'connect_myassets'),
('perms', 'assetpermission', 'view_myassets'), ('perms', 'assetpermission', 'view_myassets'),
('perms', 'assetpermission', 'view_userassets'), ('perms', 'assetpermission', 'view_userassets'),

Loading…
Cancel
Save