diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-19 17:44:20 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-05 12:43:57 +0200 |
commit | 6a0552224de21e137c3cfa63c589c2b3f65a0987 (patch) | |
tree | 1bbab15cbcf13090a08a6c19e9651bc7df49a365 /apps | |
parent | d805959e819e64ccf47dfa55fca96b222dedfa9a (diff) | |
download | nextcloud-server-6a0552224de21e137c3cfa63c589c2b3f65a0987.tar.gz nextcloud-server-6a0552224de21e137c3cfa63c589c2b3f65a0987.zip |
getDeletedSharedWith method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/DeletedShareAPIController.php | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php index 9dadf8e25b4..2e4f4d52d74 100644 --- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php +++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php @@ -73,17 +73,7 @@ class DeletedShareAPIController extends OCSController { * @NoAdminRequired */ public function index(): DataResponse { - $shares = $this->shareManager->getSharedWith($this->userId, \OCP\Share::SHARE_TYPE_GROUP, null, -1, 0); - - // Only get deleted shares - $shares = array_filter($shares, function(IShare $share) { - return $share->getPermissions() === 0; - }); - - // Only get shares where the owner still exists - $shares = array_filter($shares, function (IShare $share) { - return $this->userManager->userExists($share->getShareOwner()); - }); + $shares = $this->shareManager->getDeletedSharedWith($this->userId, \OCP\Share::SHARE_TYPE_GROUP, null, -1, 0); $shares = array_map(function (IShare $share) { return $this->formatShare($share); |