fix(command): 修复命令记录没有根据sesion进行过滤的问题

pull/4334/head
Bai 2020-07-15 16:55:18 +08:00 committed by 老广
parent 4e933fc1ca
commit 1f30d459ae
2 changed files with 5 additions and 4 deletions

View File

@ -55,14 +55,15 @@ class CommandQueryMixin:
q = self.request.query_params
multi_command_storage = get_multi_command_storage()
queryset = multi_command_storage.filter(
date_from=date_from, date_to=date_to, input=q.get("input"),
user=q.get("user"), asset=q.get("asset"),
system_user=q.get("system_user"),
date_from=date_from, date_to=date_to,
user=q.get("user"), asset=q.get("asset"), system_user=q.get("system_user"),
input=q.get("input"), session=q.get("session_id"),
risk_level=self.get_query_risk_level(), org_id=self.get_org_id(),
)
return queryset
def filter_queryset(self, queryset):
# 解决es存储命令时父类根据filter_fields过滤出现异常的问题返回的queryset类型list
return queryset
def get_date_range(self):

View File

@ -16,7 +16,7 @@ class CommandBase(object):
@abc.abstractmethod
def filter(self, date_from=None, date_to=None,
user=None, asset=None, system_user=None,
input=None, session=None):
input=None, session=None, risk_level=None, org_id=None):
pass
@abc.abstractmethod