fix: allow renaming files with just update permissions#57374
fix: allow renaming files with just update permissions#57374icewind1991 wants to merge 3 commits intomasterfrom
Conversation
|
/compile |
|
(I'll rebase etc once reviewed) |
mgallien
left a comment
There was a problem hiding this comment.
tested with the desktop client and works fine
0f7b6d9 to
de3587d
Compare
|
@icewind1991 will this change be backported to stable branches ? |
de3587d to
8a6bf8a
Compare
8a6bf8a to
cd2a74f
Compare
|
/compile |
| return true; | ||
| } | ||
|
|
||
| // we allow renaming the file if either the file has update permissions |
There was a problem hiding this comment.
But does this not just mean write permissions to the file?
Do we not need to check the containing folder for update permission?
There was a problem hiding this comment.
I think that would be the delete+create case I think
There was a problem hiding this comment.
So if I share a folder with a file and only allow read+write then recipient still can rename the file inside the folder?
Would this not be unexpected as renaming is destructive if you expect the file to have a specific name?
If that is expected behavior then all good!
mgallien
left a comment
There was a problem hiding this comment.
wrong test with only partial patch applied
I can confirm that this is working fine when applied on 30.0.11
625e755 to
bc56723
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
4118102 to
ed3f042
Compare
|
/compile |
susnux
left a comment
There was a problem hiding this comment.
Makes sense but would it not make more sense to directly expose the permission in the backend?
| Boolean(node.permissions & Permission.DELETE) | ||
| && Boolean(parentPermissions & Permission.CREATE) |
There was a problem hiding this comment.
Would it not better to move the logic to the backend?
server/lib/public/Files/DavUtil.php
Line 36 in c826288
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Only moving to another folder needs the delete+create permissions, for moving in the same folder just update is enough.
TODO: