aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib/Settings/Admin.php
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-05-24 09:07:58 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-05-29 18:19:28 +0200
commit7c2d473d7686f4824d3b7f05238d262e26d5efa2 (patch)
treef4aae21880e293a2ded78e63ee3300b61b5f487f /apps/federatedfilesharing/lib/Settings/Admin.php
parent4be17dff0f9846d32f9740e7d7766bdbc1e98b51 (diff)
downloadnextcloud-server-7c2d473d7686f4824d3b7f05238d262e26d5efa2.tar.gz
nextcloud-server-7c2d473d7686f4824d3b7f05238d262e26d5efa2.zip
add new config switched for the global scale architecture
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/lib/Settings/Admin.php')
-rw-r--r--apps/federatedfilesharing/lib/Settings/Admin.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/lib/Settings/Admin.php b/apps/federatedfilesharing/lib/Settings/Admin.php
index baac4b1086f..47470fd5841 100644
--- a/apps/federatedfilesharing/lib/Settings/Admin.php
+++ b/apps/federatedfilesharing/lib/Settings/Admin.php
@@ -25,6 +25,7 @@ namespace OCA\FederatedFileSharing\Settings;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\GlobalScale\IConfig;
use OCP\Settings\ISettings;
class Admin implements ISettings {
@@ -32,15 +33,27 @@ class Admin implements ISettings {
/** @var FederatedShareProvider */
private $fedShareProvider;
- public function __construct(FederatedShareProvider $fedShareProvider) {
+ /** @var IConfig */
+ private $gsConfig;
+
+ /**
+ * Admin constructor.
+ *
+ * @param FederatedShareProvider $fedShareProvider
+ * @param IConfig $globalScaleConfig
+ */
+ public function __construct(FederatedShareProvider $fedShareProvider, IConfig $globalScaleConfig) {
$this->fedShareProvider = $fedShareProvider;
+ $this->gsConfig = $globalScaleConfig;
}
/**
* @return TemplateResponse
*/
public function getForm() {
+
$parameters = [
+ 'internalOnly' => $this->gsConfig->onlyInternalFederation(),
'outgoingServer2serverShareEnabled' => $this->fedShareProvider->isOutgoingServer2serverShareEnabled(),
'incomingServer2serverShareEnabled' => $this->fedShareProvider->isIncomingServer2serverShareEnabled(),
'lookupServerEnabled' => $this->fedShareProvider->isLookupServerQueriesEnabled(),