Skip to content

Commit 2504bae

Browse files
committed
hide shared files located in group folder's trash bin
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 7db8e22 commit 2504bae

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+
} else if ($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)