mirror of https://github.com/jumpserver/jumpserver
fix(command): 修复命令记录没有根据sesion进行过滤的问题
parent
dcf9de420e
commit
148a7aa9ee
|
@ -55,14 +55,15 @@ class CommandQueryMixin:
|
||||||
q = self.request.query_params
|
q = self.request.query_params
|
||||||
multi_command_storage = get_multi_command_storage()
|
multi_command_storage = get_multi_command_storage()
|
||||||
queryset = multi_command_storage.filter(
|
queryset = multi_command_storage.filter(
|
||||||
date_from=date_from, date_to=date_to, input=q.get("input"),
|
date_from=date_from, date_to=date_to,
|
||||||
user=q.get("user"), asset=q.get("asset"),
|
user=q.get("user"), asset=q.get("asset"), system_user=q.get("system_user"),
|
||||||
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(),
|
risk_level=self.get_query_risk_level(), org_id=self.get_org_id(),
|
||||||
)
|
)
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
def filter_queryset(self, queryset):
|
def filter_queryset(self, queryset):
|
||||||
|
# 解决es存储命令时,父类根据filter_fields过滤出现异常的问题,返回的queryset类型list
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
def get_date_range(self):
|
def get_date_range(self):
|
||||||
|
|
|
@ -16,7 +16,7 @@ class CommandBase(object):
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def filter(self, date_from=None, date_to=None,
|
def filter(self, date_from=None, date_to=None,
|
||||||
user=None, asset=None, system_user=None,
|
user=None, asset=None, system_user=None,
|
||||||
input=None, session=None):
|
input=None, session=None, risk_level=None, org_id=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
|
|
Loading…
Reference in New Issue