Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Updater.php')
-rw-r--r--apps/files_sharing/lib/Updater.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php
index 9b5173b489c..e22445f91fc 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -27,6 +27,7 @@
namespace OCA\Files_Sharing;
+use OCP\Constants;
use OCP\Share\IShare;
class Updater {
@@ -82,7 +83,12 @@ 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);
+ $share->setPermissions($share->getPermissions() & $dstMount->getShare()->getPermissions());
$shareManager->updateShare($share);
}
}