diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-03-28 13:48:43 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-03-28 14:13:12 +0200 |
commit | 28e7235f87434f5e62ecbc7d54b4a1879c2ce247 (patch) | |
tree | 830926f6205d93c9e4475e9017552d315abcae27 | |
parent | 7db8e222071421c90dfbcb91bfef11a22f4078b5 (diff) | |
download | nextcloud-server-28e7235f87434f5e62ecbc7d54b4a1879c2ce247.tar.gz nextcloud-server-28e7235f87434f5e62ecbc7d54b4a1879c2ce247.zip |
hide shared files located in group folder's trash bin
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-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; } |