aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-28 10:48:06 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-12-05 08:38:33 +0100
commit7a454135591b64a69c3eab2c5646c104e8df1b8c (patch)
treed0a0a80ebe3b7f1aa78fe39af45aaf60e717be81 /apps/files_sharing/lib/Controller
parentc3d223fa58fdc23333fe68976edff538cf7dbeab (diff)
downloadnextcloud-server-7a454135591b64a69c3eab2c5646c104e8df1b8c.tar.gz
nextcloud-server-7a454135591b64a69c3eab2c5646c104e8df1b8c.zip
Always do sharee lookup on lookup server in GS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib/Controller')
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index e750235470d..7bc772f3bf5 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -207,6 +207,14 @@ class ShareesAPIController extends OCSController {
$this->limit = (int) $perPage;
$this->offset = $perPage * ($page - 1);
+ // In global scale mode we always search the loogup server
+ if ($this->config->getSystemValueBool('gs.enabled', false)) {
+ $lookup = true;
+ $this->result['lookupEnabled'] = true;
+ } else {
+ $this->result['lookupEnabled'] = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes';
+ }
+
list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
// extra treatment for 'exact' subarray, with a single merge expected keys might be lost
@@ -214,7 +222,6 @@ class ShareesAPIController extends OCSController {
$result['exact'] = array_merge($this->result['exact'], $result['exact']);
}
$this->result = array_merge($this->result, $result);
- $this->result['lookupEnabled'] = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'yes') === 'yes';
$response = new DataResponse($this->result);
if ($hasMoreResults) {