summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-07 11:42:33 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-07 16:30:07 +0200
commit9afd160e66f2c060cb7d77d414d0c1d13ac0c3ad (patch)
tree5af9e90e90d3ebf9c002b7edc2f2003facfd6d93 /apps/federatedfilesharing/lib
parent536650c02f719cc810a0538c36113b2fa96db605 (diff)
downloadnextcloud-server-9afd160e66f2c060cb7d77d414d0c1d13ac0c3ad.tar.gz
nextcloud-server-9afd160e66f2c060cb7d77d414d0c1d13ac0c3ad.zip
allow to disable upload to lookup server, by default it is enabled
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php11
-rw-r--r--apps/federatedfilesharing/lib/Settings/Admin.php1
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index fb49978b7af..b2f2558c80c 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -963,4 +963,15 @@ class FederatedShareProvider implements IShareProvider {
$result = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no');
return ($result === 'yes') ? true : false;
}
+
+
+ /**
+ * Check if it is allowed to publish user specific data to the lookup server
+ *
+ * @return bool
+ */
+ public function isLookupServerUploadEnabled() {
+ $result = $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes');
+ return ($result === 'yes') ? true : false;
+ }
}
diff --git a/apps/federatedfilesharing/lib/Settings/Admin.php b/apps/federatedfilesharing/lib/Settings/Admin.php
index 20ff6ae6f4a..baac4b1086f 100644
--- a/apps/federatedfilesharing/lib/Settings/Admin.php
+++ b/apps/federatedfilesharing/lib/Settings/Admin.php
@@ -44,6 +44,7 @@ class Admin implements ISettings {
'outgoingServer2serverShareEnabled' => $this->fedShareProvider->isOutgoingServer2serverShareEnabled(),
'incomingServer2serverShareEnabled' => $this->fedShareProvider->isIncomingServer2serverShareEnabled(),
'lookupServerEnabled' => $this->fedShareProvider->isLookupServerQueriesEnabled(),
+ 'lookupServerUploadEnabled' => $this->fedShareProvider->isLookupServerUploadEnabled(),
];
return new TemplateResponse('federatedfilesharing', 'settings-admin', $parameters, '');