mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
simplify rename permission
before this patch we allow a rename in the following cases: - the user has rename permission on both source and target path - the user has delete permission on source path and create/upload on target path we now check only the rename/rename_files/rename_dirs permissions. This is what SFTPGo users expect. This is a backward incompatible change and it will not backported to the 2.2.x branch Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1760,7 +1760,8 @@ func TestQuotaRenameToVirtualFolder(t *testing.T) {
|
||||
QuotaSize: 0,
|
||||
})
|
||||
u.Permissions[vdirPath1] = []string{dataprovider.PermListItems, dataprovider.PermDownload, dataprovider.PermUpload,
|
||||
dataprovider.PermOverwrite, dataprovider.PermDelete, dataprovider.PermCreateSymlinks, dataprovider.PermCreateDirs}
|
||||
dataprovider.PermOverwrite, dataprovider.PermDelete, dataprovider.PermCreateSymlinks, dataprovider.PermCreateDirs,
|
||||
dataprovider.PermRename}
|
||||
user, _, err := httpdtest.AddUser(u, http.StatusCreated)
|
||||
assert.NoError(t, err)
|
||||
conn, client, err := getSftpClient(user)
|
||||
|
||||
Reference in New Issue
Block a user