fix: 修复组织管理员查看操作日志可以看到 system 组织下的操作问题, 只有系统管理员可以查看任务监控

This commit is contained in:
Bai
2023-03-08 15:01:05 +08:00
committed by Jiangjie.Bai
parent 21352a2ab7
commit 6bbe602ebb
3 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ class OperateLogViewSet(OrgReadonlyModelViewSet):
return super().get_serializer_class()
def get_queryset(self):
org_q = Q(org_id=Organization.SYSTEM_ID) | Q(org_id=current_org.id)
org_q = Q(org_id=current_org.id)
with tmp_to_root_org():
qs = OperateLog.objects.filter(org_q)
es_config = settings.OPERATE_LOG_ELASTICSEARCH_CONFIG