fix: 修复特殊用户过滤 (#7759)

Co-authored-by: feng626 <1304903146@qq.com>
pull/7761/head
fit2bot 3 years ago committed by GitHub
parent 14327ee398
commit 89de111acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -336,16 +336,19 @@ class RoleMixin:
return RoleBinding.get_role_users(org_admin)
@classmethod
def get_nature_users(cls):
def get_nature_users(cls, queryset=None):
if not queryset:
return cls.objects.filter(is_service_account=False)
return queryset.filter(is_service_account=False)
@classmethod
def get_org_users(cls, org=None):
queryset = cls.get_nature_users()
queryset = None
if org is None:
org = current_org
if not org.is_root():
queryset = current_org.get_members()
queryset = cls.get_nature_users(queryset)
return queryset
def get_all_permissions(self):

Loading…
Cancel
Save