From eb17183d9757cd55e4ea4568c78d43d2e5796464 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:39:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20workbench=5Forgs=20=E5=8E=BB=E9=87=8D=20?= =?UTF-8?q?(#8151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng626 <1304903146@qq.com> --- apps/rbac/models/rolebinding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/rbac/models/rolebinding.py b/apps/rbac/models/rolebinding.py index 835fbf6a7..ded35a278 100644 --- a/apps/rbac/models/rolebinding.py +++ b/apps/rbac/models/rolebinding.py @@ -112,7 +112,7 @@ class RoleBinding(JMSModel): system_bindings = [b for b in bindings if b.scope == Role.Scope.system.value] # 工作台仅限于自己加入的组织 if perm == 'rbac.view_workbench': - all_orgs = user.orgs.all() + all_orgs = user.orgs.all().distinct() else: all_orgs = Organization.objects.all()