summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-04-15 12:51:35 +0200
committerJulius Härtl <jus@bitgrid.net>2021-06-09 10:32:36 +0200
commit06bfbb4a8c709ece9eb0fd2b41a7a3e29ae70960 (patch)
treefa54ac654cf7b7a409b6e353fe2e75d0f551f71d /apps/files_sharing/lib
parent4a2804dae28bf0206d015f2a16db8c35e72687bb (diff)
downloadnextcloud-server-06bfbb4a8c709ece9eb0fd2b41a7a3e29ae70960.tar.gz
nextcloud-server-06bfbb4a8c709ece9eb0fd2b41a7a3e29ae70960.zip
When changing the share owner, downgrade permissions where needed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Updater.php1
1 files changed, 1 insertions, 0 deletions
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);
}
}