diff options
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareAPIControllerTest.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index c35faabfa12..218d854f2f1 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -723,6 +723,10 @@ class ShareAPIController extends OCSController { $resharingRight = false; foreach ($shares as $share) { /** @var IShare $share */ + if ($share->getSharedWith() === $this->currentUser) { + continue; + } + try { $format = $this->formatShare($share, $path); $formatted[] = $format; diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index 7c77406e4b5..c972c5c794e 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -1018,7 +1018,6 @@ class ShareAPIControllerTest extends TestCase { ], [ $file1UserShareOwnerExpected, - $file1UserShareRecipientExpected, ] ], [ @@ -1034,7 +1033,6 @@ class ShareAPIControllerTest extends TestCase { ], [ $file1UserShareOwnerExpected, - $file1UserShareRecipientExpected, $file1UserShareInitiatorExpected, $file1UserShareOtherExpected, ] |