summaryrefslogtreecommitdiffstats
path: root/lib/private/Lockdown
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-05-05 18:09:53 +0200
committerRobin Appelman <robin@icewind.nl>2021-06-14 16:11:25 +0200
commit9774fb1573d30e79eb57f8956f64b13b52b7dee9 (patch)
treef7431f41db9d421773ff23381c943c82e0471e51 /lib/private/Lockdown
parente198dc1b200f3ade93498e0ea7b468c87d46748a (diff)
downloadnextcloud-server-9774fb1573d30e79eb57f8956f64b13b52b7dee9.tar.gz
nextcloud-server-9774fb1573d30e79eb57f8956f64b13b52b7dee9.zip
use searchoperation for storage filter instead of db expression
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Lockdown')
-rw-r--r--lib/private/Lockdown/Filesystem/NullCache.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php
index afa17d7a6d7..4fde9668ded 100644
--- a/lib/private/Lockdown/Filesystem/NullCache.php
+++ b/lib/private/Lockdown/Filesystem/NullCache.php
@@ -23,11 +23,13 @@
namespace OC\Lockdown\Filesystem;
use OC\Files\Cache\CacheEntry;
+use OC\Files\Search\SearchComparison;
use OCP\Constants;
-use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\FileInfo;
+use OCP\Files\Search\ISearchComparison;
+use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchQuery;
class NullCache implements ICache {
@@ -128,8 +130,8 @@ class NullCache implements ICache {
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
}
- public function getQueryFilterForStorage(IQueryBuilder $builder) {
- return 'false';
+ public function getQueryFilterForStorage(): ISearchOperator {
+ return new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'storage', -1);
}
public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry {