diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-04-03 15:40:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 15:40:24 +0200 |
commit | ca0a25803518a9dde99680b7f7479b6a5ebb42bb (patch) | |
tree | 8cb99831471b7d1a0aa9aa3b56447f00b09f0778 /lib | |
parent | 0905e5333c587404b70a663573714122c3c57c6e (diff) | |
parent | 6b4644ba1a85f4ff36bdefb3fac99dfd32d70f9b (diff) | |
download | nextcloud-server-ca0a25803518a9dde99680b7f7479b6a5ebb42bb.tar.gz nextcloud-server-ca0a25803518a9dde99680b7f7479b6a5ebb42bb.zip |
Merge pull request #37488 from nextcloud/backport/37448/stable26
[stable26] hide shared files located in group folder's trash bin
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 6 |
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; } |