]> 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:01:10 +0000 (19:01 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files_sharing/lib/Updater.php

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