]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont show shares you own in "shared with you" 1310/head
authorRobin Appelman <robin@icewind.nl>
Wed, 7 Sep 2016 16:38:08 +0000 (18:38 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 7 Sep 2016 16:38:08 +0000 (18:38 +0200)
apps/files_sharing/lib/API/Share20OCS.php

index 3e91da37a7d882dc281f9cdca3f519bcc03be578..62a947ee2c9e4c0f43f045d3b747f3ab2446de2e 100644 (file)
@@ -42,6 +42,7 @@ use OCP\Share\IManager;
 use OCP\Share\Exceptions\ShareNotFound;
 use OCP\Share\Exceptions\GenericShareException;
 use OCP\Lock\ILockingProvider;
+use OCP\Share\IShare;
 
 /**
  * Class Share20OCS
@@ -420,6 +421,10 @@ class Share20OCS extends OCSController {
 
                $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)) {