aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-03-30 10:31:16 +0200
committerGitHub <noreply@github.com>2023-03-30 10:31:16 +0200
commit488dde12cd2d331ae64e3f4e6c7ad1937461b241 (patch)
treed88835257c13775d045ce9f2ed3603eb8fb439b4
parent2eda49e28d4ae80079a25ceb8566b9b6df9daeba (diff)
parent28e7235f87434f5e62ecbc7d54b4a1879c2ce247 (diff)
downloadnextcloud-server-488dde12cd2d331ae64e3f4e6c7ad1937461b241.tar.gz
nextcloud-server-488dde12cd2d331ae64e3f4e6c7ad1937461b241.zip
Merge pull request #37448 from nextcloud/fix/12281/hide-deleted-shared-groupfolder-files
hide shared files located in group folder's trash bin
-rw-r--r--lib/private/Share20/DefaultShareProvider.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 215b47344b5..9dd862abb31 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -55,6 +55,7 @@ use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IAttributes;
use OCP\Share\IShare;
use OCP\Share\IShareProvider;
+use function str_starts_with;
/**
* Class DefaultShareProvider
@@ -885,6 +886,11 @@ class DefaultShareProvider implements IShareProvider {
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;
}