mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
feat: session.Task model add kwargs
field (记录kill_session的用户名称)
This commit is contained in:
@@ -31,7 +31,9 @@ class KillSessionAPI(APIView):
|
||||
if session and not session.is_finished:
|
||||
validated_session.append(session_id)
|
||||
self.model.objects.create(
|
||||
name="kill_session", args=session.id,
|
||||
terminal=session.terminal,
|
||||
name="kill_session", args=session.id, terminal=session.terminal,
|
||||
kwargs={
|
||||
'terminated_by_user': str(request.user)
|
||||
}
|
||||
)
|
||||
return Response({"ok": validated_session})
|
||||
|
Reference in New Issue
Block a user