修改会话在未录屏时的审计状态
This commit is contained in:
parent
87b6d1c93f
commit
3fb2edb000
@ -166,6 +166,10 @@ func SSHEndpoint(c echo.Context) (err error) {
|
||||
Status: constant.Connecting,
|
||||
Recording: recording,
|
||||
}
|
||||
if sess.Recording == "" {
|
||||
// 未录屏时无需审计
|
||||
sess.Reviewed = true
|
||||
}
|
||||
// 创建新会话
|
||||
log.Debugf("创建新会话 %v", sess.ConnectionId)
|
||||
if err := sessionRepository.UpdateById(&sess, sessionId); err != nil {
|
||||
|
@ -333,6 +333,11 @@ func handleAccessAsset(sess *ssh.Session, sessionId string) (err error) {
|
||||
sessionForUpdate.Recording = recording
|
||||
sessionForUpdate.ConnectedTime = utils.NowJsonTime()
|
||||
|
||||
if sessionForUpdate.Recording == "" {
|
||||
// 未录屏时无需审计
|
||||
sessionForUpdate.Reviewed = true
|
||||
}
|
||||
|
||||
if err := sessionRepository.UpdateById(&sessionForUpdate, sessionId); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -162,6 +162,10 @@ func TunEndpoint(c echo.Context) error {
|
||||
Status: constant.Connecting,
|
||||
Recording: configuration.GetParameter(guacd.RecordingPath),
|
||||
}
|
||||
if sess.Recording == "" {
|
||||
// 未录屏时无需审计
|
||||
sess.Reviewed = true
|
||||
}
|
||||
// 创建新会话
|
||||
log.Debugf("[%v:%v] 创建新会话: %v", sessionId, connectionId, sess.ConnectionId)
|
||||
if err := sessionRepository.UpdateById(&sess, sessionId); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user