]> source.dussan.org Git - nextcloud-server.git/commitdiff
confirm resharing rights if viewer is current owner 18630/head
authorMaxence Lange <maxence@artificial-owl.com>
Thu, 2 Jan 2020 12:33:27 +0000 (11:33 -0100)
committerMaxence Lange <maxence@artificial-owl.com>
Thu, 2 Jan 2020 12:34:20 +0000 (11:34 -0100)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
apps/files_sharing/lib/Controller/ShareAPIController.php

index d5c14a1daf17ed278b096accd06cc35cd5bd1230..906eb82221bf40f5c42b61c9a18e68ff86f6f98d 100644 (file)
@@ -1462,6 +1462,10 @@ class ShareAPIController extends OCSController {
         * @return bool
         */
        private function hasResharingRights($viewer, $node): bool {
+               if ($viewer === $node->getOwner()->getUID()) {
+                       return true;
+               }
+
                foreach ([$node, $node->getParent()] as $node) {
                        $shares = $this->getSharesFromNode($viewer, $node, true);
                        foreach ($shares as $share) {