From 06bfbb4a8c709ece9eb0fd2b41a7a3e29ae70960 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 15 Apr 2021 12:51:35 +0200 Subject: 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(+) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php index 19ff13d8950..9ce114f495d 100644 --- a/apps/files_sharing/lib/Updater.php +++ b/apps/files_sharing/lib/Updater.php @@ -87,6 +87,7 @@ class Updater { continue; } $share->setShareOwner($newOwner); + $share->setPermissions($share->getPermissions() & $dstMount->getShare()->getPermissions()); $shareManager->updateShare($share); } } -- cgit v1.2.3