From 9faf366ca5a38b70c8f18fbc2dd80b82e458350b Mon Sep 17 00:00:00 2001 From: Peter Prochaska Date: Mon, 22 May 2017 12:38:14 +0200 Subject: [PATCH] fix logic issue --- apps/files_sharing/lib/API/Share20OCS.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 848401ade1eb..7b0016a6953d 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -31,7 +31,7 @@ use OCP\IUser; use OCP\Files\IRootFolder; use OCP\Lock\LockedException; -use OCP\Share; +use OCP\Share\IShare; use OCP\Share\IManager; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\Exceptions\GenericShareException; @@ -443,6 +443,10 @@ private function getSharedWithMe($node = null, $includeTags) { $shares = array_merge($userShares, $groupShares); + $shares = array_filter($shares, function(IShare $share) { + return $share->getShareOwner() !== $this->currentUser->getUID(); + }); + $formatted = []; foreach ($shares as $share) { if ($this->canAccessShare($share)) {