dont show shares you own in "shared with you"

This commit is contained in:
Robin Appelman 2016-09-07 18:38:08 +02:00
parent 1d04c9e307
commit 9adf78c155
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,7 @@ use OCP\Share\IManager;
use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\Exceptions\GenericShareException; use OCP\Share\Exceptions\GenericShareException;
use OCP\Lock\ILockingProvider; use OCP\Lock\ILockingProvider;
use OCP\Share\IShare;
/** /**
* Class Share20OCS * Class Share20OCS
@ -420,6 +421,10 @@ class Share20OCS extends OCSController {
$shares = array_merge($userShares, $groupShares); $shares = array_merge($userShares, $groupShares);
$shares = array_filter($shares, function(IShare $share) {
return $share->getShareOwner() !== $this->currentUser->getUID();
});
$formatted = []; $formatted = [];
foreach ($shares as $share) { foreach ($shares as $share) {
if ($this->canAccessShare($share)) { if ($this->canAccessShare($share)) {