Add sftp.read to activity log
This commit is contained in:
parent
1d8b383682
commit
bac8ad302d
|
@ -15,6 +15,7 @@ const ActivityPowerPrefix = "server:power."
|
|||
const (
|
||||
ActivityConsoleCommand = models.Event("server:console.command")
|
||||
ActivitySftpWrite = models.Event("server:sftp.write")
|
||||
ActivitySftpRead = models.Event("server:sftp.read")
|
||||
ActivitySftpCreate = models.Event("server:sftp.create")
|
||||
ActivitySftpCreateDirectory = models.Event("server:sftp.create-directory")
|
||||
ActivitySftpRename = models.Event("server:sftp.rename")
|
||||
|
|
|
@ -87,6 +87,8 @@ func (h *Handler) Fileread(request *sftp.Request) (io.ReaderAt, error) {
|
|||
}
|
||||
return nil, sftp.ErrSSHFxNoSuchFile
|
||||
}
|
||||
|
||||
h.events.MustLog(server.ActivitySftpRead, FileAction{Entity: request.Filepath})
|
||||
return f, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user