mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 18:59:47 +00:00
fix: es命令记录可以看到其他资产执行的命令
This commit is contained in:
@@ -167,7 +167,6 @@ class CommandViewSet(JMSBulkModelViewSet):
|
||||
|
||||
def get_queryset(self):
|
||||
command_storage_id = self.request.query_params.get('command_storage_id')
|
||||
asset_id = self.request.query_params.get('asset_id')
|
||||
if not command_storage_id:
|
||||
return Command.objects.none()
|
||||
|
||||
@@ -176,9 +175,6 @@ class CommandViewSet(JMSBulkModelViewSet):
|
||||
raise StorageInvalid
|
||||
else:
|
||||
qs = storage.get_command_queryset()
|
||||
if asset_id:
|
||||
session_ids = Session.objects.filter(asset_id=asset_id).values_list('id', flat=True)
|
||||
qs = qs.filter(session__in=list(session_ids))
|
||||
return qs
|
||||
|
||||
def create(self, request, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user