aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-25 11:15:02 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-25 21:40:50 +0200
commit8098abee608e58dad8b73a1151233be525c25483 (patch)
treec20e892b3ecaa0b3effd85dc6596770c8db7a281 /apps/files_sharing/lib
parent1afefc2d9a0dba59fc083d4682ca5787023be791 (diff)
downloadnextcloud-server-8098abee608e58dad8b73a1151233be525c25483.tar.gz
nextcloud-server-8098abee608e58dad8b73a1151233be525c25483.zip
Do not return shares with the current user
Getting the shares of a file no longer returns shares with the current user for consistency with the results when getting the shares including subfiles. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
1 files changed, 4 insertions, 0 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;