fix: allow moving from of non-resharable to other share if the user has delete permissions

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/57368/head
Robin Appelman 2025-12-29 16:53:06 +07:00 committed by backportbot[bot]
parent e0b6e0fa67
commit bc54c5e357
1 changed files with 8 additions and 0 deletions

@ -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');