]> source.dussan.org Git - nextcloud-server.git/commit
Allow filtering the search results to the users home storage
authorRobin Appelman <robin@icewind.nl>
Fri, 8 Nov 2019 14:05:21 +0000 (15:05 +0100)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Tue, 3 Dec 2019 12:49:37 +0000 (13:49 +0100)
commitc62637da8b42ec184c252e3152bb033bd8f11561
tree24c69bdaeb65a7900ba080cd9a1d5262efc496e1
parent2b19da84d5488ea35c6c27c26c78678fd8c5affb
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>
apps/dav/lib/Files/FileSearchBackend.php
apps/dav/tests/unit/Files/FileSearchBackendTest.php
lib/private/Files/Cache/Cache.php
lib/private/Files/Cache/QuerySearchHelper.php
lib/private/Files/Node/Folder.php
lib/private/Files/Search/SearchQuery.php
lib/public/Files/Search/ISearchQuery.php