diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index d5c14a1daf17ed278b096accd06cc35cd5bd1230..906eb82221bf40f5c42b61c9a18e68ff86f6f98d 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -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) {