mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
fix: allow moving from of non-resharable to other share if the user has delete permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
4283f4790b
commit
39c8141f0c
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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue