]> source.dussan.org Git - nextcloud-server.git/commitdiff
When changing the share owner, downgrade permissions where needed
authorJulius Härtl <jus@bitgrid.net>
Thu, 15 Apr 2021 10:51:35 +0000 (12:51 +0200)
committerJulius Härtl <jus@bitgrid.net>
Tue, 29 Jun 2021 17:00:21 +0000 (19:00 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files_sharing/lib/Updater.php

index 7ca4f005b661a0f210220e9a51de3f74dbc7cc5b..afff32c650a3fc932f8130105b7a369975b2e554 100644 (file)
@@ -88,6 +88,7 @@ class Updater {
                                continue;
                        }
                        $share->setShareOwner($newOwner);
+                       $share->setPermissions($share->getPermissions() & $dstMount->getShare()->getPermissions());
                        $shareManager->updateShare($share);
                }
        }