summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-11-08 15:05:21 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-12-03 13:49:37 +0100
commitc62637da8b42ec184c252e3152bb033bd8f11561 (patch)
tree24c69bdaeb65a7900ba080cd9a1d5262efc496e1 /lib/public
parent2b19da84d5488ea35c6c27c26c78678fd8c5affb (diff)
downloadnextcloud-server-c62637da8b42ec184c252e3152bb033bd8f11561.tar.gz
nextcloud-server-c62637da8b42ec184c252e3152bb033bd8f11561.zip
Allow filtering the search results to the users home storage
This is done by adding a ```xml <d:eq> <d:prop> <oc:owner-id/> </d:prop> <d:literal>$userId</d:literal> </d:eq> ``` clause to the search query. Searching by `owner-id` can only be done with the current user id and the comparison can not be inside a `<d:not>` or `<d:or>` statement Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/Search/ISearchQuery.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/public/Files/Search/ISearchQuery.php b/lib/public/Files/Search/ISearchQuery.php
index 0929a190489..7c355ec1ef3 100644
--- a/lib/public/Files/Search/ISearchQuery.php
+++ b/lib/public/Files/Search/ISearchQuery.php
@@ -66,4 +66,11 @@ interface ISearchQuery {
* @since 12.0.0
*/
public function getUser();
+
+ /**
+ * Whether or not the search should be limited to the users home storage
+ *
+ * @return bool
+ */
+ public function limitToHome(): bool;
}