From faf82d7cfbc51dfea3e394452bf25bcc2898a5cb Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Mon, 14 Mar 2022 19:20:44 +0800 Subject: [PATCH] fix: del connect my asset --- apps/perms/models/asset_permission.py | 1 - utils/clean_db_content_types.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/perms/models/asset_permission.py b/apps/perms/models/asset_permission.py index 0834e704a..b8e4eddb5 100644 --- a/apps/perms/models/asset_permission.py +++ b/apps/perms/models/asset_permission.py @@ -185,7 +185,6 @@ class PermedAsset(Asset): verbose_name = _('Permed asset') permissions = [ ('view_myassets', _('Can view my assets')), - ('connect_myassets', _('Can connect my assets')), ('view_userassets', _('Can view user assets')), ('view_usergroupassets', _('Can view usergroup assets')), ] diff --git a/utils/clean_db_content_types.py b/utils/clean_db_content_types.py index 3bd843ec6..6ea10cf51 100644 --- a/utils/clean_db_content_types.py +++ b/utils/clean_db_content_types.py @@ -22,6 +22,8 @@ def clean_db_content_types(): ContentType.objects.filter(app_label=app, model=model).delete() permissions_delete_required = [ + ('perms', 'permedasset', 'connect_myassets'), + ('perms', 'assetpermission', 'connect_myassets'), ('perms', 'assetpermission', 'view_myassets'), ('perms', 'assetpermission', 'view_userassets'),