mirror of https://github.com/jumpserver/jumpserver
fix(command): 修复命令记录没有根据sesion进行过滤的问题
parent
4e933fc1ca
commit
1f30d459ae
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue