Skip to content

Commit

Permalink
Merge pull request #37448 from nextcloud/fix/12281/hide-deleted-share…
Browse files Browse the repository at this point in the history
…d-groupfolder-files

hide shared files located in group folder's trash bin
  • Loading branch information
blizzz authored Mar 30, 2023
2 parents 2eda49e + 28e7235 commit 488dde1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/private/Share20/DefaultShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
use OCP\Share\IAttributes;
use OCP\Share\IShare;
use OCP\Share\IShareProvider;
use function str_starts_with;

/**
* Class DefaultShareProvider
Expand Down Expand Up @@ -885,6 +886,11 @@ private function isAccessibleResult($data) {
if ($pathSections[0] !== 'files'
&& (strpos($data['storage_string_id'], 'home::') === 0 || strpos($data['storage_string_id'], 'object::user') === 0)) {
return false;
} elseif ($pathSections[0] === '__groupfolders'
&& str_starts_with($pathSections[1], 'trash/')
) {
// exclude shares leading to trashbin on group folders storages
return false;
}
return true;
}
Expand Down

0 comments on commit 488dde1

Please sign in to comment.