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')
-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 e035ed51ec8..9ce114f495d 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -26,6 +26,7 @@
*/
namespace OCA\Files_Sharing;
+use OCP\Constants;
use OCP\Share\IShare;
class Updater {
@@ -81,7 +82,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);
}
}