Skip to content

Commit

Permalink
Merge pull request #27972 from owncloud/dont-show-shares-you-own-in-s…
Browse files Browse the repository at this point in the history
…haredwithyou

fix don show shares you own in "shared with you"
  • Loading branch information
Vincent Petry authored May 22, 2017
2 parents 878db78 + 9faf366 commit 83a788c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/files_sharing/lib/API/Share20OCS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 83a788c

Please sign in to comment.