diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-07 22:05:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 22:05:44 +0200 |
commit | 25a1a68bc9eb827965495627ab11d3dfc7c3c09e (patch) | |
tree | d4be9543bf82c0b8ee56b6342ea1bb8d763c4ea3 /apps | |
parent | 0a33ebdb1376903b29a85d7b7d8d63b0d75b01ba (diff) | |
parent | 9adf78c155bd0980e14e9ddf12fbb280503f8076 (diff) | |
download | nextcloud-server-25a1a68bc9eb827965495627ab11d3dfc7c3c09e.tar.gz nextcloud-server-25a1a68bc9eb827965495627ab11d3dfc7c3c09e.zip |
Merge pull request #1310 from nextcloud/shared-with-you-owner
dont show shares you own in "shared with you"
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/API/Share20OCS.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 3e91da37a7d..62a947ee2c9 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -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)) { |