修改会话在未录屏时的审计状态

This commit is contained in:
dushixiang
2021-11-15 21:51:37 +08:00
parent 87b6d1c93f
commit 3fb2edb000
3 changed files with 13 additions and 0 deletions

View File

@ -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
}