Skip to content

Commit bc54c5e

Browse files
icewind1991backportbot[bot]
authored andcommitted
fix: allow moving from of non-resharable to other share if the user has delete permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent e0b6e0f commit bc54c5e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/dav/lib/Connector/Sabre/SharesPlugin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,14 @@ public function validateMoveOrCopy(string $source, string $target): bool {
262262
return true;
263263
}
264264
}
265+
266+
// if the share recipient is allow to delete from the share, they are allowed to move the file out of the share
267+
// the user moving the file out of the share to their home storage would give them share permissions and allow moving into the share
268+
//
269+
// since the 2-step move is allowed, we also allow both steps at once
270+
if ($sourceNode->isDeletable()) {
271+
return true;
272+
}
265273
}
266274

267275
throw new Forbidden('You cannot move a non-shareable node into a share');

0 commit comments

Comments
 (0)