Since upgrading to Nextcloud 15.0.12 and some days later to 15.0.13 (I was on 15.0.something), resharing is not working on my instance.
Found this forum thread: https://help.nextcloud.com/t/problems-with-federated-shares-and-permissions-resharing/60927/3. I have the same error message in my logs.
The proposed patch by SSJ3Vegotenks solved my issue:
--- Manager.php.bak 2019-11-14 17:21:12.447131121 -0500
+++ Manager.php 2019-11-15 11:31:03.870137846 -0500
@@ -303,11 +303,13 @@
$incomingShares = array_merge($incomingShares, $this->getSharedWith($share->getSharedBy(), Share::SHARE_TYPE_ROOM, $userMountPoint, -1, 0));
/** @var \OCP\Share\IShare[] $incomingShares */
- if (!empty($incomingShares)) {
+ if (empty($incomingShares)) {
+ $permissions = $share->getNode()->getPermissions();
+ } else {
$permissions = 0;
- foreach ($incomingShares as $incomingShare) {
- $permissions |= $incomingShare->getPermissions();
- }
+ foreach ($incomingShares as $incomingShare) {
+ $permissions |= $incomingShare->getPermissions();
+ }
}
} else {
/*
Since upgrading to Nextcloud 15.0.12 and some days later to 15.0.13 (I was on 15.0.something), resharing is not working on my instance.
Found this forum thread: https://help.nextcloud.com/t/problems-with-federated-shares-and-permissions-resharing/60927/3. I have the same error message in my logs.
The proposed patch by SSJ3Vegotenks solved my issue: