From e981072f4aff69258e6b7a662f00d5b8bba1d968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 15 Apr 2021 12:51:35 +0200 Subject: [PATCH] When changing the share owner, downgrade permissions where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/lib/Updater.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php index 7ca4f005b66..afff32c650a 100644 --- a/apps/files_sharing/lib/Updater.php +++ b/apps/files_sharing/lib/Updater.php @@ -88,6 +88,7 @@ class Updater { continue; } $share->setShareOwner($newOwner); + $share->setPermissions($share->getPermissions() & $dstMount->getShare()->getPermissions()); $shareManager->updateShare($share); } }