fix: 从组织移除用户

v2.17
Jiangjie.Bai 2022-03-11 21:11:20 +08:00 committed by Jiangjie.Bai
parent 231bd574f2
commit 7261e2f1ca
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ from orgs.models import Organization, OrganizationMember
from orgs.hands import set_current_org, Node, get_current_org
from perms.models import (AssetPermission, ApplicationPermission)
from users.models import UserGroup, User
from assets.models import SystemUser
from common.const.signals import PRE_REMOVE, POST_REMOVE
from common.decorator import on_transaction_commit
from common.signals import django_ready
@ -136,7 +137,7 @@ def _clear_users_from_org(org, users):
if not users:
return
models = (AssetPermission, ApplicationPermission, UserGroup)
models = (AssetPermission, ApplicationPermission, UserGroup, SystemUser)
for m in models:
_remove_users(m, users, org)