mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 08:38:11 -04:00
Drop share if moved to a parent share that does not allow resharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
932a385c56
commit
4a2804dae2
1 changed files with 5 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
namespace OCA\Files_Sharing;
|
||||
|
||||
use OCP\Constants;
|
||||
use OCP\Share\IShare;
|
||||
|
||||
class Updater {
|
||||
|
|
@ -81,6 +82,10 @@ class Updater {
|
|||
//Ownership is moved over
|
||||
foreach ($shares as $share) {
|
||||
/** @var IShare $share */
|
||||
if (!($dstMount->getShare()->getPermissions() & Constants::PERMISSION_SHARE)) {
|
||||
$shareManager->deleteShare($share);
|
||||
continue;
|
||||
}
|
||||
$share->setShareOwner($newOwner);
|
||||
$shareManager->updateShare($share);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue