fix: workbench_orgs 去重 (#8151)

Co-authored-by: feng626 <1304903146@qq.com>
pull/8161/head v2.21.1
fit2bot 2022-04-25 11:39:51 +08:00 committed by GitHub
parent b0057ecb9d
commit eb17183d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()