mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
restore fast path for recursive permissions check and update some docs
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1991,7 +1991,18 @@ func TestRecursiveCopyErrors(t *testing.T) {
|
||||
args: []string{"adir", "another"},
|
||||
}
|
||||
// try to copy a missing directory
|
||||
err = sshCmd.checkRecursiveCopyPermissions(fs, fs, "adir", "another", "/another")
|
||||
sshCmd.connection.User.Permissions["/another"] = []string{
|
||||
dataprovider.PermCreateDirs,
|
||||
dataprovider.PermCreateSymlinks,
|
||||
dataprovider.PermListItems,
|
||||
}
|
||||
err = sshCmd.checkRecursiveCopyPermissions(fs, fs, "adir", "another/sub", "/adir", "/another/sub")
|
||||
assert.Error(t, err)
|
||||
sshCmd.connection.User.Permissions["/another"] = []string{
|
||||
dataprovider.PermListItems,
|
||||
dataprovider.PermCreateDirs,
|
||||
}
|
||||
err = sshCmd.checkRecursiveCopyPermissions(fs, fs, "adir", "another", "/adir/sub", "/another/sub/dir")
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user