From 39c8141f0c14cd41067f9ca144848aff461d1795 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 29 Dec 2025 16:53:06 +0100 Subject: [PATCH] fix: allow moving from of non-resharable to other share if the user has delete permissions Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/SharesPlugin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index ee28bc2db95..b8d6c52486b 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -262,6 +262,14 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { return true; } } + + // if the share recipient is allow to delete from the share, they are allowed to move the file out of the share + // the user moving the file out of the share to their home storage would give them share permissions and allow moving into the share + // + // since the 2-step move is allowed, we also allow both steps at once + if ($sourceNode->isDeletable()) { + return true; + } } throw new Forbidden('You cannot move a non-shareable node into a share');