mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
actions: add pre-download and pre-upload
Downloads and uploads can be denied based on hook response
This commit is contained in:
@@ -1251,10 +1251,10 @@ func TestConnection(t *testing.T) {
|
||||
assert.Empty(t, connection.GetRemoteAddress())
|
||||
assert.Empty(t, connection.GetCommand())
|
||||
name := "missing file name"
|
||||
_, err := connection.getFileReader(name, 0)
|
||||
_, err := connection.getFileReader(name, 0, http.MethodGet)
|
||||
assert.Error(t, err)
|
||||
connection.User.FsConfig.Provider = vfs.LocalFilesystemProvider
|
||||
_, err = connection.getFileReader(name, 0)
|
||||
_, err = connection.getFileReader(name, 0, http.MethodGet)
|
||||
assert.ErrorIs(t, err, os.ErrNotExist)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user