Skip to content

Commit

Permalink
fix logic issue
Browse files Browse the repository at this point in the history
  • Loading branch information
peterprochaska committed May 22, 2017
1 parent 31b0c41 commit 9faf366
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 9faf366

Please sign in to comment.