Skip to content

Commit 488dde1

Browse files
authored
Merge pull request #37448 from nextcloud/fix/12281/hide-deleted-shared-groupfolder-files
hide shared files located in group folder's trash bin
2 parents 2eda49e + 28e7235 commit 488dde1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/private/Share20/DefaultShareProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
use OCP\Share\IAttributes;
5656
use OCP\Share\IShare;
5757
use OCP\Share\IShareProvider;
58+
use function str_starts_with;
5859

5960
/**
6061
* Class DefaultShareProvider
@@ -885,6 +886,11 @@ private function isAccessibleResult($data) {
885886
if ($pathSections[0] !== 'files'
886887
&& (strpos($data['storage_string_id'], 'home::') === 0 || strpos($data['storage_string_id'], 'object::user') === 0)) {
887888
return false;
889+
} elseif ($pathSections[0] === '__groupfolders'
890+
&& str_starts_with($pathSections[1], 'trash/')
891+
) {
892+
// exclude shares leading to trashbin on group folders storages
893+
return false;
888894
}
889895
return true;
890896
}

0 commit comments

Comments
 (0)