summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-11-18 17:39:08 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-21 11:30:02 +0100
commit7b3855a3752053a440837fe0999e99cff7291dbc (patch)
tree463af9f9dad9ac28dcd1f98d257d9c5d2ae4950b /apps/federatedfilesharing/lib
parentc49b0d383481a698b644187ff27cebdbee765444 (diff)
downloadnextcloud-server-7b3855a3752053a440837fe0999e99cff7291dbc.tar.gz
nextcloud-server-7b3855a3752053a440837fe0999e99cff7291dbc.zip
Add config switch
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php10
-rw-r--r--apps/federatedfilesharing/lib/Settings/Admin.php1
2 files changed, 11 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 6481abe32e2..61f1b1c8f18 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -943,4 +943,14 @@ class FederatedShareProvider implements IShareProvider {
$result = $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes');
return ($result === 'yes') ? true : false;
}
+
+ /**
+ * Check if querying sharees on the lookup server is enabled
+ *
+ * @return bool
+ */
+ public function isLookupServerQueriesEnabled() {
+ $result = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no');
+ return ($result === 'yes') ? true : false;
+ }
}
diff --git a/apps/federatedfilesharing/lib/Settings/Admin.php b/apps/federatedfilesharing/lib/Settings/Admin.php
index 64619e329f3..20ff6ae6f4a 100644
--- a/apps/federatedfilesharing/lib/Settings/Admin.php
+++ b/apps/federatedfilesharing/lib/Settings/Admin.php
@@ -43,6 +43,7 @@ class Admin implements ISettings {
$parameters = [
'outgoingServer2serverShareEnabled' => $this->fedShareProvider->isOutgoingServer2serverShareEnabled(),
'incomingServer2serverShareEnabled' => $this->fedShareProvider->isIncomingServer2serverShareEnabled(),
+ 'lookupServerEnabled' => $this->fedShareProvider->isLookupServerQueriesEnabled(),
];
return new TemplateResponse('federatedfilesharing', 'settings-admin', $parameters, '');