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