aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federation
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federation')
-rw-r--r--apps/federation/api/ocsauthapi.php176
-rw-r--r--apps/federation/appinfo/app.php26
-rw-r--r--apps/federation/appinfo/application.php186
-rw-r--r--apps/federation/appinfo/database.xml68
-rw-r--r--apps/federation/appinfo/info.xml39
-rw-r--r--apps/federation/appinfo/install.php23
-rw-r--r--apps/federation/appinfo/register_command.php26
-rw-r--r--apps/federation/appinfo/routes.php76
-rw-r--r--apps/federation/appinfo/update.php23
-rw-r--r--apps/federation/backgroundjob/getsharedsecret.php200
-rw-r--r--apps/federation/backgroundjob/requestsharedsecret.php184
-rw-r--r--apps/federation/command/syncfederationaddressbooks.php74
-rw-r--r--apps/federation/composer/autoload.php25
-rw-r--r--apps/federation/composer/composer.json13
-rw-r--r--apps/federation/composer/composer.lock18
-rw-r--r--apps/federation/composer/composer/ClassLoader.php579
-rw-r--r--apps/federation/composer/composer/InstalledVersions.php359
-rw-r--r--apps/federation/composer/composer/LICENSE21
-rw-r--r--apps/federation/composer/composer/autoload_classmap.php24
-rw-r--r--apps/federation/composer/composer/autoload_namespaces.php9
-rw-r--r--apps/federation/composer/composer/autoload_psr4.php10
-rw-r--r--apps/federation/composer/composer/autoload_real.php37
-rw-r--r--apps/federation/composer/composer/autoload_static.php50
-rw-r--r--apps/federation/composer/composer/installed.json5
-rw-r--r--apps/federation/composer/composer/installed.php23
-rw-r--r--apps/federation/controller/settingscontroller.php122
-rw-r--r--apps/federation/css/settings-admin.css37
-rw-r--r--apps/federation/dav/fedauth.php54
-rw-r--r--apps/federation/img/app.svg5
-rw-r--r--apps/federation/js/settings-admin.js191
-rw-r--r--apps/federation/l10n/ar.js21
-rw-r--r--apps/federation/l10n/ar.json19
-rw-r--r--apps/federation/l10n/ast.js17
-rw-r--r--apps/federation/l10n/ast.json15
-rw-r--r--apps/federation/l10n/bg.js14
-rw-r--r--apps/federation/l10n/bg.json12
-rw-r--r--apps/federation/l10n/br.js14
-rw-r--r--apps/federation/l10n/br.json12
-rw-r--r--apps/federation/l10n/ca.js22
-rw-r--r--apps/federation/l10n/ca.json22
-rw-r--r--apps/federation/l10n/cs.js21
-rw-r--r--apps/federation/l10n/cs.json19
-rw-r--r--apps/federation/l10n/cs_CZ.js15
-rw-r--r--apps/federation/l10n/cs_CZ.json13
-rw-r--r--apps/federation/l10n/da.js22
-rw-r--r--apps/federation/l10n/da.json22
-rw-r--r--apps/federation/l10n/de.js24
-rw-r--r--apps/federation/l10n/de.json24
-rw-r--r--apps/federation/l10n/de_DE.js22
-rw-r--r--apps/federation/l10n/de_DE.json22
-rw-r--r--apps/federation/l10n/el.js10
-rw-r--r--apps/federation/l10n/el.json10
-rw-r--r--apps/federation/l10n/en_GB.js20
-rw-r--r--apps/federation/l10n/en_GB.json20
-rw-r--r--apps/federation/l10n/eo.js12
-rw-r--r--apps/federation/l10n/eo.json12
-rw-r--r--apps/federation/l10n/es.js24
-rw-r--r--apps/federation/l10n/es.json24
-rw-r--r--apps/federation/l10n/es_419.js14
-rw-r--r--apps/federation/l10n/es_419.json12
-rw-r--r--apps/federation/l10n/es_AR.js14
-rw-r--r--apps/federation/l10n/es_AR.json12
-rw-r--r--apps/federation/l10n/es_CL.js14
-rw-r--r--apps/federation/l10n/es_CL.json12
-rw-r--r--apps/federation/l10n/es_CO.js14
-rw-r--r--apps/federation/l10n/es_CO.json12
-rw-r--r--apps/federation/l10n/es_CR.js14
-rw-r--r--apps/federation/l10n/es_CR.json12
-rw-r--r--apps/federation/l10n/es_DO.js14
-rw-r--r--apps/federation/l10n/es_DO.json12
-rw-r--r--apps/federation/l10n/es_EC.js14
-rw-r--r--apps/federation/l10n/es_EC.json12
-rw-r--r--apps/federation/l10n/es_GT.js14
-rw-r--r--apps/federation/l10n/es_GT.json12
-rw-r--r--apps/federation/l10n/es_HN.js14
-rw-r--r--apps/federation/l10n/es_HN.json12
-rw-r--r--apps/federation/l10n/es_MX.js17
-rw-r--r--apps/federation/l10n/es_MX.json15
-rw-r--r--apps/federation/l10n/es_NI.js14
-rw-r--r--apps/federation/l10n/es_NI.json12
-rw-r--r--apps/federation/l10n/es_PA.js14
-rw-r--r--apps/federation/l10n/es_PA.json12
-rw-r--r--apps/federation/l10n/es_PE.js14
-rw-r--r--apps/federation/l10n/es_PE.json12
-rw-r--r--apps/federation/l10n/es_PR.js14
-rw-r--r--apps/federation/l10n/es_PR.json12
-rw-r--r--apps/federation/l10n/es_PY.js14
-rw-r--r--apps/federation/l10n/es_PY.json12
-rw-r--r--apps/federation/l10n/es_SV.js14
-rw-r--r--apps/federation/l10n/es_SV.json12
-rw-r--r--apps/federation/l10n/es_UY.js14
-rw-r--r--apps/federation/l10n/es_UY.json12
-rw-r--r--apps/federation/l10n/et_EE.js18
-rw-r--r--apps/federation/l10n/et_EE.json18
-rw-r--r--apps/federation/l10n/eu.js21
-rw-r--r--apps/federation/l10n/eu.json19
-rw-r--r--apps/federation/l10n/fa.js14
-rw-r--r--apps/federation/l10n/fa.json12
-rw-r--r--apps/federation/l10n/fi.js14
-rw-r--r--apps/federation/l10n/fi.json12
-rw-r--r--apps/federation/l10n/fi_FI.js15
-rw-r--r--apps/federation/l10n/fi_FI.json13
-rw-r--r--apps/federation/l10n/fr.js24
-rw-r--r--apps/federation/l10n/fr.json24
-rw-r--r--apps/federation/l10n/ga.js21
-rw-r--r--apps/federation/l10n/ga.json19
-rw-r--r--apps/federation/l10n/gl.js21
-rw-r--r--apps/federation/l10n/gl.json19
-rw-r--r--apps/federation/l10n/he.js15
-rw-r--r--apps/federation/l10n/he.json15
-rw-r--r--apps/federation/l10n/hr.js14
-rw-r--r--apps/federation/l10n/hr.json12
-rw-r--r--apps/federation/l10n/hu.js21
-rw-r--r--apps/federation/l10n/hu.json19
-rw-r--r--apps/federation/l10n/hu_HU.js15
-rw-r--r--apps/federation/l10n/hu_HU.json13
-rw-r--r--apps/federation/l10n/ia.js14
-rw-r--r--apps/federation/l10n/ia.json12
-rw-r--r--apps/federation/l10n/id.js14
-rw-r--r--apps/federation/l10n/id.json12
-rw-r--r--apps/federation/l10n/is.js22
-rw-r--r--apps/federation/l10n/is.json22
-rw-r--r--apps/federation/l10n/it.js22
-rw-r--r--apps/federation/l10n/it.json22
-rw-r--r--apps/federation/l10n/ja.js22
-rw-r--r--apps/federation/l10n/ja.json22
-rw-r--r--apps/federation/l10n/ka.js14
-rw-r--r--apps/federation/l10n/ka.json12
-rw-r--r--apps/federation/l10n/ka_GE.js14
-rw-r--r--apps/federation/l10n/ka_GE.json12
-rw-r--r--apps/federation/l10n/ko.js18
-rw-r--r--apps/federation/l10n/ko.json18
-rw-r--r--apps/federation/l10n/lt_LT.js16
-rw-r--r--apps/federation/l10n/lt_LT.json14
-rw-r--r--apps/federation/l10n/lv.js14
-rw-r--r--apps/federation/l10n/lv.json12
-rw-r--r--apps/federation/l10n/mk.js14
-rw-r--r--apps/federation/l10n/mk.json12
-rw-r--r--apps/federation/l10n/mn.js14
-rw-r--r--apps/federation/l10n/mn.json12
-rw-r--r--apps/federation/l10n/nb.js19
-rw-r--r--apps/federation/l10n/nb.json17
-rw-r--r--apps/federation/l10n/nb_NO.js15
-rw-r--r--apps/federation/l10n/nb_NO.json13
-rw-r--r--apps/federation/l10n/nl.js20
-rw-r--r--apps/federation/l10n/nl.json20
-rw-r--r--apps/federation/l10n/pl.js24
-rw-r--r--apps/federation/l10n/pl.json24
-rw-r--r--apps/federation/l10n/pt_BR.js24
-rw-r--r--apps/federation/l10n/pt_BR.json24
-rw-r--r--apps/federation/l10n/pt_PT.js15
-rw-r--r--apps/federation/l10n/pt_PT.json15
-rw-r--r--apps/federation/l10n/ru.js23
-rw-r--r--apps/federation/l10n/ru.json23
-rw-r--r--apps/federation/l10n/sc.js14
-rw-r--r--apps/federation/l10n/sc.json12
-rw-r--r--apps/federation/l10n/sk.js21
-rw-r--r--apps/federation/l10n/sk.json19
-rw-r--r--apps/federation/l10n/sl.js20
-rw-r--r--apps/federation/l10n/sl.json20
-rw-r--r--apps/federation/l10n/sq.js17
-rw-r--r--apps/federation/l10n/sq.json17
-rw-r--r--apps/federation/l10n/sr.js24
-rw-r--r--apps/federation/l10n/sr.json24
-rw-r--r--apps/federation/l10n/sv.js22
-rw-r--r--apps/federation/l10n/sv.json22
-rw-r--r--apps/federation/l10n/sw.js21
-rw-r--r--apps/federation/l10n/sw.json19
-rw-r--r--apps/federation/l10n/th_TH.js11
-rw-r--r--apps/federation/l10n/th_TH.json9
-rw-r--r--apps/federation/l10n/tr.js20
-rw-r--r--apps/federation/l10n/tr.json20
-rw-r--r--apps/federation/l10n/ug.js17
-rw-r--r--apps/federation/l10n/ug.json15
-rw-r--r--apps/federation/l10n/uk.js18
-rw-r--r--apps/federation/l10n/uk.json18
-rw-r--r--apps/federation/l10n/vi.js14
-rw-r--r--apps/federation/l10n/vi.json12
-rw-r--r--apps/federation/l10n/zh_CN.js24
-rw-r--r--apps/federation/l10n/zh_CN.json24
-rw-r--r--apps/federation/l10n/zh_HK.js21
-rw-r--r--apps/federation/l10n/zh_HK.json19
-rw-r--r--apps/federation/l10n/zh_TW.js21
-rw-r--r--apps/federation/l10n/zh_TW.json19
-rw-r--r--apps/federation/lib/AppInfo/Application.php32
-rw-r--r--apps/federation/lib/BackgroundJob/GetSharedSecret.php176
-rw-r--r--apps/federation/lib/BackgroundJob/RequestSharedSecret.php173
-rw-r--r--apps/federation/lib/Command/SyncFederationAddressBooks.php45
-rw-r--r--apps/federation/lib/Controller/OCSAuthAPIController.php169
-rw-r--r--apps/federation/lib/Controller/SettingsController.php125
-rw-r--r--apps/federation/lib/DAV/FedAuth.php52
-rw-r--r--apps/federation/lib/DbHandler.php268
-rw-r--r--apps/federation/lib/Listener/SabrePluginAuthInitListener.php38
-rw-r--r--apps/federation/lib/Migration/Version1010Date20200630191302.php66
-rw-r--r--apps/federation/lib/Settings/Admin.php57
-rw-r--r--apps/federation/lib/SyncFederationAddressBooks.php94
-rw-r--r--apps/federation/lib/SyncJob.php35
-rw-r--r--apps/federation/lib/TrustedServers.php209
-rw-r--r--apps/federation/lib/dbhandler.php318
-rw-r--r--apps/federation/lib/hooks.php50
-rw-r--r--apps/federation/lib/syncfederationaddressbooks.php82
-rw-r--r--apps/federation/lib/syncjob.php43
-rw-r--r--apps/federation/lib/trustedservers.php270
-rw-r--r--apps/federation/middleware/addservermiddleware.php72
-rw-r--r--apps/federation/openapi-administration.json431
-rw-r--r--apps/federation/openapi-administration.json.license2
-rw-r--r--apps/federation/openapi-federation.json511
-rw-r--r--apps/federation/openapi-federation.json.license2
-rw-r--r--apps/federation/openapi-full.json885
-rw-r--r--apps/federation/openapi-full.json.license2
-rw-r--r--apps/federation/settings/settings-admin.php44
-rw-r--r--apps/federation/templates/settings-admin.php68
-rw-r--r--apps/federation/tests/BackgroundJob/GetSharedSecretTest.php262
-rw-r--r--apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php243
-rw-r--r--apps/federation/tests/Controller/OCSAuthAPIControllerTest.php167
-rw-r--r--apps/federation/tests/Controller/SettingsControllerTest.php146
-rw-r--r--apps/federation/tests/DAV/FedAuthTest.php33
-rw-r--r--apps/federation/tests/DbHandlerTest.php (renamed from apps/federation/tests/lib/dbhandlertest.php)198
-rw-r--r--apps/federation/tests/Settings/AdminTest.php50
-rw-r--r--apps/federation/tests/SyncFederationAddressbooksTest.php108
-rw-r--r--apps/federation/tests/TrustedServersTest.php339
-rw-r--r--apps/federation/tests/api/ocsauthapitest.php194
-rw-r--r--apps/federation/tests/backgroundjob/getsharedsecrettest.php211
-rw-r--r--apps/federation/tests/backgroundjob/requestsharedsecrettest.php181
-rw-r--r--apps/federation/tests/controller/settingscontrollertest.php166
-rw-r--r--apps/federation/tests/dav/fedauthtest.php52
-rw-r--r--apps/federation/tests/lib/hookstest.php79
-rw-r--r--apps/federation/tests/lib/syncfederationaddressbookstest.php88
-rw-r--r--apps/federation/tests/lib/trustedserverstest.php372
-rw-r--r--apps/federation/tests/middleware/addservermiddlewaretest.php102
230 files changed, 8270 insertions, 4293 deletions
diff --git a/apps/federation/api/ocsauthapi.php b/apps/federation/api/ocsauthapi.php
deleted file mode 100644
index 1c4e73cc8de..00000000000
--- a/apps/federation/api/ocsauthapi.php
+++ /dev/null
@@ -1,176 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Roeland Jago Douma <rullzer@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\API;
-
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Http;
-use OCP\BackgroundJob\IJobList;
-use OCP\ILogger;
-use OCP\IRequest;
-use OCP\Security\ISecureRandom;
-
-/**
- * Class OCSAuthAPI
- *
- * OCS API end-points to exchange shared secret between two connected ownClouds
- *
- * @package OCA\Federation\API
- */
-class OCSAuthAPI {
-
- /** @var IRequest */
- private $request;
-
- /** @var ISecureRandom */
- private $secureRandom;
-
- /** @var IJobList */
- private $jobList;
-
- /** @var TrustedServers */
- private $trustedServers;
-
- /** @var DbHandler */
- private $dbHandler;
-
- /** @var ILogger */
- private $logger;
-
- /**
- * OCSAuthAPI constructor.
- *
- * @param IRequest $request
- * @param ISecureRandom $secureRandom
- * @param IJobList $jobList
- * @param TrustedServers $trustedServers
- * @param DbHandler $dbHandler
- * @param ILogger $logger
- */
- public function __construct(
- IRequest $request,
- ISecureRandom $secureRandom,
- IJobList $jobList,
- TrustedServers $trustedServers,
- DbHandler $dbHandler,
- ILogger $logger
- ) {
- $this->request = $request;
- $this->secureRandom = $secureRandom;
- $this->jobList = $jobList;
- $this->trustedServers = $trustedServers;
- $this->dbHandler = $dbHandler;
- $this->logger = $logger;
- }
-
- /**
- * request received to ask remote server for a shared secret
- *
- * @return \OC_OCS_Result
- */
- public function requestSharedSecret() {
-
- $url = $this->request->getParam('url');
- $token = $this->request->getParam('token');
-
- if ($this->trustedServers->isTrustedServer($url) === false) {
- $this->logger->error('remote server not trusted (' . $url . ') while requesting shared secret', ['app' => 'federation']);
- return new \OC_OCS_Result(null, HTTP::STATUS_FORBIDDEN);
- }
-
- // if both server initiated the exchange of the shared secret the greater
- // token wins
- $localToken = $this->dbHandler->getToken($url);
- if (strcmp($localToken, $token) > 0) {
- $this->logger->info(
- 'remote server (' . $url . ') presented lower token. We will initiate the exchange of the shared secret.',
- ['app' => 'federation']
- );
- return new \OC_OCS_Result(null, HTTP::STATUS_FORBIDDEN);
- }
-
- // we ask for the shared secret so we no longer have to ask the other server
- // to request the shared secret
- $this->jobList->remove('OCA\Federation\BackgroundJob\RequestSharedSecret',
- [
- 'url' => $url,
- 'token' => $localToken
- ]
- );
-
- $this->jobList->add(
- 'OCA\Federation\BackgroundJob\GetSharedSecret',
- [
- 'url' => $url,
- 'token' => $token,
- ]
- );
-
- return new \OC_OCS_Result(null, Http::STATUS_OK);
-
- }
-
- /**
- * create shared secret and return it
- *
- * @return \OC_OCS_Result
- */
- public function getSharedSecret() {
-
- $url = $this->request->getParam('url');
- $token = $this->request->getParam('token');
-
- if ($this->trustedServers->isTrustedServer($url) === false) {
- $this->logger->error('remote server not trusted (' . $url . ') while getting shared secret', ['app' => 'federation']);
- return new \OC_OCS_Result(null, HTTP::STATUS_FORBIDDEN);
- }
-
- if ($this->isValidToken($url, $token) === false) {
- $expectedToken = $this->dbHandler->getToken($url);
- $this->logger->error(
- 'remote server (' . $url . ') didn\'t send a valid token (got "' . $token . '" but expected "'. $expectedToken . '") while getting shared secret',
- ['app' => 'federation']
- );
- return new \OC_OCS_Result(null, HTTP::STATUS_FORBIDDEN);
- }
-
- $sharedSecret = $this->secureRandom->generate(32);
-
- $this->trustedServers->addSharedSecret($url, $sharedSecret);
- // reset token after the exchange of the shared secret was successful
- $this->dbHandler->addToken($url, '');
-
- return new \OC_OCS_Result(['sharedSecret' => $sharedSecret], Http::STATUS_OK);
-
- }
-
- protected function isValidToken($url, $token) {
- $storedToken = $this->dbHandler->getToken($url);
- return hash_equals($storedToken, $token);
- }
-
-}
diff --git a/apps/federation/appinfo/app.php b/apps/federation/appinfo/app.php
deleted file mode 100644
index 6686f90121c..00000000000
--- a/apps/federation/appinfo/app.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Federation\AppInfo;
-
-$app = new Application();
-$app->registerSettings();
-$app->registerHooks();
diff --git a/apps/federation/appinfo/application.php b/apps/federation/appinfo/application.php
deleted file mode 100644
index 621a5d3d099..00000000000
--- a/apps/federation/appinfo/application.php
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Federation\AppInfo;
-
-use OCA\Federation\API\OCSAuthAPI;
-use OCA\Federation\Controller\SettingsController;
-use OCA\Federation\DAV\FedAuth;
-use OCA\Federation\DbHandler;
-use OCA\Federation\Hooks;
-use OCA\Federation\Middleware\AddServerMiddleware;
-use OCA\Federation\SyncFederationAddressBooks;
-use OCA\Federation\SyncJob;
-use OCA\Federation\TrustedServers;
-use OCP\API;
-use OCP\App;
-use OCP\AppFramework\IAppContainer;
-use OCP\SabrePluginEvent;
-use OCP\Util;
-use Sabre\DAV\Auth\Plugin;
-
-class Application extends \OCP\AppFramework\App {
-
- /**
- * @param array $urlParams
- */
- public function __construct($urlParams = array()) {
- parent::__construct('federation', $urlParams);
- $this->registerService();
- $this->registerMiddleware();
- }
-
- /**
- * register setting scripts
- */
- public function registerSettings() {
- App::registerAdmin('federation', 'settings/settings-admin');
- }
-
- private function registerService() {
- $container = $this->getContainer();
-
- $container->registerService('addServerMiddleware', function(IAppContainer $c) {
- return new AddServerMiddleware(
- $c->getAppName(),
- \OC::$server->getL10N($c->getAppName()),
- \OC::$server->getLogger()
- );
- });
-
- $container->registerService('DbHandler', function(IAppContainer $c) {
- return new DbHandler(
- \OC::$server->getDatabaseConnection(),
- \OC::$server->getL10N($c->getAppName())
- );
- });
-
- $container->registerService('TrustedServers', function(IAppContainer $c) {
- $server = $c->getServer();
- return new TrustedServers(
- $c->query('DbHandler'),
- $server->getHTTPClientService(),
- $server->getLogger(),
- $server->getJobList(),
- $server->getSecureRandom(),
- $server->getConfig(),
- $server->getEventDispatcher()
- );
- });
-
- $container->registerService('SettingsController', function (IAppContainer $c) {
- $server = $c->getServer();
- return new SettingsController(
- $c->getAppName(),
- $server->getRequest(),
- $server->getL10N($c->getAppName()),
- $c->query('TrustedServers')
- );
- });
-
- }
-
- private function registerMiddleware() {
- $container = $this->getContainer();
- $container->registerMiddleware('addServerMiddleware');
- }
-
- /**
- * register OCS API Calls
- */
- public function registerOCSApi() {
-
- $container = $this->getContainer();
- $server = $container->getServer();
-
- $auth = new OCSAuthAPI(
- $server->getRequest(),
- $server->getSecureRandom(),
- $server->getJobList(),
- $container->query('TrustedServers'),
- $container->query('DbHandler'),
- $server->getLogger()
-
- );
-
- API::register('get',
- '/apps/federation/api/v1/shared-secret',
- array($auth, 'getSharedSecret'),
- 'federation',
- API::GUEST_AUTH
- );
-
- API::register('post',
- '/apps/federation/api/v1/request-shared-secret',
- array($auth, 'requestSharedSecret'),
- 'federation',
- API::GUEST_AUTH
- );
-
- }
-
- /**
- * listen to federated_share_added hooks to auto-add new servers to the
- * list of trusted servers.
- */
- public function registerHooks() {
-
- $container = $this->getContainer();
- $hooksManager = new Hooks($container->query('TrustedServers'));
-
- Util::connectHook(
- 'OCP\Share',
- 'federated_share_added',
- $hooksManager,
- 'addServerHook'
- );
-
- $dispatcher = $this->getContainer()->getServer()->getEventDispatcher();
- $dispatcher->addListener('OCA\DAV\Connector\Sabre::authInit', function($event) use($container) {
- if ($event instanceof SabrePluginEvent) {
- $authPlugin = $event->getServer()->getPlugin('auth');
- if ($authPlugin instanceof Plugin) {
- $h = new DbHandler($container->getServer()->getDatabaseConnection(),
- $container->getServer()->getL10N('federation')
- );
- $authPlugin->addBackend(new FedAuth($h));
- }
- }
- });
- }
-
- public function setupCron() {
- $jl = $this->getContainer()->getServer()->getJobList();
- $jl->add(new SyncJob());
- }
-
- /**
- * @return SyncFederationAddressBooks
- */
- public function getSyncService() {
- $syncService = \OC::$server->query('CardDAVSyncService');
- $dbHandler = $this->getContainer()->query('DbHandler');
- return new SyncFederationAddressBooks($dbHandler, $syncService);
- }
-
-}
diff --git a/apps/federation/appinfo/database.xml b/apps/federation/appinfo/database.xml
deleted file mode 100644
index 61c3b8ac6d8..00000000000
--- a/apps/federation/appinfo/database.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<database>
- <name>*dbname*</name>
- <create>true</create>
- <overwrite>false</overwrite>
- <charset>utf8</charset>
- <table>
- <name>*dbprefix*trusted_servers</name>
- <declaration>
- <field>
- <name>id</name>
- <type>integer</type>
- <default>0</default>
- <notnull>true</notnull>
- <autoincrement>1</autoincrement>
- <length>4</length>
- </field>
- <field>
- <name>url</name>
- <type>text</type>
- <notnull>true</notnull>
- <length>512</length>
- <comments>Url of trusted server</comments>
- </field>
- <field>
- <name>url_hash</name>
- <type>text</type>
- <default></default>
- <notnull>true</notnull>
- <comments>sha1 hash of the url without the protocol</comments>
- </field>
- <field>
- <name>token</name>
- <type>text</type>
- <length>128</length>
- <comments>token used to exchange the shared secret</comments>
- </field>
- <field>
- <name>shared_secret</name>
- <type>text</type>
- <length>256</length>
- <comments>shared secret used to authenticate</comments>
- </field>
- <field>
- <name>status</name>
- <type>integer</type>
- <length>4</length>
- <notnull>true</notnull>
- <default>2</default>
- <comments>current status of the connection</comments>
- </field>
- <field>
- <name>sync_token</name>
- <type>text</type>
- <length>512</length>
- <comments>cardDav sync token</comments>
- </field>
- <index>
- <name>url_hash</name>
- <unique>true</unique>
- <field>
- <name>url_hash</name>
- <sorting>ascending</sorting>
- </field>
- </index>
- </declaration>
- </table>
-</database>
diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml
index 3bd66e2954a..2762344344d 100644
--- a/apps/federation/appinfo/info.xml
+++ b/apps/federation/appinfo/info.xml
@@ -1,18 +1,39 @@
<?xml version="1.0"?>
-<info>
+<!--
+ - SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ - SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>federation</id>
<name>Federation</name>
- <description>ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.</description>
- <licence>AGPL</licence>
+ <summary>Federation allows you to connect with other trusted servers to exchange the account directory.</summary>
+ <description>Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing.</description>
+ <version>1.22.0</version>
+ <licence>agpl</licence>
<author>Bjoern Schiessle</author>
- <version>0.1.0</version>
<namespace>Federation</namespace>
- <category>other</category>
- <dependencies>
- <owncloud min-version="9.1" max-version="9.1" />
- </dependencies>
- <default_enable/>
+
<types>
<authentication/>
</types>
+ <category>social</category>
+ <bugs>https://github.com/nextcloud/server/issues</bugs>
+
+ <dependencies>
+ <nextcloud min-version="32" max-version="32"/>
+ </dependencies>
+
+ <background-jobs>
+ <job>OCA\Federation\SyncJob</job>
+ </background-jobs>
+
+ <commands>
+ <command>OCA\Federation\Command\SyncFederationAddressBooks</command>
+ </commands>
+
+ <settings>
+ <admin>OCA\Federation\Settings\Admin</admin>
+ </settings>
</info>
diff --git a/apps/federation/appinfo/install.php b/apps/federation/appinfo/install.php
deleted file mode 100644
index f2a98d7f555..00000000000
--- a/apps/federation/appinfo/install.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-$app = new \OCA\Federation\AppInfo\Application();
-$app->setupCron();
diff --git a/apps/federation/appinfo/register_command.php b/apps/federation/appinfo/register_command.php
deleted file mode 100644
index c7e79851946..00000000000
--- a/apps/federation/appinfo/register_command.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-$app = new \OCA\Federation\AppInfo\Application();
-$syncService = $app->getSyncService();
-
-/** @var Symfony\Component\Console\Application $application */
-$application->add(new \OCA\Federation\Command\SyncFederationAddressBooks($syncService));
diff --git a/apps/federation/appinfo/routes.php b/apps/federation/appinfo/routes.php
index 6b4124094df..343870614b3 100644
--- a/apps/federation/appinfo/routes.php
+++ b/apps/federation/appinfo/routes.php
@@ -1,47 +1,35 @@
<?php
+
/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
-$application = new \OCA\Federation\AppInfo\Application();
-
-$application->registerRoutes(
- $this,
- [
- 'routes' => [
- [
- 'name' => 'Settings#addServer',
- 'url' => '/trusted-servers',
- 'verb' => 'POST'
- ],
- [
- 'name' => 'Settings#removeServer',
- 'url' => '/trusted-servers/{id}',
- 'verb' => 'DELETE'
- ],
- [
- 'name' => 'Settings#autoAddServers',
- 'url' => '/auto-add-servers',
- 'verb' => 'POST'
- ],
- ]
- ]
-);
-
-$application->registerOCSApi();
+return [
+ 'ocs' => [
+ // old endpoints, only used by Nextcloud and ownCloud
+ [
+ 'name' => 'OCSAuthAPI#getSharedSecretLegacy',
+ 'url' => '/api/v1/shared-secret',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'OCSAuthAPI#requestSharedSecretLegacy',
+ 'url' => '/api/v1/request-shared-secret',
+ 'verb' => 'POST',
+ ],
+ // new endpoints, published as public api
+ [
+ 'name' => 'OCSAuthAPI#getSharedSecret',
+ 'root' => '/cloud',
+ 'url' => '/shared-secret',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'OCSAuthAPI#requestSharedSecret',
+ 'root' => '/cloud',
+ 'url' => '/shared-secret',
+ 'verb' => 'POST',
+ ],
+ ],
+];
diff --git a/apps/federation/appinfo/update.php b/apps/federation/appinfo/update.php
deleted file mode 100644
index f2a98d7f555..00000000000
--- a/apps/federation/appinfo/update.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-$app = new \OCA\Federation\AppInfo\Application();
-$app->setupCron();
diff --git a/apps/federation/backgroundjob/getsharedsecret.php b/apps/federation/backgroundjob/getsharedsecret.php
deleted file mode 100644
index 66ab082c1a2..00000000000
--- a/apps/federation/backgroundjob/getsharedsecret.php
+++ /dev/null
@@ -1,200 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\BackgroundJob;
-
-use GuzzleHttp\Exception\ClientException;
-use OC\BackgroundJob\JobList;
-use OC\BackgroundJob\Job;
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Http;
-use OCP\BackgroundJob\IJobList;
-use OCP\Http\Client\IClient;
-use OCP\Http\Client\IResponse;
-use OCP\ILogger;
-use OCP\IURLGenerator;
-
-/**
- * Class GetSharedSecret
- *
- * request shared secret from remote ownCloud
- *
- * @package OCA\Federation\Backgroundjob
- */
-class GetSharedSecret extends Job{
-
- /** @var IClient */
- private $httpClient;
-
- /** @var IJobList */
- private $jobList;
-
- /** @var IURLGenerator */
- private $urlGenerator;
-
- /** @var TrustedServers */
- private $trustedServers;
-
- /** @var DbHandler */
- private $dbHandler;
-
- /** @var ILogger */
- private $logger;
-
- /** @var bool */
- protected $retainJob = false;
-
- private $endPoint = '/ocs/v2.php/apps/federation/api/v1/shared-secret?format=json';
-
- /**
- * RequestSharedSecret constructor.
- *
- * @param IClient $httpClient
- * @param IURLGenerator $urlGenerator
- * @param IJobList $jobList
- * @param TrustedServers $trustedServers
- * @param ILogger $logger
- * @param DbHandler $dbHandler
- */
- public function __construct(
- IClient $httpClient = null,
- IURLGenerator $urlGenerator = null,
- IJobList $jobList = null,
- TrustedServers $trustedServers = null,
- ILogger $logger = null,
- DbHandler $dbHandler = null
- ) {
- $this->logger = $logger ? $logger : \OC::$server->getLogger();
- $this->httpClient = $httpClient ? $httpClient : \OC::$server->getHTTPClientService()->newClient();
- $this->jobList = $jobList ? $jobList : \OC::$server->getJobList();
- $this->urlGenerator = $urlGenerator ? $urlGenerator : \OC::$server->getURLGenerator();
- $this->dbHandler = $dbHandler ? $dbHandler : new DbHandler(\OC::$server->getDatabaseConnection(), \OC::$server->getL10N('federation'));
- if ($trustedServers) {
- $this->trustedServers = $trustedServers;
- } else {
- $this->trustedServers = new TrustedServers(
- $this->dbHandler,
- \OC::$server->getHTTPClientService(),
- $this->logger,
- $this->jobList,
- \OC::$server->getSecureRandom(),
- \OC::$server->getConfig(),
- \OC::$server->getEventDispatcher()
- );
- }
- }
-
- /**
- * run the job, then remove it from the joblist
- *
- * @param JobList $jobList
- * @param ILogger $logger
- */
- public function execute($jobList, ILogger $logger = null) {
- $target = $this->argument['url'];
- // only execute if target is still in the list of trusted domains
- if ($this->trustedServers->isTrustedServer($target)) {
- $this->parentExecute($jobList, $logger);
- }
-
- if (!$this->retainJob) {
- $jobList->remove($this, $this->argument);
- }
- }
-
- /**
- * call execute() method of parent
- *
- * @param JobList $jobList
- * @param ILogger $logger
- */
- protected function parentExecute($jobList, $logger) {
- parent::execute($jobList, $logger);
- }
-
- protected function run($argument) {
- $target = $argument['url'];
- $source = $this->urlGenerator->getAbsoluteURL('/');
- $source = rtrim($source, '/');
- $token = $argument['token'];
-
- $result = null;
- try {
- $result = $this->httpClient->get(
- $target . $this->endPoint,
- [
- 'query' =>
- [
- 'url' => $source,
- 'token' => $token
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- );
-
- $status = $result->getStatusCode();
-
- } catch (ClientException $e) {
- $status = $e->getCode();
- if ($status === Http::STATUS_FORBIDDEN) {
- $this->logger->info($target . ' refused to exchange a shared secret with you.', ['app' => 'federation']);
- } else {
- $this->logger->logException($e, ['app' => 'federation']);
- }
- } catch (\Exception $e) {
- $status = Http::STATUS_INTERNAL_SERVER_ERROR;
- $this->logger->logException($e, ['app' => 'federation']);
- }
-
- // if we received a unexpected response we try again later
- if (
- $status !== Http::STATUS_OK
- && $status !== Http::STATUS_FORBIDDEN
- ) {
- $this->retainJob = true;
- } else {
- // reset token if we received a valid response
- $this->dbHandler->addToken($target, '');
- }
-
- if ($status === Http::STATUS_OK && $result instanceof IResponse) {
- $body = $result->getBody();
- $result = json_decode($body, true);
- if (isset($result['ocs']['data']['sharedSecret'])) {
- $this->trustedServers->addSharedSecret(
- $target,
- $result['ocs']['data']['sharedSecret']
- );
- } else {
- $this->logger->error(
- 'remote server "' . $target . '"" does not return a valid shared secret',
- ['app' => 'federation']
- );
- $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
- }
- }
-
- }
-}
diff --git a/apps/federation/backgroundjob/requestsharedsecret.php b/apps/federation/backgroundjob/requestsharedsecret.php
deleted file mode 100644
index 040e8e1d8e2..00000000000
--- a/apps/federation/backgroundjob/requestsharedsecret.php
+++ /dev/null
@@ -1,184 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Robin Appelman <icewind@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\BackgroundJob;
-
-
-use GuzzleHttp\Exception\ClientException;
-use OC\BackgroundJob\JobList;
-use OC\BackgroundJob\Job;
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Http;
-use OCP\BackgroundJob\IJobList;
-use OCP\Http\Client\IClient;
-use OCP\ILogger;
-use OCP\IURLGenerator;
-
-/**
- * Class RequestSharedSecret
- *
- * Ask remote ownCloud to request a sharedSecret from this server
- *
- * @package OCA\Federation\Backgroundjob
- */
-class RequestSharedSecret extends Job {
-
- /** @var IClient */
- private $httpClient;
-
- /** @var IJobList */
- private $jobList;
-
- /** @var IURLGenerator */
- private $urlGenerator;
-
- /** @var DbHandler */
- private $dbHandler;
-
- /** @var TrustedServers */
- private $trustedServers;
-
- private $endPoint = '/ocs/v2.php/apps/federation/api/v1/request-shared-secret?format=json';
-
- /** @var ILogger */
- private $logger;
-
- /** @var bool */
- protected $retainJob = false;
-
- /**
- * RequestSharedSecret constructor.
- *
- * @param IClient $httpClient
- * @param IURLGenerator $urlGenerator
- * @param IJobList $jobList
- * @param TrustedServers $trustedServers
- * @param DbHandler $dbHandler
- */
- public function __construct(
- IClient $httpClient = null,
- IURLGenerator $urlGenerator = null,
- IJobList $jobList = null,
- TrustedServers $trustedServers = null,
- DbHandler $dbHandler = null
- ) {
- $this->httpClient = $httpClient ? $httpClient : \OC::$server->getHTTPClientService()->newClient();
- $this->jobList = $jobList ? $jobList : \OC::$server->getJobList();
- $this->urlGenerator = $urlGenerator ? $urlGenerator : \OC::$server->getURLGenerator();
- $this->dbHandler = $dbHandler ? $dbHandler : new DbHandler(\OC::$server->getDatabaseConnection(), \OC::$server->getL10N('federation'));
- $this->logger = \OC::$server->getLogger();
- if ($trustedServers) {
- $this->trustedServers = $trustedServers;
- } else {
- $this->trustedServers = new TrustedServers(
- $this->dbHandler,
- \OC::$server->getHTTPClientService(),
- $this->logger,
- $this->jobList,
- \OC::$server->getSecureRandom(),
- \OC::$server->getConfig(),
- \OC::$server->getEventDispatcher()
- );
- }
- }
-
-
- /**
- * run the job, then remove it from the joblist
- *
- * @param JobList $jobList
- * @param ILogger $logger
- */
- public function execute($jobList, ILogger $logger = null) {
- $target = $this->argument['url'];
- // only execute if target is still in the list of trusted domains
- if ($this->trustedServers->isTrustedServer($target)) {
- $this->parentExecute($jobList, $logger);
- }
-
- if (!$this->retainJob) {
- $jobList->remove($this, $this->argument);
- }
- }
-
- /**
- * call execute() method of parent
- *
- * @param JobList $jobList
- * @param ILogger $logger
- */
- protected function parentExecute($jobList, $logger) {
- parent::execute($jobList, $logger);
- }
-
- protected function run($argument) {
-
- $target = $argument['url'];
- $source = $this->urlGenerator->getAbsoluteURL('/');
- $source = rtrim($source, '/');
- $token = $argument['token'];
-
- try {
- $result = $this->httpClient->post(
- $target . $this->endPoint,
- [
- 'body' => [
- 'url' => $source,
- 'token' => $token,
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- );
-
- $status = $result->getStatusCode();
-
- } catch (ClientException $e) {
- $status = $e->getCode();
- if ($status === Http::STATUS_FORBIDDEN) {
- $this->logger->info($target . ' refused to ask for a shared secret.', ['app' => 'federation']);
- } else {
- $this->logger->logException($e, ['app' => 'federation']);
- }
- } catch (\Exception $e) {
- $status = Http::STATUS_INTERNAL_SERVER_ERROR;
- $this->logger->logException($e, ['app' => 'federation']);
- }
-
- // if we received a unexpected response we try again later
- if (
- $status !== Http::STATUS_OK
- && $status !== Http::STATUS_FORBIDDEN
- ) {
- $this->retainJob = true;
- }
-
- if ($status === Http::STATUS_FORBIDDEN) {
- // clear token if remote server refuses to ask for shared secret
- $this->dbHandler->addToken($target, '');
- }
-
- }
-}
diff --git a/apps/federation/command/syncfederationaddressbooks.php b/apps/federation/command/syncfederationaddressbooks.php
deleted file mode 100644
index 879d38f8c22..00000000000
--- a/apps/federation/command/syncfederationaddressbooks.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OCA\Federation\Command;
-
-use OCA\Federation\DbHandler;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Helper\ProgressBar;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class SyncFederationAddressBooks extends Command {
-
- /** @var \OCA\Federation\SyncFederationAddressBooks */
- private $syncService;
-
- /**
- * @param \OCA\Federation\SyncFederationAddressBooks $syncService
- */
- function __construct(\OCA\Federation\SyncFederationAddressBooks $syncService) {
- parent::__construct();
-
- $this->syncService = $syncService;
- }
-
- protected function configure() {
- $this
- ->setName('federation:sync-addressbooks')
- ->setDescription('Synchronizes addressbooks of all federated clouds');
- }
-
- /**
- * @param InputInterface $input
- * @param OutputInterface $output
- * @return int
- */
- protected function execute(InputInterface $input, OutputInterface $output) {
-
- $progress = new ProgressBar($output);
- $progress->start();
- $this->syncService->syncThemAll(function($url, $ex) use ($progress, $output) {
- if ($ex instanceof \Exception) {
- $output->writeln("Error while syncing $url : " . $ex->getMessage());
-
- } else {
- $progress->advance();
- }
- });
-
- $progress->finish();
- $output->writeln('');
-
- return 0;
- }
-}
diff --git a/apps/federation/composer/autoload.php b/apps/federation/composer/autoload.php
new file mode 100644
index 00000000000..08b3d13070a
--- /dev/null
+++ b/apps/federation/composer/autoload.php
@@ -0,0 +1,25 @@
+<?php
+
+// autoload.php @generated by Composer
+
+if (PHP_VERSION_ID < 50600) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
+}
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInitFederation::getLoader();
diff --git a/apps/federation/composer/composer.json b/apps/federation/composer/composer.json
new file mode 100644
index 00000000000..affe383c1c8
--- /dev/null
+++ b/apps/federation/composer/composer.json
@@ -0,0 +1,13 @@
+{
+ "config" : {
+ "vendor-dir": ".",
+ "optimize-autoloader": true,
+ "classmap-authoritative": true,
+ "autoloader-suffix": "Federation"
+ },
+ "autoload" : {
+ "psr-4": {
+ "OCA\\Federation\\": "../lib/"
+ }
+ }
+}
diff --git a/apps/federation/composer/composer.lock b/apps/federation/composer/composer.lock
new file mode 100644
index 00000000000..fd0bcbcb753
--- /dev/null
+++ b/apps/federation/composer/composer.lock
@@ -0,0 +1,18 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "d751713988987e9331980363e24189ce",
+ "packages": [],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.1.0"
+}
diff --git a/apps/federation/composer/composer/ClassLoader.php b/apps/federation/composer/composer/ClassLoader.php
new file mode 100644
index 00000000000..7824d8f7eaf
--- /dev/null
+++ b/apps/federation/composer/composer/ClassLoader.php
@@ -0,0 +1,579 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
+ private $vendorDir;
+
+ // PSR-4
+ /**
+ * @var array<string, array<string, int>>
+ */
+ private $prefixLengthsPsr4 = array();
+ /**
+ * @var array<string, list<string>>
+ */
+ private $prefixDirsPsr4 = array();
+ /**
+ * @var list<string>
+ */
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ /**
+ * List of PSR-0 prefixes
+ *
+ * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+ *
+ * @var array<string, array<string, list<string>>>
+ */
+ private $prefixesPsr0 = array();
+ /**
+ * @var list<string>
+ */
+ private $fallbackDirsPsr0 = array();
+
+ /** @var bool */
+ private $useIncludePath = false;
+
+ /**
+ * @var array<string, string>
+ */
+ private $classMap = array();
+
+ /** @var bool */
+ private $classMapAuthoritative = false;
+
+ /**
+ * @var array<string, bool>
+ */
+ private $missingClasses = array();
+
+ /** @var string|null */
+ private $apcuPrefix;
+
+ /**
+ * @var array<string, self>
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param string|null $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
+ }
+
+ /**
+ * @return array<string, list<string>>
+ */
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
+ }
+
+ return array();
+ }
+
+ /**
+ * @return array<string, list<string>>
+ */
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ /**
+ * @return list<string>
+ */
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ /**
+ * @return list<string>
+ */
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ /**
+ * @return array<string, string> Array of classname => path
+ */
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array<string, string> $classMap Class to filename map
+ *
+ * @return void
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list<string>|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list<string>|string $paths The PSR-0 base directories
+ *
+ * @return void
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ *
+ * @return void
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ *
+ * @return void
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ *
+ * @return void
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ *
+ * @return void
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return true|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ $includeFile = self::$includeFile;
+ $includeFile($file);
+
+ return true;
+ }
+
+ return null;
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ /**
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ *
+ * @return array<string, self>
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath . '\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ if (file_exists($file = $dir . $pathEnd)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = \Closure::bind(static function($file) {
+ include $file;
+ }, null, null);
+ }
+}
diff --git a/apps/federation/composer/composer/InstalledVersions.php b/apps/federation/composer/composer/InstalledVersions.php
new file mode 100644
index 00000000000..51e734a774b
--- /dev/null
+++ b/apps/federation/composer/composer/InstalledVersions.php
@@ -0,0 +1,359 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints((string) $constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+ $required = require $vendorDir.'/composer/installed.php';
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+ $required = require __DIR__ . '/installed.php';
+ self::$installed = $required;
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
+
+ return $installed;
+ }
+}
diff --git a/apps/federation/composer/composer/LICENSE b/apps/federation/composer/composer/LICENSE
new file mode 100644
index 00000000000..f27399a042d
--- /dev/null
+++ b/apps/federation/composer/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/apps/federation/composer/composer/autoload_classmap.php b/apps/federation/composer/composer/autoload_classmap.php
new file mode 100644
index 00000000000..d648b643c46
--- /dev/null
+++ b/apps/federation/composer/composer/autoload_classmap.php
@@ -0,0 +1,24 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'OCA\\Federation\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
+ 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => $baseDir . '/../lib/BackgroundJob/GetSharedSecret.php',
+ 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => $baseDir . '/../lib/BackgroundJob/RequestSharedSecret.php',
+ 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => $baseDir . '/../lib/Command/SyncFederationAddressBooks.php',
+ 'OCA\\Federation\\Controller\\OCSAuthAPIController' => $baseDir . '/../lib/Controller/OCSAuthAPIController.php',
+ 'OCA\\Federation\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php',
+ 'OCA\\Federation\\DAV\\FedAuth' => $baseDir . '/../lib/DAV/FedAuth.php',
+ 'OCA\\Federation\\DbHandler' => $baseDir . '/../lib/DbHandler.php',
+ 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => $baseDir . '/../lib/Listener/SabrePluginAuthInitListener.php',
+ 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir . '/../lib/Migration/Version1010Date20200630191302.php',
+ 'OCA\\Federation\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
+ 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir . '/../lib/SyncFederationAddressBooks.php',
+ 'OCA\\Federation\\SyncJob' => $baseDir . '/../lib/SyncJob.php',
+ 'OCA\\Federation\\TrustedServers' => $baseDir . '/../lib/TrustedServers.php',
+);
diff --git a/apps/federation/composer/composer/autoload_namespaces.php b/apps/federation/composer/composer/autoload_namespaces.php
new file mode 100644
index 00000000000..3f5c9296251
--- /dev/null
+++ b/apps/federation/composer/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+);
diff --git a/apps/federation/composer/composer/autoload_psr4.php b/apps/federation/composer/composer/autoload_psr4.php
new file mode 100644
index 00000000000..9be3a9affb8
--- /dev/null
+++ b/apps/federation/composer/composer/autoload_psr4.php
@@ -0,0 +1,10 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+ 'OCA\\Federation\\' => array($baseDir . '/../lib'),
+);
diff --git a/apps/federation/composer/composer/autoload_real.php b/apps/federation/composer/composer/autoload_real.php
new file mode 100644
index 00000000000..b3913e0ac70
--- /dev/null
+++ b/apps/federation/composer/composer/autoload_real.php
@@ -0,0 +1,37 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInitFederation
+{
+ private static $loader;
+
+ public static function loadClassLoader($class)
+ {
+ if ('Composer\Autoload\ClassLoader' === $class) {
+ require __DIR__ . '/ClassLoader.php';
+ }
+ }
+
+ /**
+ * @return \Composer\Autoload\ClassLoader
+ */
+ public static function getLoader()
+ {
+ if (null !== self::$loader) {
+ return self::$loader;
+ }
+
+ spl_autoload_register(array('ComposerAutoloaderInitFederation', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
+ spl_autoload_unregister(array('ComposerAutoloaderInitFederation', 'loadClassLoader'));
+
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInitFederation::getInitializer($loader));
+
+ $loader->setClassMapAuthoritative(true);
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/apps/federation/composer/composer/autoload_static.php b/apps/federation/composer/composer/autoload_static.php
new file mode 100644
index 00000000000..29932e1dffc
--- /dev/null
+++ b/apps/federation/composer/composer/autoload_static.php
@@ -0,0 +1,50 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInitFederation
+{
+ public static $prefixLengthsPsr4 = array (
+ 'O' =>
+ array (
+ 'OCA\\Federation\\' => 15,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'OCA\\Federation\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/../lib',
+ ),
+ );
+
+ public static $classMap = array (
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'OCA\\Federation\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
+ 'OCA\\Federation\\BackgroundJob\\GetSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/GetSharedSecret.php',
+ 'OCA\\Federation\\BackgroundJob\\RequestSharedSecret' => __DIR__ . '/..' . '/../lib/BackgroundJob/RequestSharedSecret.php',
+ 'OCA\\Federation\\Command\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/Command/SyncFederationAddressBooks.php',
+ 'OCA\\Federation\\Controller\\OCSAuthAPIController' => __DIR__ . '/..' . '/../lib/Controller/OCSAuthAPIController.php',
+ 'OCA\\Federation\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php',
+ 'OCA\\Federation\\DAV\\FedAuth' => __DIR__ . '/..' . '/../lib/DAV/FedAuth.php',
+ 'OCA\\Federation\\DbHandler' => __DIR__ . '/..' . '/../lib/DbHandler.php',
+ 'OCA\\Federation\\Listener\\SabrePluginAuthInitListener' => __DIR__ . '/..' . '/../lib/Listener/SabrePluginAuthInitListener.php',
+ 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191302.php',
+ 'OCA\\Federation\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',
+ 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/SyncFederationAddressBooks.php',
+ 'OCA\\Federation\\SyncJob' => __DIR__ . '/..' . '/../lib/SyncJob.php',
+ 'OCA\\Federation\\TrustedServers' => __DIR__ . '/..' . '/../lib/TrustedServers.php',
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->prefixLengthsPsr4 = ComposerStaticInitFederation::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInitFederation::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInitFederation::$classMap;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/apps/federation/composer/composer/installed.json b/apps/federation/composer/composer/installed.json
new file mode 100644
index 00000000000..f20a6c47c6d
--- /dev/null
+++ b/apps/federation/composer/composer/installed.json
@@ -0,0 +1,5 @@
+{
+ "packages": [],
+ "dev": false,
+ "dev-package-names": []
+}
diff --git a/apps/federation/composer/composer/installed.php b/apps/federation/composer/composer/installed.php
new file mode 100644
index 00000000000..1a66c7f2416
--- /dev/null
+++ b/apps/federation/composer/composer/installed.php
@@ -0,0 +1,23 @@
+<?php return array(
+ 'root' => array(
+ 'name' => '__root__',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'b1797842784b250fb01ed5e3bf130705eb94751b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../',
+ 'aliases' => array(),
+ 'dev' => false,
+ ),
+ 'versions' => array(
+ '__root__' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'b1797842784b250fb01ed5e3bf130705eb94751b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/apps/federation/controller/settingscontroller.php b/apps/federation/controller/settingscontroller.php
deleted file mode 100644
index 3adb6fced66..00000000000
--- a/apps/federation/controller/settingscontroller.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Federation\Controller;
-
-use OC\HintException;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http;
-use OCP\AppFramework\Http\DataResponse;
-use OCP\IL10N;
-use OCP\IRequest;
-
-
-class SettingsController extends Controller {
-
- /** @var IL10N */
- private $l;
-
- /** @var TrustedServers */
- private $trustedServers;
-
- /**
- * @param string $AppName
- * @param IRequest $request
- * @param IL10N $l10n
- * @param TrustedServers $trustedServers
- */
- public function __construct($AppName,
- IRequest $request,
- IL10N $l10n,
- TrustedServers $trustedServers
- ) {
- parent::__construct($AppName, $request);
- $this->l = $l10n;
- $this->trustedServers = $trustedServers;
- }
-
-
- /**
- * add server to the list of trusted ownClouds
- *
- * @param string $url
- * @return DataResponse
- * @throws HintException
- */
- public function addServer($url) {
- $this->checkServer($url);
- $id = $this->trustedServers->addServer($url);
-
- return new DataResponse(
- [
- 'url' => $url,
- 'id' => $id,
- 'message' => (string) $this->l->t('Server added to the list of trusted ownClouds')
- ]
- );
- }
-
- /**
- * add server to the list of trusted ownClouds
- *
- * @param int $id
- * @return DataResponse
- */
- public function removeServer($id) {
- $this->trustedServers->removeServer($id);
- return new DataResponse();
- }
-
- /**
- * enable/disable to automatically add servers to the list of trusted servers
- * once a federated share was created and accepted successfully
- *
- * @param bool $autoAddServers
- */
- public function autoAddServers($autoAddServers) {
- $this->trustedServers->setAutoAddServers($autoAddServers);
- }
-
- /**
- * check if the server should be added to the list of trusted servers or not
- *
- * @param string $url
- * @return bool
- * @throws HintException
- */
- protected function checkServer($url) {
- if ($this->trustedServers->isTrustedServer($url) === true) {
- $message = 'Server is already in the list of trusted servers.';
- $hint = $this->l->t('Server is already in the list of trusted servers.');
- throw new HintException($message, $hint);
- }
-
- if ($this->trustedServers->isOwnCloudServer($url) === false) {
- $message = 'No ownCloud server found';
- $hint = $this->l->t('No ownCloud server found');
- throw new HintException($message, $hint);
- }
-
- return true;
- }
-
-}
diff --git a/apps/federation/css/settings-admin.css b/apps/federation/css/settings-admin.css
index 55b1dd64d15..6fa103e83b2 100644
--- a/apps/federation/css/settings-admin.css
+++ b/apps/federation/css/settings-admin.css
@@ -1,26 +1,47 @@
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
#ocFederationSettings p {
- padding-top: 10px;
+ padding-bottom: 10px;
}
#listOfTrustedServers li {
- padding-top: 10px;
- padding-left: 20px;
+ padding-bottom: 10px;
+ display: flex;
+ align-items: center;
}
.removeTrustedServer {
display: none;
- vertical-align:middle;
- padding-left: 10px;
+ vertical-align: middle;
+ padding-inline-start: 10px;
}
#ocFederationAddServerButton {
cursor: pointer;
}
-#listOfTrustedServers li:hover {
+#listOfTrustedServers .status {
+ margin-inline-end: 10px;
+}
+
+#listOfTrustedServers .icon {
+ display: inline-block;
cursor: pointer;
+ vertical-align: middle;
+ margin-inline-start: 10px;
}
-#listOfTrustedServers .status {
- margin-right: 10px;
+.serverUrl-block {
+ display: flex;
+ align-items: center;
+ flex-direction: row;
+ justify-content: flex-start;
+ gap: 8px;
+}
+
+.serverUrl-block input {
+ width: 270px;
}
diff --git a/apps/federation/dav/fedauth.php b/apps/federation/dav/fedauth.php
deleted file mode 100644
index bb1041adcdf..00000000000
--- a/apps/federation/dav/fedauth.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OCA\Federation\DAV;
-
-use OCA\Federation\DbHandler;
-use Sabre\DAV\Auth\Backend\AbstractBasic;
-
-class FedAuth extends AbstractBasic {
-
- /** @var DbHandler */
- private $db;
-
- /**
- * FedAuth constructor.
- *
- * @param DbHandler $db
- */
- public function __construct(DbHandler $db) {
- $this->db = $db;
- $this->principalPrefix = 'principals/system/';
- }
-
- /**
- * Validates a username and password
- *
- * This method should return true or false depending on if login
- * succeeded.
- *
- * @param string $username
- * @param string $password
- * @return bool
- */
- protected function validateUserPass($username, $password) {
- return $this->db->auth($username, $password);
- }
-}
diff --git a/apps/federation/img/app.svg b/apps/federation/img/app.svg
index b6ae35211a3..22ce8e18f99 100644
--- a/apps/federation/img/app.svg
+++ b/apps/federation/img/app.svg
@@ -1,4 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <path d="m13.733 0.00064c-0.52991 0-0.93331 0.40337-0.93331 0.93333v2.6666c-1.182 0.3034-2.243 0.7934-3.2668 1.4001l-1.9334-1.9334c-0.3747-0.3747-0.9586-0.3747-1.3333 0l-3.1999 3.2c-0.37473 0.37474-0.37473 0.95859 0 1.3333l1.9334 1.9335c-0.6067 1.0239-1.0967 2.0849-1.4001 3.2669h-2.6666c-0.52994 0-0.9333 0.403-0.9333 0.933v4.5333c2e-8 0.52996 0.40336 0.93333 0.93331 0.93333h2.6666c0.30335 1.1817 0.79332 2.2426 1.4 3.2666l-1.9334 1.9349c-0.37473 0.37474-0.37473 0.95859 0 1.3333l3.1999 3.2c0.37473 0.37474 0.95857 0.37474 1.3333 0l1.9334-1.9349c1.024 0.608 2.0849 1.0965 3.2665 1.3995v2.6667c0 0.53 0.403 0.933 0.933 0.933h4.5332c0.52991 0 0.93331-0.4032 0.93331-0.9344v-2.6667c1.1816-0.30336 2.2425-0.79335 3.2665-1.4l1.9333 1.9333c0.37473 0.37474 0.95857 0.37474 1.3333 0l3.1999-3.2c0.37473-0.37474 0.37473-0.95859 0-1.3333l-1.9327-1.9328c0.60798-1.024 1.0965-2.0845 1.3994-3.2661h2.6666c0.532 0 0.935-0.403 0.935-0.933v-4.534c0-0.53-0.403-0.933-0.934-0.933h-2.667c-0.303-1.182-0.791-2.243-1.399-3.2666l1.932-1.9334c0.37473-0.37474 0.37473-0.95859 0-1.3333l-3.2-3.2c-0.37473-0.37474-0.95857-0.37474-1.3333 0l-1.9327 1.9334c-1.024-0.6067-2.084-1.0967-3.266-1.4001v-2.6667c0-0.52993-0.403-0.9333-0.933-0.9333zm2.2666 8.8689c3.9361 0 7.1309 3.1947 7.1309 7.1311 0 3.9362-3.1946 7.1311-7.1309 7.1311-3.9361 0-7.1309-3.1955-7.1309-7.1317s3.1948-7.1311 7.1309-7.1311z" display="block" fill="#fff"/>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#fff"><path d="M696-96q-50 0-85-35t-35-85q0-8 1-14.5t3-14.5L342-390q-15 16-35.35 23-20.36 7-42.65 7-50 0-85-35t-35-85q0-50 35-85t85-35q22 0 42.5 7.5T342-570l238-145q-2-8-3-14.5t-1-14.5q0-50 35-85t85-35q50 0 85 35t35 85q0 50-35 85t-85 35q-22.29 0-42.65-7Q633-638 618-654L380-509q2 8 3 14.5t1 14.5q0 8-1 14.5t-3 14.5l238 145q15-17 35.35-23.5Q673.71-336 696-336q50 0 85 35t35 85q0 50-35 85t-85 35Z"/></svg> \ No newline at end of file
diff --git a/apps/federation/js/settings-admin.js b/apps/federation/js/settings-admin.js
index 7d531b39d8c..aa672e53e94 100644
--- a/apps/federation/js/settings-admin.js
+++ b/apps/federation/js/settings-admin.js
@@ -1,82 +1,119 @@
+
/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-$(document).ready(function () {
-
- // show input field to add a new trusted server
- $("#ocFederationAddServer").on('click', function() {
- $('#ocFederationAddServerButton').addClass('hidden');
- $("#serverUrl").removeClass('hidden');
- $("#serverUrl").focus();
- });
-
- // add new trusted server
- $("#serverUrl").keyup(function (e) {
- if (e.keyCode === 13) { // add server on "enter"
- var url = $('#serverUrl').val();
- OC.msg.startSaving('#ocFederationAddServer .msg');
- $.post(
- OC.generateUrl('/apps/federation/trusted-servers'),
- {
- url: url
- }
- ).done(function (data) {
- $('#serverUrl').attr('value', '');
- $('ul#listOfTrustedServers').prepend(
- $('<li>')
- .attr('id', data.id)
- .attr('class', 'icon-delete')
- .html('<span class="status indeterminate"></span>' + data.url)
- );
- OC.msg.finishedSuccess('#ocFederationAddServer .msg', data.message);
- })
- .fail(function (jqXHR) {
- OC.msg.finishedError('#ocFederationAddServer .msg', JSON.parse(jqXHR.responseText).message);
- });
- } else if (e.keyCode === 27) { // hide input filed again in ESC
- $('#ocFederationAddServerButton').toggleClass('hidden');
- $("#serverUrl").toggleClass('hidden');
- }
- });
-
- // remove trusted server from list
- $( "#listOfTrustedServers" ).on('click', 'li', function() {
- var id = $(this).attr('id');
- var $this = $(this);
- $.ajax({
- url: OC.generateUrl('/apps/federation/trusted-servers/' + id),
- type: 'DELETE',
- success: function(response) {
- $this.remove();
- }
- });
-
- });
-
- $("#ocFederationSettings #autoAddServers").change(function() {
- $.post(
- OC.generateUrl('/apps/federation/auto-add-servers'),
- {
- autoAddServers: $(this).is(":checked")
- }
- );
- });
+(function( $ ) {
+
+ // ocFederationAddServer
+ $.fn.ocFederationAddServer = function() {
+
+ /* Go easy on jquery and define some vars
+ ========================================================================== */
+
+ var $wrapper = $(this),
+
+ // Buttons
+ $btnAddServer = $wrapper.find("#ocFederationAddServerButton"),
+ $btnSubmit = $wrapper.find("#ocFederationSubmit"),
+
+ // Inputs
+ $inpServerUrl = $wrapper.find("#serverUrl"),
+
+ // misc
+ $msgBox = $wrapper.find("#ocFederationAddServer .msg"),
+ $srvList = $wrapper.find("#listOfTrustedServers");
+
+
+ /* Interaction
+ ========================================================================== */
+
+ $btnAddServer.on('click', function() {
+ $btnAddServer.addClass('hidden');
+ $wrapper.find(".serverUrl").removeClass('hidden');
+ $inpServerUrl
+ .focus();
+ });
+
+ // trigger server removal
+ $srvList.on('click', 'li > .icon-delete', function() {
+ var $this = $(this).parent();
+ var id = $this.attr('id');
+
+ removeServer( id );
+ });
+
+ $btnSubmit.on("click", function()
+ {
+ addServer($inpServerUrl.val());
+ });
+
+ $inpServerUrl.on("change keyup", function (e) {
+ var url = $(this).val();
+
+ // toggle add-button visibility based on input length
+ if ( url.length > 0 )
+ $btnSubmit.removeClass("hidden")
+ else
+ $btnSubmit.addClass("hidden")
+
+ if (e.keyCode === 13) { // add server on "enter"
+ addServer(url);
+ } else if (e.keyCode === 27) { // hide input filed again in ESC
+ $btnAddServer.removeClass('hidden');
+ $inpServerUrl.val("").addClass('hidden');
+ $btnSubmit.addClass('hidden');
+ }
+ });
+ };
+
+ /* private Functions
+ ========================================================================== */
+
+ function addServer( url ) {
+ OC.msg.startSaving('#ocFederationAddServer .msg');
+
+ $.post(
+ OC.getRootPath() + '/ocs/v2.php/apps/federation/trusted-servers',
+ {
+ url: url
+ },
+ null,
+ 'json'
+ ).done(function({ ocs }) {
+ var data = ocs.data;
+ $("#serverUrl").attr('value', '');
+ $("#listOfTrustedServers").prepend(
+ $('<li>')
+ .attr('id', data.id)
+ .html('<span class="status indeterminate"></span>' +
+ data.url +
+ '<span class="icon icon-delete"></span>')
+ );
+ OC.msg.finishedSuccess('#ocFederationAddServer .msg', data.message);
+ })
+ .fail(function (jqXHR) {
+ OC.msg.finishedError('#ocFederationAddServer .msg', JSON.parse(jqXHR.responseText).ocs.meta.message);
+ });
+ };
+
+ function removeServer( id ) {
+ $.ajax({
+ url: OC.getRootPath() + '/ocs/v2.php/apps/federation/trusted-servers/' + id,
+ type: 'DELETE',
+ success: function(response) {
+ $("#ocFederationSettings").find("#" + id).remove();
+ }
+ });
+ }
+
+
+})( jQuery );
+
+window.addEventListener('DOMContentLoaded', function () {
+
+ $('#ocFederationSettings').ocFederationAddServer();
});
diff --git a/apps/federation/l10n/ar.js b/apps/federation/l10n/ar.js
new file mode 100644
index 00000000000..41215a74cfd
--- /dev/null
+++ b/apps/federation/l10n/ar.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "أُضيف إلى قائمة الخوادم غير الموثوقة",
+ "No server found with ID: %s" : "لايوجد أي خادوم بهذا الرقم: %s",
+ "Could not remove server" : "تتعذّر إزالة الخادوم",
+ "Server is already in the list of trusted servers." : "الخادم موجود بالفعل في قائمة الخوادم الموثوقة.",
+ "No server to federate with found" : "لم يُمكن إيجاد أي خادم للاتحاد معه",
+ "Could not add server" : "تعذّرت إضافة الخادم",
+ "Trusted servers" : "الخوادم الموثوقة",
+ "Federation" : "الربط عبر السحابة الموحدة",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها. على سبيل المثال، سيتم استخدام هذا للإكمال التلقائي للحسابات الخارجية عند المشاركة عبر السحابة الموحدة federated sharing.",
+ "External documentation for Federated Cloud Sharing" : "التوثيق الخارجي لمشاركة السحابة الاتحادية",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها. على سبيل المثال، سيتم استخدام هذا للإكمال التلقائي للحسابات الخارجية عند المشاركة الاتحادية. ليس من الضروري إضافة خادم كخادم موثوق به لإنشاء مشاركة السحابة الموحدة.",
+ "Each server must validate the other. This process may require a few cron cycles." : "يجب على كل خادوم أن يُصادِق على الآخر. هذه العملية يمكن أن تستغرق عدة دورات من مهام الخلفية cron.",
+ "+ Add trusted server" : "+ إضافة خادم موثوق",
+ "Trusted server" : "خادم موثوق",
+ "Add" : "إضافة"
+},
+"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");
diff --git a/apps/federation/l10n/ar.json b/apps/federation/l10n/ar.json
new file mode 100644
index 00000000000..318f3393348
--- /dev/null
+++ b/apps/federation/l10n/ar.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "أُضيف إلى قائمة الخوادم غير الموثوقة",
+ "No server found with ID: %s" : "لايوجد أي خادوم بهذا الرقم: %s",
+ "Could not remove server" : "تتعذّر إزالة الخادوم",
+ "Server is already in the list of trusted servers." : "الخادم موجود بالفعل في قائمة الخوادم الموثوقة.",
+ "No server to federate with found" : "لم يُمكن إيجاد أي خادم للاتحاد معه",
+ "Could not add server" : "تعذّرت إضافة الخادم",
+ "Trusted servers" : "الخوادم الموثوقة",
+ "Federation" : "الربط عبر السحابة الموحدة",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها. على سبيل المثال، سيتم استخدام هذا للإكمال التلقائي للحسابات الخارجية عند المشاركة عبر السحابة الموحدة federated sharing.",
+ "External documentation for Federated Cloud Sharing" : "التوثيق الخارجي لمشاركة السحابة الاتحادية",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "يسمح لك الاتحاد بالاتصال بخوادم موثوقة أخرى لتبادل أدلة الحسابات معها. على سبيل المثال، سيتم استخدام هذا للإكمال التلقائي للحسابات الخارجية عند المشاركة الاتحادية. ليس من الضروري إضافة خادم كخادم موثوق به لإنشاء مشاركة السحابة الموحدة.",
+ "Each server must validate the other. This process may require a few cron cycles." : "يجب على كل خادوم أن يُصادِق على الآخر. هذه العملية يمكن أن تستغرق عدة دورات من مهام الخلفية cron.",
+ "+ Add trusted server" : "+ إضافة خادم موثوق",
+ "Trusted server" : "خادم موثوق",
+ "Add" : "إضافة"
+},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/ast.js b/apps/federation/l10n/ast.js
new file mode 100644
index 00000000000..f19158a881e
--- /dev/null
+++ b/apps/federation/l10n/ast.js
@@ -0,0 +1,17 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Amestóse a la llista de sirvidores d'enfotu",
+ "Server is already in the list of trusted servers." : "El sirvidor yá ta na llista de los sirvidores d'enfotu.",
+ "No server to federate with found" : "Nun s'atopó nengún sirvidor col que se federar",
+ "Could not add server" : "Nun se pudo amestar el sirvidor",
+ "Trusted servers" : "Sirvidores d'enfotu",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federación permíte que te conectes con otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federación permite que te conectes a otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes. Por exemplu, va usase pa completar automáticamente les cuentes esternes de la compartición federada.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federación permite que te conectes a otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes. Por exemplu, va usase pa completar automáticamente les cuentes esternes de la compartición federada. Nun ye necesario amestar un sirvidor como sirvidor d'enfotu pa crear una compartición federada.",
+ "+ Add trusted server" : "+ Amestar un sirvidor d'enfotu",
+ "Trusted server" : "Sirvidor d'enfotu",
+ "Add" : "Amestar"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/ast.json b/apps/federation/l10n/ast.json
new file mode 100644
index 00000000000..a9849dbf5dd
--- /dev/null
+++ b/apps/federation/l10n/ast.json
@@ -0,0 +1,15 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Amestóse a la llista de sirvidores d'enfotu",
+ "Server is already in the list of trusted servers." : "El sirvidor yá ta na llista de los sirvidores d'enfotu.",
+ "No server to federate with found" : "Nun s'atopó nengún sirvidor col que se federar",
+ "Could not add server" : "Nun se pudo amestar el sirvidor",
+ "Trusted servers" : "Sirvidores d'enfotu",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federación permíte que te conectes con otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federación permite que te conectes a otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes. Por exemplu, va usase pa completar automáticamente les cuentes esternes de la compartición federada.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federación permite que te conectes a otros sirvidores d'enfotu pa intercambiar el direutoriu de cuentes. Por exemplu, va usase pa completar automáticamente les cuentes esternes de la compartición federada. Nun ye necesario amestar un sirvidor como sirvidor d'enfotu pa crear una compartición federada.",
+ "+ Add trusted server" : "+ Amestar un sirvidor d'enfotu",
+ "Trusted server" : "Sirvidor d'enfotu",
+ "Add" : "Amestar"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/bg.js b/apps/federation/l10n/bg.js
new file mode 100644
index 00000000000..8d1071ed3fe
--- /dev/null
+++ b/apps/federation/l10n/bg.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Добавен към списъка с доверени сървъри",
+ "Server is already in the list of trusted servers." : "Сървъра вече присъства в списъка с доверени сървъри",
+ "No server to federate with found" : "Не е намерен сървър за федериране",
+ "Could not add server" : "Не можа да се добави сървър",
+ "Trusted servers" : "Доверени сървъри",
+ "Federation" : "Федерация",
+ "+ Add trusted server" : "+ Добави доверен сървър",
+ "Trusted server" : "Доверен сървър",
+ "Add" : "Добави"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/bg.json b/apps/federation/l10n/bg.json
new file mode 100644
index 00000000000..caf88a7d6c2
--- /dev/null
+++ b/apps/federation/l10n/bg.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Добавен към списъка с доверени сървъри",
+ "Server is already in the list of trusted servers." : "Сървъра вече присъства в списъка с доверени сървъри",
+ "No server to federate with found" : "Не е намерен сървър за федериране",
+ "Could not add server" : "Не можа да се добави сървър",
+ "Trusted servers" : "Доверени сървъри",
+ "Federation" : "Федерация",
+ "+ Add trusted server" : "+ Добави доверен сървър",
+ "Trusted server" : "Доверен сървър",
+ "Add" : "Добави"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/br.js b/apps/federation/l10n/br.js
new file mode 100644
index 00000000000..d896f18e6d3
--- /dev/null
+++ b/apps/federation/l10n/br.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Ouzhpennañ d'ar roll ar servijourienn fiziet",
+ "Server is already in the list of trusted servers." : "Er roll ar servijour fiziet eo dija",
+ "No server to federate with found" : "Servijour da gevredañ ebet kavet",
+ "Could not add server" : "Dibosupl ouzhpennañ ar servijour",
+ "Trusted servers" : "Servijourienn fiziet",
+ "Federation" : "Kevread",
+ "+ Add trusted server" : "+ Ouzhpenna ur servijour fiziet",
+ "Trusted server" : "Servijour fiziet",
+ "Add" : "Ouzhpennañ"
+},
+"nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);");
diff --git a/apps/federation/l10n/br.json b/apps/federation/l10n/br.json
new file mode 100644
index 00000000000..f5e656c2472
--- /dev/null
+++ b/apps/federation/l10n/br.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Ouzhpennañ d'ar roll ar servijourienn fiziet",
+ "Server is already in the list of trusted servers." : "Er roll ar servijour fiziet eo dija",
+ "No server to federate with found" : "Servijour da gevredañ ebet kavet",
+ "Could not add server" : "Dibosupl ouzhpennañ ar servijour",
+ "Trusted servers" : "Servijourienn fiziet",
+ "Federation" : "Kevread",
+ "+ Add trusted server" : "+ Ouzhpenna ur servijour fiziet",
+ "Trusted server" : "Servijour fiziet",
+ "Add" : "Ouzhpennañ"
+},"pluralForm" :"nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/ca.js b/apps/federation/l10n/ca.js
index 1d21cd14db2..ab76d309c6f 100644
--- a/apps/federation/l10n/ca.js
+++ b/apps/federation/l10n/ca.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servidor afegit a la llista de confiança ownCloud",
- "Server is already in the list of trusted servers." : "El servidor ja està a la llista de servidors de confiança",
- "No ownCloud server found" : "No s'ha trobat cap servidor ownCloud",
+ "Added to the list of trusted servers" : "S'ha afegit a la llista de servidors de confiança",
+ "No server found with ID: %s" : "No s'ha trobat cap servidor amb ID: %s",
+ "Could not remove server" : "No s'ha pogut suprimir el servidor",
+ "Server is already in the list of trusted servers." : "El servidor ja es troba en la llista de servidors de confiança.",
+ "No server to federate with found" : "No s'ha trobat cap servidor amb què federar-se",
"Could not add server" : "No s'ha pogut afegir el servidor",
+ "Trusted servers" : "Servidors de confiança",
"Federation" : "Federació",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La federació ownCloud et permet connectar amb altes servidors ownCloud de confiança per a intercanviar el directori d'usuari. Per exemple, això serà utilitzat per auto-completar usuaris externs de la compartició federada",
- "Add server automatically once a federated share was created successfully" : "Afegir servidor automàticament quan s'hagi creat una federació correctament",
- "Trusted ownCloud Servers" : "Servidors ownCloud de confiança",
- "+ Add ownCloud server" : "+ Afegir servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar la carpeta del compte.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar carpetes de compte. Per exemple, s'utilitzarà per a proporcionar resultats d'emplenament automàtic de comptes externs per a l'ús compartit federat.",
+ "External documentation for Federated Cloud Sharing" : "Documentació externa per a compartició federada de núvol",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar carpetes de compte. Per exemple, s'utilitzarà per a proporcionar resultats d'emplenament automàtic de comptes externs per a l'ús compartit federat. No cal afegir un servidor com a servidor de confiança per a crear un recurs d'ús compartit federat.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor ha de validar l'altre. Aquest procés pot requerir uns quants cicles cron.",
+ "+ Add trusted server" : "+ Afegeix un servidor de confiança",
+ "Trusted server" : "Servidor de confiança",
+ "Add" : "Afegeix"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/ca.json b/apps/federation/l10n/ca.json
index 3d5dc995c04..0d4579feb04 100644
--- a/apps/federation/l10n/ca.json
+++ b/apps/federation/l10n/ca.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servidor afegit a la llista de confiança ownCloud",
- "Server is already in the list of trusted servers." : "El servidor ja està a la llista de servidors de confiança",
- "No ownCloud server found" : "No s'ha trobat cap servidor ownCloud",
+ "Added to the list of trusted servers" : "S'ha afegit a la llista de servidors de confiança",
+ "No server found with ID: %s" : "No s'ha trobat cap servidor amb ID: %s",
+ "Could not remove server" : "No s'ha pogut suprimir el servidor",
+ "Server is already in the list of trusted servers." : "El servidor ja es troba en la llista de servidors de confiança.",
+ "No server to federate with found" : "No s'ha trobat cap servidor amb què federar-se",
"Could not add server" : "No s'ha pogut afegir el servidor",
+ "Trusted servers" : "Servidors de confiança",
"Federation" : "Federació",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La federació ownCloud et permet connectar amb altes servidors ownCloud de confiança per a intercanviar el directori d'usuari. Per exemple, això serà utilitzat per auto-completar usuaris externs de la compartició federada",
- "Add server automatically once a federated share was created successfully" : "Afegir servidor automàticament quan s'hagi creat una federació correctament",
- "Trusted ownCloud Servers" : "Servidors ownCloud de confiança",
- "+ Add ownCloud server" : "+ Afegir servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar la carpeta del compte.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar carpetes de compte. Per exemple, s'utilitzarà per a proporcionar resultats d'emplenament automàtic de comptes externs per a l'ús compartit federat.",
+ "External documentation for Federated Cloud Sharing" : "Documentació externa per a compartició federada de núvol",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federació us permet connectar-vos amb altres servidors de confiança per a intercanviar carpetes de compte. Per exemple, s'utilitzarà per a proporcionar resultats d'emplenament automàtic de comptes externs per a l'ús compartit federat. No cal afegir un servidor com a servidor de confiança per a crear un recurs d'ús compartit federat.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor ha de validar l'altre. Aquest procés pot requerir uns quants cicles cron.",
+ "+ Add trusted server" : "+ Afegeix un servidor de confiança",
+ "Trusted server" : "Servidor de confiança",
+ "Add" : "Afegeix"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/cs.js b/apps/federation/l10n/cs.js
new file mode 100644
index 00000000000..8a10ca10b9f
--- /dev/null
+++ b/apps/federation/l10n/cs.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Přidáno na seznam důvěryhodných serverů",
+ "No server found with ID: %s" : "Nenalezen žádný server, který by měl identifikátor: %s",
+ "Could not remove server" : "Nebylo možné odebrat server",
+ "Server is already in the list of trusted servers." : "Server se už nachází na seznamu těch důvěryhodných.",
+ "No server to federate with found" : "Nenalezen žádný server, se kterým by bylo možné federovat",
+ "Could not add server" : "Server se nepodařilo přidat",
+ "Trusted servers" : "Důvěryhodné servery",
+ "Federation" : "Federování",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federování umožňuje propojit s ostatními servery, kterým věříte a vyměňovat si tak adresář účtů.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federování umožňuje propojit s ostatními servery, kterým věříte a vyměňovat si tak adresář uživatelských účtů. Používá se toho například pro automatické doplňování externích účtů při federovaném sdílení.",
+ "External documentation for Federated Cloud Sharing" : "Externí dokumentace pro sdílení v rámci federovaného cloudu",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federování umožňuje propojit se s ostatními servery, kterým věříte a vyměňovat si tak adresář uživatelských účtů. Používá se toho například pro automatické dokončování externích účtů při federovaném sdílení. Nicméně pro vytvoření federovaného sdílení jako takového není nezbytné přidávat server jako důvěryhodný.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Je třeba, aby každý server ověřil ten druhý. Tento proces může vyžadovat několik cyklů plánovače.",
+ "+ Add trusted server" : "+ Přidat důvěryhodný server",
+ "Trusted server" : "Důvěryhodný server",
+ "Add" : "Přidat"
+},
+"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;");
diff --git a/apps/federation/l10n/cs.json b/apps/federation/l10n/cs.json
new file mode 100644
index 00000000000..d11979fbca2
--- /dev/null
+++ b/apps/federation/l10n/cs.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Přidáno na seznam důvěryhodných serverů",
+ "No server found with ID: %s" : "Nenalezen žádný server, který by měl identifikátor: %s",
+ "Could not remove server" : "Nebylo možné odebrat server",
+ "Server is already in the list of trusted servers." : "Server se už nachází na seznamu těch důvěryhodných.",
+ "No server to federate with found" : "Nenalezen žádný server, se kterým by bylo možné federovat",
+ "Could not add server" : "Server se nepodařilo přidat",
+ "Trusted servers" : "Důvěryhodné servery",
+ "Federation" : "Federování",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federování umožňuje propojit s ostatními servery, kterým věříte a vyměňovat si tak adresář účtů.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federování umožňuje propojit s ostatními servery, kterým věříte a vyměňovat si tak adresář uživatelských účtů. Používá se toho například pro automatické doplňování externích účtů při federovaném sdílení.",
+ "External documentation for Federated Cloud Sharing" : "Externí dokumentace pro sdílení v rámci federovaného cloudu",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federování umožňuje propojit se s ostatními servery, kterým věříte a vyměňovat si tak adresář uživatelských účtů. Používá se toho například pro automatické dokončování externích účtů při federovaném sdílení. Nicméně pro vytvoření federovaného sdílení jako takového není nezbytné přidávat server jako důvěryhodný.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Je třeba, aby každý server ověřil ten druhý. Tento proces může vyžadovat několik cyklů plánovače.",
+ "+ Add trusted server" : "+ Přidat důvěryhodný server",
+ "Trusted server" : "Důvěryhodný server",
+ "Add" : "Přidat"
+},"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/cs_CZ.js b/apps/federation/l10n/cs_CZ.js
deleted file mode 100644
index 2cb9a725b9a..00000000000
--- a/apps/federation/l10n/cs_CZ.js
+++ /dev/null
@@ -1,15 +0,0 @@
-OC.L10N.register(
- "federation",
- {
- "Server added to the list of trusted ownClouds" : "Server přidán do seznamu důvěryhodných ownCloudů",
- "Server is already in the list of trusted servers." : "Server je již přidán na seznam důvěryhodných serverů.",
- "No ownCloud server found" : "Nenalezen žádný ownCloud server",
- "Could not add server" : "Nepodařilo se přidat server",
- "Federation" : "Sdružování",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Sdružování vám dovoluje přistupovat k seznamům uživatelů na jiných důvěryhodných ownCloudech. Využívá se například k automatickému dokončování při výběru uživatele pro sdílení v rámci sdružení.",
- "Add server automatically once a federated share was created successfully" : "Přidat server automaticky jakmile je úspěšně vytvořeno sdružené sdílení",
- "Trusted ownCloud Servers" : "Důvěryhodné ownCloud servery",
- "+ Add ownCloud server" : "+ Přidat ownCloud server",
- "ownCloud Server" : "ownCloud server"
-},
-"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;");
diff --git a/apps/federation/l10n/cs_CZ.json b/apps/federation/l10n/cs_CZ.json
deleted file mode 100644
index 038d391ee8e..00000000000
--- a/apps/federation/l10n/cs_CZ.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server přidán do seznamu důvěryhodných ownCloudů",
- "Server is already in the list of trusted servers." : "Server je již přidán na seznam důvěryhodných serverů.",
- "No ownCloud server found" : "Nenalezen žádný ownCloud server",
- "Could not add server" : "Nepodařilo se přidat server",
- "Federation" : "Sdružování",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Sdružování vám dovoluje přistupovat k seznamům uživatelů na jiných důvěryhodných ownCloudech. Využívá se například k automatickému dokončování při výběru uživatele pro sdílení v rámci sdružení.",
- "Add server automatically once a federated share was created successfully" : "Přidat server automaticky jakmile je úspěšně vytvořeno sdružené sdílení",
- "Trusted ownCloud Servers" : "Důvěryhodné ownCloud servery",
- "+ Add ownCloud server" : "+ Přidat ownCloud server",
- "ownCloud Server" : "ownCloud server"
-},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"
-} \ No newline at end of file
diff --git a/apps/federation/l10n/da.js b/apps/federation/l10n/da.js
index fec000d8c0f..547aaddb6c5 100644
--- a/apps/federation/l10n/da.js
+++ b/apps/federation/l10n/da.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Serveren er føjet til listen over sikre ownCloud servere",
+ "Added to the list of trusted servers" : "Tilføjet listen af godkendte servere",
+ "No server found with ID: %s" : "Ingen server fundet med ID: %s",
+ "Could not remove server" : "Serveren kunne ikke fjernes",
"Server is already in the list of trusted servers." : "Serveren står allerede på listen over sikre servere",
- "No ownCloud server found" : "Fandt ikke nogen ownCloud server",
+ "No server to federate with found" : "Der blev ikke fundet nogen server til at sammenkoble med",
"Could not add server" : "Kunne ikke tilføje server",
- "Federation" : "Datafællesskab",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud datafællesskab giver dig mulighed for at forbinde til andre ownCloud-installationer, som du har tillid til, for at udveksle brugerkataloger. Dette vil f.eks. blive anvendt til at udfylde eksterne brugernavne automatisk ved deling af data",
- "Add server automatically once a federated share was created successfully" : "Tilføj serveren automatisk, når et datafællesskab er oprettet ",
- "Trusted ownCloud Servers" : "ownCloud servere der er tillid til",
- "+ Add ownCloud server" : "+ Tilføj ownCloud server",
- "ownCloud Server" : "ownCloud server"
+ "Trusted servers" : "Pålidelige servere",
+ "Federation" : "Sammenkobling",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket. For eksempel vil dette blive brugt til automatisk at fuldføre eksterne konti til deling.",
+ "External documentation for Federated Cloud Sharing" : "Ekstern dokumentation for Sammenkoblings Cloud deling",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket. For eksempel vil dette blive brugt til automatisk at fuldføre eksterne konti til sammenkoblet deling. Det er ikke nødvendigt at tilføje en server som betroet server for at oprette en sammenkoblet deling.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Hver server skal validere den anden. Denne proces kan kræve et par cron cyklusser.",
+ "+ Add trusted server" : "+ Tilføj pålidelig server",
+ "Trusted server" : "Pålidelig server",
+ "Add" : "Tilføj"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/da.json b/apps/federation/l10n/da.json
index 3532e6acc26..932c5156ed7 100644
--- a/apps/federation/l10n/da.json
+++ b/apps/federation/l10n/da.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Serveren er føjet til listen over sikre ownCloud servere",
+ "Added to the list of trusted servers" : "Tilføjet listen af godkendte servere",
+ "No server found with ID: %s" : "Ingen server fundet med ID: %s",
+ "Could not remove server" : "Serveren kunne ikke fjernes",
"Server is already in the list of trusted servers." : "Serveren står allerede på listen over sikre servere",
- "No ownCloud server found" : "Fandt ikke nogen ownCloud server",
+ "No server to federate with found" : "Der blev ikke fundet nogen server til at sammenkoble med",
"Could not add server" : "Kunne ikke tilføje server",
- "Federation" : "Datafællesskab",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud datafællesskab giver dig mulighed for at forbinde til andre ownCloud-installationer, som du har tillid til, for at udveksle brugerkataloger. Dette vil f.eks. blive anvendt til at udfylde eksterne brugernavne automatisk ved deling af data",
- "Add server automatically once a federated share was created successfully" : "Tilføj serveren automatisk, når et datafællesskab er oprettet ",
- "Trusted ownCloud Servers" : "ownCloud servere der er tillid til",
- "+ Add ownCloud server" : "+ Tilføj ownCloud server",
- "ownCloud Server" : "ownCloud server"
+ "Trusted servers" : "Pålidelige servere",
+ "Federation" : "Sammenkobling",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket. For eksempel vil dette blive brugt til automatisk at fuldføre eksterne konti til deling.",
+ "External documentation for Federated Cloud Sharing" : "Ekstern dokumentation for Sammenkoblings Cloud deling",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Sammenkobling giver dig mulighed for at oprette forbindelse til andre betroede servere for at udveksle kontobiblioteket. For eksempel vil dette blive brugt til automatisk at fuldføre eksterne konti til sammenkoblet deling. Det er ikke nødvendigt at tilføje en server som betroet server for at oprette en sammenkoblet deling.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Hver server skal validere den anden. Denne proces kan kræve et par cron cyklusser.",
+ "+ Add trusted server" : "+ Tilføj pålidelig server",
+ "Trusted server" : "Pålidelig server",
+ "Add" : "Tilføj"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/de.js b/apps/federation/l10n/de.js
index d810cbf4218..070c7e76e92 100644
--- a/apps/federation/l10n/de.js
+++ b/apps/federation/l10n/de.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Server wurde in die Liste der vertrauenswürdigen Servern aufgenommen",
- "Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No ownCloud server found" : "Es wurde kein ownCloud Server gefunden",
- "Could not add server" : "Konnte Server nicht hinzufügen",
+ "Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
+ "No server found with ID: %s" : "Kein Server mit folgender ID gefunden: %s",
+ "Could not remove server" : "Server konnte nicht entfernt werden",
+ "Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Server.",
+ "No server to federate with found" : "Es wurde kein Server zum Verbinden per Federation gefunden",
+ "Could not add server" : "Server konnte nicht hinzugefügt werden",
+ "Trusted servers" : "Vertrauenswürdige Server",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation ermöglicht es dir dich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Dies wird, zum Beispiel, für die automatische Vervollständigung externer Benutzer verwendet.",
- "Add server automatically once a federated share was created successfully" : "Füge einen mit ownCloud Federation verbundenen Server automatisch hinzu, sobald die Verbindung einmal erfolgreich erstellt wurde",
- "Trusted ownCloud Servers" : "vertrauenswürdige ownCloud Server",
- "+ Add ownCloud server" : "+ ownCloud Server hinzufügen",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation ermöglicht die Verbindung mit anderen vertrauenswürdigen Servern, um das Kontenverzeichnis auszutauschen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation ermöglicht es dir, dich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet.",
+ "External documentation for Federated Cloud Sharing" : "Externe Dokumentation für das Teilen über Federated Cloud",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation ermöglicht es dir, dich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet. Es ist nicht erforderlich einen Server als vertrauenswürdig hinzuzufügen, um eine \"federated\" Freigabe zu erstellen.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Jeder Server muss den anderen validieren. Dieser Vorgang kann einige Cron-Zyklen benötigen.",
+ "+ Add trusted server" : "+ Vertrauenswürdigen Server hinzufügen",
+ "Trusted server" : "Vertrauenswürdiger Server",
+ "Add" : "Hinzufügen"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/de.json b/apps/federation/l10n/de.json
index c8fafc9166d..ec1118bce91 100644
--- a/apps/federation/l10n/de.json
+++ b/apps/federation/l10n/de.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server wurde in die Liste der vertrauenswürdigen Servern aufgenommen",
- "Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No ownCloud server found" : "Es wurde kein ownCloud Server gefunden",
- "Could not add server" : "Konnte Server nicht hinzufügen",
+ "Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
+ "No server found with ID: %s" : "Kein Server mit folgender ID gefunden: %s",
+ "Could not remove server" : "Server konnte nicht entfernt werden",
+ "Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Server.",
+ "No server to federate with found" : "Es wurde kein Server zum Verbinden per Federation gefunden",
+ "Could not add server" : "Server konnte nicht hinzugefügt werden",
+ "Trusted servers" : "Vertrauenswürdige Server",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation ermöglicht es dir dich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Dies wird, zum Beispiel, für die automatische Vervollständigung externer Benutzer verwendet.",
- "Add server automatically once a federated share was created successfully" : "Füge einen mit ownCloud Federation verbundenen Server automatisch hinzu, sobald die Verbindung einmal erfolgreich erstellt wurde",
- "Trusted ownCloud Servers" : "vertrauenswürdige ownCloud Server",
- "+ Add ownCloud server" : "+ ownCloud Server hinzufügen",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation ermöglicht die Verbindung mit anderen vertrauenswürdigen Servern, um das Kontenverzeichnis auszutauschen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation ermöglicht es dir, dich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet.",
+ "External documentation for Federated Cloud Sharing" : "Externe Dokumentation für das Teilen über Federated Cloud",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation ermöglicht es dir, dich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet. Es ist nicht erforderlich einen Server als vertrauenswürdig hinzuzufügen, um eine \"federated\" Freigabe zu erstellen.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Jeder Server muss den anderen validieren. Dieser Vorgang kann einige Cron-Zyklen benötigen.",
+ "+ Add trusted server" : "+ Vertrauenswürdigen Server hinzufügen",
+ "Trusted server" : "Vertrauenswürdiger Server",
+ "Add" : "Hinzufügen"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/de_DE.js b/apps/federation/l10n/de_DE.js
index 4ce958bbf23..efb22f90bb5 100644
--- a/apps/federation/l10n/de_DE.js
+++ b/apps/federation/l10n/de_DE.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Server wurde in die Liste der vertrauenswürdigen ownClouds aufgenommen",
+ "Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
+ "No server found with ID: %s" : "Kein Server mit folgender ID gefunden: %s",
+ "Could not remove server" : "Server konnte nicht entfernt werden",
"Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No ownCloud server found" : "Es wurde kein ownCloud Server gefunden",
- "Could not add server" : "Konnte Server nicht hinzufügen",
+ "No server to federate with found" : "Es wurde kein Server zum Verbinden per Federation gefunden",
+ "Could not add server" : "Server konnte nicht hinzugefügt werden",
+ "Trusted servers" : "Vertrauenswürdige Server",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation ermöglicht es Ihnen sich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Dies wird, zum Beispiel, für die automatische Vervollständigung externer Benutzer verwendet.",
- "Add server automatically once a federated share was created successfully" : "Server automatisch hinzufügen sobale eine federated Freigabe erstellt wurde",
- "Trusted ownCloud Servers" : "Vertrauenswürdige ownCloud Server",
- "+ Add ownCloud server" : "+ ownCloud Server hinzufügen",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation ermöglicht die Verbindung mit anderen vertrauenswürdigen Servern, um das Kontenverzeichnis auszutauschen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation ermöglicht es Ihnen, sich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet.",
+ "External documentation for Federated Cloud Sharing" : "Externe Dokumentation für Teilen über Federated Cloud",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation ermöglicht es Ihnen, sich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet. Es ist nicht erforderlich einen Server als vertrauenswürdig hinzuzufügen, um eine \"federated\" Freigabe zu erstellen.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Jeder Server muss den anderen validieren. Dieser Vorgang kann einige Cron-Zyklen erfordern.",
+ "+ Add trusted server" : "+ Vertrauenswürdigen Server hinzufügen",
+ "Trusted server" : "Vertrauenswürdiger Server",
+ "Add" : "Hinzufügen"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/de_DE.json b/apps/federation/l10n/de_DE.json
index 82bbecc563d..96f5fb099d3 100644
--- a/apps/federation/l10n/de_DE.json
+++ b/apps/federation/l10n/de_DE.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server wurde in die Liste der vertrauenswürdigen ownClouds aufgenommen",
+ "Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
+ "No server found with ID: %s" : "Kein Server mit folgender ID gefunden: %s",
+ "Could not remove server" : "Server konnte nicht entfernt werden",
"Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No ownCloud server found" : "Es wurde kein ownCloud Server gefunden",
- "Could not add server" : "Konnte Server nicht hinzufügen",
+ "No server to federate with found" : "Es wurde kein Server zum Verbinden per Federation gefunden",
+ "Could not add server" : "Server konnte nicht hinzugefügt werden",
+ "Trusted servers" : "Vertrauenswürdige Server",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation ermöglicht es Ihnen sich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Dies wird, zum Beispiel, für die automatische Vervollständigung externer Benutzer verwendet.",
- "Add server automatically once a federated share was created successfully" : "Server automatisch hinzufügen sobale eine federated Freigabe erstellt wurde",
- "Trusted ownCloud Servers" : "Vertrauenswürdige ownCloud Server",
- "+ Add ownCloud server" : "+ ownCloud Server hinzufügen",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation ermöglicht die Verbindung mit anderen vertrauenswürdigen Servern, um das Kontenverzeichnis auszutauschen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation ermöglicht es Ihnen, sich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet.",
+ "External documentation for Federated Cloud Sharing" : "Externe Dokumentation für Teilen über Federated Cloud",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation ermöglicht es Ihnen, sich mit anderen vertrauenswürdigen Servern zu verbinden, um das Kontoverzeichnis auszutauschen. Dies wird zum Beispiel für die automatische Vervollständigung externer Konten beim Federated-Sharing verwendet. Es ist nicht erforderlich einen Server als vertrauenswürdig hinzuzufügen, um eine \"federated\" Freigabe zu erstellen.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Jeder Server muss den anderen validieren. Dieser Vorgang kann einige Cron-Zyklen erfordern.",
+ "+ Add trusted server" : "+ Vertrauenswürdigen Server hinzufügen",
+ "Trusted server" : "Vertrauenswürdiger Server",
+ "Add" : "Hinzufügen"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/el.js b/apps/federation/l10n/el.js
index b4404d94043..d877d7dfe0d 100644
--- a/apps/federation/l10n/el.js
+++ b/apps/federation/l10n/el.js
@@ -1,10 +1,14 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Ο διακομιστής προστέθηκε στην λίστα των έμπιστων ownCloud",
+ "Added to the list of trusted servers" : "Προσθήκη στην λίστα των έμπιστων διακομιστών",
"Server is already in the list of trusted servers." : "Ο διακομιστής περιλαμβάνεται ήδη στην λίστα των έμπιστων ownCloud",
- "No ownCloud server found" : "Δεν βρέθηκε διακομιστής ownCloud",
+ "No server to federate with found" : "Δεν βρέθηκε διακομιστής για συνένωση",
"Could not add server" : "Αδυναμία προσθήκης διακομιστή",
- "ownCloud Server" : "Διακομιστής ownCloud"
+ "Trusted servers" : "Έμπιστοι διακομιστές",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+Προσθήκη έμπιστων διακομιστών",
+ "Trusted server" : "Έμπιστοι διακομιστές",
+ "Add" : "Προσθήκη"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/el.json b/apps/federation/l10n/el.json
index 887b731cad0..d074129fe06 100644
--- a/apps/federation/l10n/el.json
+++ b/apps/federation/l10n/el.json
@@ -1,8 +1,12 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Ο διακομιστής προστέθηκε στην λίστα των έμπιστων ownCloud",
+ "Added to the list of trusted servers" : "Προσθήκη στην λίστα των έμπιστων διακομιστών",
"Server is already in the list of trusted servers." : "Ο διακομιστής περιλαμβάνεται ήδη στην λίστα των έμπιστων ownCloud",
- "No ownCloud server found" : "Δεν βρέθηκε διακομιστής ownCloud",
+ "No server to federate with found" : "Δεν βρέθηκε διακομιστής για συνένωση",
"Could not add server" : "Αδυναμία προσθήκης διακομιστή",
- "ownCloud Server" : "Διακομιστής ownCloud"
+ "Trusted servers" : "Έμπιστοι διακομιστές",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+Προσθήκη έμπιστων διακομιστών",
+ "Trusted server" : "Έμπιστοι διακομιστές",
+ "Add" : "Προσθήκη"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/en_GB.js b/apps/federation/l10n/en_GB.js
index 906ddbd43d5..d0b88545467 100644
--- a/apps/federation/l10n/en_GB.js
+++ b/apps/federation/l10n/en_GB.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Server added to the list of trusted ownClouds",
+ "Added to the list of trusted servers" : "Added to the list of trusted servers",
+ "No server found with ID: %s" : "No server found with ID: %s",
+ "Could not remove server" : "Could not remove server",
"Server is already in the list of trusted servers." : "Server is already in the list of trusted servers.",
- "No ownCloud server found" : "No ownCloud server found",
+ "No server to federate with found" : "No server to federate with found",
"Could not add server" : "Could not add server",
+ "Trusted servers" : "Trusted servers",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.",
- "Add server automatically once a federated share was created successfully" : "Add server automatically once a federated share was created successfully",
- "Trusted ownCloud Servers" : "Trusted ownCloud Servers",
- "+ Add ownCloud server" : "+ Add ownCloud server",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation allows you to connect with other trusted servers to exchange the account directory.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing.",
+ "External documentation for Federated Cloud Sharing" : "External documentation for Federated Cloud Sharing",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Each server must validate the other. This process may require a few cron cycles.",
+ "+ Add trusted server" : "+ Add trusted server",
+ "Trusted server" : "Trusted server",
+ "Add" : "Add"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/en_GB.json b/apps/federation/l10n/en_GB.json
index fb80e4571f7..7a7b7f9a060 100644
--- a/apps/federation/l10n/en_GB.json
+++ b/apps/federation/l10n/en_GB.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server added to the list of trusted ownClouds",
+ "Added to the list of trusted servers" : "Added to the list of trusted servers",
+ "No server found with ID: %s" : "No server found with ID: %s",
+ "Could not remove server" : "Could not remove server",
"Server is already in the list of trusted servers." : "Server is already in the list of trusted servers.",
- "No ownCloud server found" : "No ownCloud server found",
+ "No server to federate with found" : "No server to federate with found",
"Could not add server" : "Could not add server",
+ "Trusted servers" : "Trusted servers",
"Federation" : "Federation",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.",
- "Add server automatically once a federated share was created successfully" : "Add server automatically once a federated share was created successfully",
- "Trusted ownCloud Servers" : "Trusted ownCloud Servers",
- "+ Add ownCloud server" : "+ Add ownCloud server",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation allows you to connect with other trusted servers to exchange the account directory.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing.",
+ "External documentation for Federated Cloud Sharing" : "External documentation for Federated Cloud Sharing",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Each server must validate the other. This process may require a few cron cycles.",
+ "+ Add trusted server" : "+ Add trusted server",
+ "Trusted server" : "Trusted server",
+ "Add" : "Add"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/eo.js b/apps/federation/l10n/eo.js
index 3f4b1480554..e1739be31e8 100644
--- a/apps/federation/l10n/eo.js
+++ b/apps/federation/l10n/eo.js
@@ -1,10 +1,14 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servilo aldoniĝis al la listo de fidataj ownCloud-oj.",
- "Server is already in the list of trusted servers." : "Servilo jam estas en la listo de fidataj serviloj.",
- "No ownCloud server found" : "Ne troviĝis ownCloud-servilo",
+ "Added to the list of trusted servers" : "Aldonita al la listo de fidindaj serviloj",
+ "Server is already in the list of trusted servers." : "Servilo jam estas en la listo de fidindaj serviloj.",
+ "No server to federate with found" : "Neniu federota servilo trovata",
"Could not add server" : "Ne eblas aldoni servilon",
- "Federation" : "Federado"
+ "Trusted servers" : "Fidindaj serviloj",
+ "Federation" : "Federado",
+ "+ Add trusted server" : "+ Aldoni fidindan servilon",
+ "Trusted server" : "Fidinda servilo",
+ "Add" : "Aldoni"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/eo.json b/apps/federation/l10n/eo.json
index dff629a2819..375ae2a6433 100644
--- a/apps/federation/l10n/eo.json
+++ b/apps/federation/l10n/eo.json
@@ -1,8 +1,12 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servilo aldoniĝis al la listo de fidataj ownCloud-oj.",
- "Server is already in the list of trusted servers." : "Servilo jam estas en la listo de fidataj serviloj.",
- "No ownCloud server found" : "Ne troviĝis ownCloud-servilo",
+ "Added to the list of trusted servers" : "Aldonita al la listo de fidindaj serviloj",
+ "Server is already in the list of trusted servers." : "Servilo jam estas en la listo de fidindaj serviloj.",
+ "No server to federate with found" : "Neniu federota servilo trovata",
"Could not add server" : "Ne eblas aldoni servilon",
- "Federation" : "Federado"
+ "Trusted servers" : "Fidindaj serviloj",
+ "Federation" : "Federado",
+ "+ Add trusted server" : "+ Aldoni fidindan servilon",
+ "Trusted server" : "Fidinda servilo",
+ "Add" : "Aldoni"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/es.js b/apps/federation/l10n/es.js
index c559a39c979..83e1acb38f8 100644
--- a/apps/federation/l10n/es.js
+++ b/apps/federation/l10n/es.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servidor agregado a la lista de ownClouds en los que se confía",
+ "Added to the list of trusted servers" : "Añadido a la lista de servidores de confianza",
+ "No server found with ID: %s" : "No se ha encontrado el servidor con ID: %s",
+ "Could not remove server" : "No se pudo eliminar el servidor",
"Server is already in the list of trusted servers." : "El servidor ya está en la lista de servidores en los que se confía.",
- "No ownCloud server found" : "No se ha encontrado el servidor ownCloud",
- "Could not add server" : "No se pudo agregar el servidor",
+ "No server to federate with found" : "No se ha encontrado ningún servidor con el que federarse.",
+ "Could not add server" : "No se ha podido añadir el servidor",
+ "Trusted servers" : "Servidores de confianza",
"Federation" : "Federación",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La Federación de ownCloud permite conectar con otros ownClouds en los que se confíe para intercambiar el directorio de usuario. Por ejemplo esto se puede usar para autocompletar usuarios externos en caso de compartición federada.",
- "Add server automatically once a federated share was created successfully" : "Añadir el servidor automáticamente una vez que un compartido federado se haya creado exitosamente",
- "Trusted ownCloud Servers" : "Servidores onwCloud en los que confío",
- "+ Add ownCloud server" : "+ Añadir servidor onwCloud",
- "ownCloud Server" : "Servidor ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La Federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se utilizará para auto-completar a los usuarios externos para el intercambio federado.",
+ "External documentation for Federated Cloud Sharing" : "Documentación externa para Compartir con Nube Federada",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La Federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se utilizará para auto-completar a los usuarios externos para el intercambio federado. No es necesario añadir un servidor como servidor de confianza para crear una recurso compartido federado.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor debe validar al otro. Este proceso puede necesitar algunos ciclos de cron.",
+ "+ Add trusted server" : "+ Añadir servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Añadir"
},
-"nplurals=2; plural=(n != 1);");
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es.json b/apps/federation/l10n/es.json
index 17c11ebae3c..3c07677f806 100644
--- a/apps/federation/l10n/es.json
+++ b/apps/federation/l10n/es.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servidor agregado a la lista de ownClouds en los que se confía",
+ "Added to the list of trusted servers" : "Añadido a la lista de servidores de confianza",
+ "No server found with ID: %s" : "No se ha encontrado el servidor con ID: %s",
+ "Could not remove server" : "No se pudo eliminar el servidor",
"Server is already in the list of trusted servers." : "El servidor ya está en la lista de servidores en los que se confía.",
- "No ownCloud server found" : "No se ha encontrado el servidor ownCloud",
- "Could not add server" : "No se pudo agregar el servidor",
+ "No server to federate with found" : "No se ha encontrado ningún servidor con el que federarse.",
+ "Could not add server" : "No se ha podido añadir el servidor",
+ "Trusted servers" : "Servidores de confianza",
"Federation" : "Federación",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La Federación de ownCloud permite conectar con otros ownClouds en los que se confíe para intercambiar el directorio de usuario. Por ejemplo esto se puede usar para autocompletar usuarios externos en caso de compartición federada.",
- "Add server automatically once a federated share was created successfully" : "Añadir el servidor automáticamente una vez que un compartido federado se haya creado exitosamente",
- "Trusted ownCloud Servers" : "Servidores onwCloud en los que confío",
- "+ Add ownCloud server" : "+ Añadir servidor onwCloud",
- "ownCloud Server" : "Servidor ownCloud"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La Federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se utilizará para auto-completar a los usuarios externos para el intercambio federado.",
+ "External documentation for Federated Cloud Sharing" : "Documentación externa para Compartir con Nube Federada",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La Federación le permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se utilizará para auto-completar a los usuarios externos para el intercambio federado. No es necesario añadir un servidor como servidor de confianza para crear una recurso compartido federado.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor debe validar al otro. Este proceso puede necesitar algunos ciclos de cron.",
+ "+ Add trusted server" : "+ Añadir servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Añadir"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/es_419.js b/apps/federation/l10n/es_419.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_419.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_419.json b/apps/federation/l10n/es_419.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_419.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_AR.js b/apps/federation/l10n/es_AR.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_AR.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_AR.json b/apps/federation/l10n/es_AR.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_AR.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_CL.js b/apps/federation/l10n/es_CL.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_CL.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_CL.json b/apps/federation/l10n/es_CL.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_CL.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_CO.js b/apps/federation/l10n/es_CO.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_CO.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_CO.json b/apps/federation/l10n/es_CO.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_CO.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_CR.js b/apps/federation/l10n/es_CR.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_CR.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_CR.json b/apps/federation/l10n/es_CR.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_CR.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_DO.js b/apps/federation/l10n/es_DO.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_DO.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_DO.json b/apps/federation/l10n/es_DO.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_DO.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_EC.js b/apps/federation/l10n/es_EC.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_EC.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_EC.json b/apps/federation/l10n/es_EC.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_EC.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_GT.js b/apps/federation/l10n/es_GT.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_GT.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_GT.json b/apps/federation/l10n/es_GT.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_GT.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_HN.js b/apps/federation/l10n/es_HN.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_HN.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_HN.json b/apps/federation/l10n/es_HN.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_HN.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_MX.js b/apps/federation/l10n/es_MX.js
new file mode 100644
index 00000000000..298f0c5cca6
--- /dev/null
+++ b/apps/federation/l10n/es_MX.js
@@ -0,0 +1,17 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se usará para autocompletar usuarios externos en el recurso compartido federado.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se usará para autocompletar usuarios externos en el recurso compartido federado. No es necesario añadir un servidor como servidor de confianza para crear un recurso compartido federado.",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_MX.json b/apps/federation/l10n/es_MX.json
new file mode 100644
index 00000000000..8619bee4a09
--- /dev/null
+++ b/apps/federation/l10n/es_MX.json
@@ -0,0 +1,15 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se usará para autocompletar usuarios externos en el recurso compartido federado.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La Federación permite conectarse con otros servidores de confianza para intercambiar el directorio de usuarios. Por ejemplo, esto se usará para autocompletar usuarios externos en el recurso compartido federado. No es necesario añadir un servidor como servidor de confianza para crear un recurso compartido federado.",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_NI.js b/apps/federation/l10n/es_NI.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_NI.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_NI.json b/apps/federation/l10n/es_NI.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_NI.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_PA.js b/apps/federation/l10n/es_PA.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_PA.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_PA.json b/apps/federation/l10n/es_PA.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_PA.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_PE.js b/apps/federation/l10n/es_PE.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_PE.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_PE.json b/apps/federation/l10n/es_PE.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_PE.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_PR.js b/apps/federation/l10n/es_PR.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_PR.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_PR.json b/apps/federation/l10n/es_PR.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_PR.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_PY.js b/apps/federation/l10n/es_PY.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_PY.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_PY.json b/apps/federation/l10n/es_PY.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_PY.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_SV.js b/apps/federation/l10n/es_SV.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_SV.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_SV.json b/apps/federation/l10n/es_SV.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_SV.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/es_UY.js b/apps/federation/l10n/es_UY.js
new file mode 100644
index 00000000000..38d278ed2b9
--- /dev/null
+++ b/apps/federation/l10n/es_UY.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/es_UY.json b/apps/federation/l10n/es_UY.json
new file mode 100644
index 00000000000..0864dcbcee6
--- /dev/null
+++ b/apps/federation/l10n/es_UY.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agregado a la lista de servidores de confianza",
+ "Server is already in the list of trusted servers." : "El servidor ya se encuentra en la lista de servidores de confianza.",
+ "No server to federate with found" : "No se encontraron servidores para integrar a la federación",
+ "Could not add server" : "No fue posible agregar el servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "+ Add trusted server" : "+ Agregar servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Agregar"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/et_EE.js b/apps/federation/l10n/et_EE.js
index bdad264db7d..55a6c763bd6 100644
--- a/apps/federation/l10n/et_EE.js
+++ b/apps/federation/l10n/et_EE.js
@@ -1,7 +1,21 @@
OC.L10N.register(
"federation",
{
- "No ownCloud server found" : "ownCloudi serverit ei leitud",
- "Could not add server" : "Serveri lisamine ebaõnnestus"
+ "Added to the list of trusted servers" : "Lisatud usaldatud serverite nimekirja",
+ "No server found with ID: %s" : "Ei leidnud serverit IDga: %s",
+ "Could not remove server" : "Ei saanud serverit eemaldada",
+ "Server is already in the list of trusted servers." : "Server on juba usaldatud serverite nimekirjas.",
+ "No server to federate with found" : "Ei leitud ühtegi serverit, millega liidenduda",
+ "Could not add server" : "Serveri lisamine ebaõnnestus",
+ "Trusted servers" : "Usaldatud serverid",
+ "Federation" : "Liidendus",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Liitjagamine võimaldab teil kontokataloogi vahetamiseks luua ühenduse teiste usaldusväärsete serveritega.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Liitjagamine võimaldab kontokataloogi vahendamiseks luua ühenduse teiste usaldusväärsete serveritega. Näiteks kasutatakse seda väliste kontode automaatseks täitmiseks ühendatud jagamiseks.",
+ "External documentation for Federated Cloud Sharing" : "Väiline dokumentatsioon Liitjagamise Pilvjagamise kohta",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Liitjagamine võimaldab kontokataloogi vahendamiseks luua ühenduse teiste usaldusväärsete serveritega. Näiteks kasutatakse seda väliste kontode automaatseks täitmiseks ühendatud jagamiseks. Liitjagamise loomiseks ei ole vaja serverit usaldusväärse serverina lisada.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Iga server peab valideerima teise. See protsess võib võtta mitu cron tsüklit.",
+ "+ Add trusted server" : "+ Lisa usaldatud server",
+ "Trusted server" : "Usaldatud server",
+ "Add" : "Lisa"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/et_EE.json b/apps/federation/l10n/et_EE.json
index 9a5a8881c9b..1e9d045edff 100644
--- a/apps/federation/l10n/et_EE.json
+++ b/apps/federation/l10n/et_EE.json
@@ -1,5 +1,19 @@
{ "translations": {
- "No ownCloud server found" : "ownCloudi serverit ei leitud",
- "Could not add server" : "Serveri lisamine ebaõnnestus"
+ "Added to the list of trusted servers" : "Lisatud usaldatud serverite nimekirja",
+ "No server found with ID: %s" : "Ei leidnud serverit IDga: %s",
+ "Could not remove server" : "Ei saanud serverit eemaldada",
+ "Server is already in the list of trusted servers." : "Server on juba usaldatud serverite nimekirjas.",
+ "No server to federate with found" : "Ei leitud ühtegi serverit, millega liidenduda",
+ "Could not add server" : "Serveri lisamine ebaõnnestus",
+ "Trusted servers" : "Usaldatud serverid",
+ "Federation" : "Liidendus",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Liitjagamine võimaldab teil kontokataloogi vahetamiseks luua ühenduse teiste usaldusväärsete serveritega.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Liitjagamine võimaldab kontokataloogi vahendamiseks luua ühenduse teiste usaldusväärsete serveritega. Näiteks kasutatakse seda väliste kontode automaatseks täitmiseks ühendatud jagamiseks.",
+ "External documentation for Federated Cloud Sharing" : "Väiline dokumentatsioon Liitjagamise Pilvjagamise kohta",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Liitjagamine võimaldab kontokataloogi vahendamiseks luua ühenduse teiste usaldusväärsete serveritega. Näiteks kasutatakse seda väliste kontode automaatseks täitmiseks ühendatud jagamiseks. Liitjagamise loomiseks ei ole vaja serverit usaldusväärse serverina lisada.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Iga server peab valideerima teise. See protsess võib võtta mitu cron tsüklit.",
+ "+ Add trusted server" : "+ Lisa usaldatud server",
+ "Trusted server" : "Usaldatud server",
+ "Add" : "Lisa"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/eu.js b/apps/federation/l10n/eu.js
new file mode 100644
index 00000000000..0a4ccf10760
--- /dev/null
+++ b/apps/federation/l10n/eu.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Zerbitzari fidagarrien zerrendara gehituta",
+ "No server found with ID: %s" : "Ez da zerbitzaririk aurkitu ID honekin: %s",
+ "Could not remove server" : "Ezin izan da zerbitzaria kendu",
+ "Server is already in the list of trusted servers." : "Zerbitzaria fidagarrien zerrendan dago jadanik",
+ "No server to federate with found" : "Ez da federatzeko zerbitzaririk aurkitu",
+ "Could not add server" : "Ezin izan da zerbitzaria gehitu",
+ "Trusted servers" : "Zerbitzari fidagarriak",
+ "Federation" : "Federazioa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federazioak fidagarriak diren beste zerbitzariekin kontu-direktorioa konektatzea ahalbidetzen dizu.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federazioaren bidez fidagarriak diren zerbitzariekin kontu-direktorioa trukatzeko aukera dago. Adibidez, kanpo erabiltzaileak automatikoki betetzeko erabil daiteke, federatze partekatuan. ",
+ "External documentation for Federated Cloud Sharing" : "Federatutako hodei partekatzerako kanpoko dokumentazioa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federazioaren bidez fidagarriak diren zerbitzariekin kontu-direktorioa trukatzeko aukera dago. Adibidez, kanpo erabiltzaileak automatikoki betetzeko erabil daiteke, federatze partekatuan. Federatze partekatua egiteko ez da beharrezkoa zerbitzari bat gehitzea zerbitzari fidagarri gisa.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Zerbitzari bakoitza bestea balioztatu behar du. Prozesu honek cron ziklo batzuk beharko ditu.",
+ "+ Add trusted server" : "+ Gehitu zerbitzari fidagarria",
+ "Trusted server" : "Zerbitzari fidagarria",
+ "Add" : "Gehitu"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/eu.json b/apps/federation/l10n/eu.json
new file mode 100644
index 00000000000..4f72bcabf30
--- /dev/null
+++ b/apps/federation/l10n/eu.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Zerbitzari fidagarrien zerrendara gehituta",
+ "No server found with ID: %s" : "Ez da zerbitzaririk aurkitu ID honekin: %s",
+ "Could not remove server" : "Ezin izan da zerbitzaria kendu",
+ "Server is already in the list of trusted servers." : "Zerbitzaria fidagarrien zerrendan dago jadanik",
+ "No server to federate with found" : "Ez da federatzeko zerbitzaririk aurkitu",
+ "Could not add server" : "Ezin izan da zerbitzaria gehitu",
+ "Trusted servers" : "Zerbitzari fidagarriak",
+ "Federation" : "Federazioa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federazioak fidagarriak diren beste zerbitzariekin kontu-direktorioa konektatzea ahalbidetzen dizu.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federazioaren bidez fidagarriak diren zerbitzariekin kontu-direktorioa trukatzeko aukera dago. Adibidez, kanpo erabiltzaileak automatikoki betetzeko erabil daiteke, federatze partekatuan. ",
+ "External documentation for Federated Cloud Sharing" : "Federatutako hodei partekatzerako kanpoko dokumentazioa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federazioaren bidez fidagarriak diren zerbitzariekin kontu-direktorioa trukatzeko aukera dago. Adibidez, kanpo erabiltzaileak automatikoki betetzeko erabil daiteke, federatze partekatuan. Federatze partekatua egiteko ez da beharrezkoa zerbitzari bat gehitzea zerbitzari fidagarri gisa.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Zerbitzari bakoitza bestea balioztatu behar du. Prozesu honek cron ziklo batzuk beharko ditu.",
+ "+ Add trusted server" : "+ Gehitu zerbitzari fidagarria",
+ "Trusted server" : "Zerbitzari fidagarria",
+ "Add" : "Gehitu"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/fa.js b/apps/federation/l10n/fa.js
new file mode 100644
index 00000000000..772c99c4c8b
--- /dev/null
+++ b/apps/federation/l10n/fa.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "اضافه شده به لیست سرورهای مورد اعتماد",
+ "Server is already in the list of trusted servers." : "سرور در حال حاضر در لیست سرورهای مورد اعتماد است.",
+ "No server to federate with found" : "هیچ سروری برای اتحاد یافت نشد",
+ "Could not add server" : "سرور اضافه نشد",
+ "Trusted servers" : "سرورهای قابل اعتماد",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ سرور قابل اعتماد را اضافه کنید",
+ "Trusted server" : "سرور قابل اعتماد",
+ "Add" : "افزودن"
+},
+"nplurals=2; plural=(n > 1);");
diff --git a/apps/federation/l10n/fa.json b/apps/federation/l10n/fa.json
new file mode 100644
index 00000000000..af0586af402
--- /dev/null
+++ b/apps/federation/l10n/fa.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "اضافه شده به لیست سرورهای مورد اعتماد",
+ "Server is already in the list of trusted servers." : "سرور در حال حاضر در لیست سرورهای مورد اعتماد است.",
+ "No server to federate with found" : "هیچ سروری برای اتحاد یافت نشد",
+ "Could not add server" : "سرور اضافه نشد",
+ "Trusted servers" : "سرورهای قابل اعتماد",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ سرور قابل اعتماد را اضافه کنید",
+ "Trusted server" : "سرور قابل اعتماد",
+ "Add" : "افزودن"
+},"pluralForm" :"nplurals=2; plural=(n > 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/fi.js b/apps/federation/l10n/fi.js
new file mode 100644
index 00000000000..b85b5e9f3fb
--- /dev/null
+++ b/apps/federation/l10n/fi.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Lisätty luotettujen palvelimien luetteloon",
+ "Server is already in the list of trusted servers." : "Palvelin on jo luotettujen palvelimien luettelossa.",
+ "No server to federate with found" : "Palvelinta, johon liittyä, ei löytynyt",
+ "Could not add server" : "Palvelimen lisääminen ei onnistunut",
+ "Trusted servers" : "Luotetut palvelimet",
+ "Federation" : "Federaatio",
+ "+ Add trusted server" : "+ Lisää luotettu palvelin",
+ "Trusted server" : "Luotettu palvelin",
+ "Add" : "Lisää"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/fi.json b/apps/federation/l10n/fi.json
new file mode 100644
index 00000000000..b1918f4d10d
--- /dev/null
+++ b/apps/federation/l10n/fi.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Lisätty luotettujen palvelimien luetteloon",
+ "Server is already in the list of trusted servers." : "Palvelin on jo luotettujen palvelimien luettelossa.",
+ "No server to federate with found" : "Palvelinta, johon liittyä, ei löytynyt",
+ "Could not add server" : "Palvelimen lisääminen ei onnistunut",
+ "Trusted servers" : "Luotetut palvelimet",
+ "Federation" : "Federaatio",
+ "+ Add trusted server" : "+ Lisää luotettu palvelin",
+ "Trusted server" : "Luotettu palvelin",
+ "Add" : "Lisää"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/fi_FI.js b/apps/federation/l10n/fi_FI.js
deleted file mode 100644
index 3a2d85a51b6..00000000000
--- a/apps/federation/l10n/fi_FI.js
+++ /dev/null
@@ -1,15 +0,0 @@
-OC.L10N.register(
- "federation",
- {
- "Server added to the list of trusted ownClouds" : "Palvelin lisätty luotettujen ownCloudien luetteloon",
- "Server is already in the list of trusted servers." : "Palvelin on jo luotettujen palvelimien luettelossa.",
- "No ownCloud server found" : "ownCloud-palvelinta ei löydy",
- "Could not add server" : "Palvelimen lisääminen ei onnistunut",
- "Federation" : "Federaatio",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloudin federaatio mahdollistaa yhdistämisen muihin luotettuihin ownCloudeihin käyttäjähakemistojen vaihtamiseksi. Tätä käytetään muun muassa ulkoisten käyttäjien automaattiseen täydentämiseen federoidussa jakamisessa.",
- "Add server automatically once a federated share was created successfully" : "Lisää palvelin automaattisesti, kun federoitu jako on luotu onnistuneesti",
- "Trusted ownCloud Servers" : "Luotetut ownCloud-palvelimet",
- "+ Add ownCloud server" : "+ Lisää ownCloud-palvelin",
- "ownCloud Server" : "ownCloud-palvelin"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/fi_FI.json b/apps/federation/l10n/fi_FI.json
deleted file mode 100644
index 8060a437617..00000000000
--- a/apps/federation/l10n/fi_FI.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "translations": {
- "Server added to the list of trusted ownClouds" : "Palvelin lisätty luotettujen ownCloudien luetteloon",
- "Server is already in the list of trusted servers." : "Palvelin on jo luotettujen palvelimien luettelossa.",
- "No ownCloud server found" : "ownCloud-palvelinta ei löydy",
- "Could not add server" : "Palvelimen lisääminen ei onnistunut",
- "Federation" : "Federaatio",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloudin federaatio mahdollistaa yhdistämisen muihin luotettuihin ownCloudeihin käyttäjähakemistojen vaihtamiseksi. Tätä käytetään muun muassa ulkoisten käyttäjien automaattiseen täydentämiseen federoidussa jakamisessa.",
- "Add server automatically once a federated share was created successfully" : "Lisää palvelin automaattisesti, kun federoitu jako on luotu onnistuneesti",
- "Trusted ownCloud Servers" : "Luotetut ownCloud-palvelimet",
- "+ Add ownCloud server" : "+ Lisää ownCloud-palvelin",
- "ownCloud Server" : "ownCloud-palvelin"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/federation/l10n/fr.js b/apps/federation/l10n/fr.js
index c1533771f18..004a634bea8 100644
--- a/apps/federation/l10n/fr.js
+++ b/apps/federation/l10n/fr.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Serveur ajouté à la liste des ownClouds de confiance",
+ "Added to the list of trusted servers" : "Ajouté à la liste des serveurs de confiance",
+ "No server found with ID: %s" : "Aucun serveur trouvé avec l'identifiant %s",
+ "Could not remove server" : "Impossible de supprimer le serveur",
"Server is already in the list of trusted servers." : "Le serveur est déjà dans la liste des serveurs de confiance.",
- "No ownCloud server found" : "Aucun serveur ownCloud trouvé",
- "Could not add server" : "Impossible d'ajouter le serveur",
+ "No server to federate with found" : "Aucun serveur avec lequel fédérer n’a été trouvé",
+ "Could not add server" : "Impossible d’ajouter le serveur",
+ "Trusted servers" : "Serveurs de confiance",
"Federation" : "Fédération",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La Fédération ownCloud permet la connexion à d'autres instances ownCloud de confiance pour partager les annuaires d'utilisateurs. Cela peut par exemple être utilisé pour compléter automatiquement les noms des utilisateurs externes lors d'un partage vers une autre instance.",
- "Add server automatically once a federated share was created successfully" : "Ajouter un serveur automatiquement une fois que le partage a été créer avec succès .",
- "Trusted ownCloud Servers" : "Serveur ownCloud de confiance ",
- "+ Add ownCloud server" : "Ajouter un serveur Owncloud",
- "ownCloud Server" : "Serveur OwnCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes. Par exemple, ce sera utilisé pour auto-compléter les comptes externes lors du partage fédéré.",
+ "External documentation for Federated Cloud Sharing" : "Documentation externe sur le partage de Cloud Fédéré",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes. Par exemple, ce sera utilisé pour auto-compléter les comptes externes lors du partage fédéré. Il n'est pas nécessaire d'ajouter un serveur comme serveur de confiance afin de créer un partage fédéré.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Chaque serveur doit valider l'autre. Ce processus peut prendre plusieurs cycles de tâches planifiées.",
+ "+ Add trusted server" : "+ Ajouter un serveur de confiance",
+ "Trusted server" : "Serveur de confiance",
+ "Add" : "Ajouter"
},
-"nplurals=2; plural=(n > 1);");
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/fr.json b/apps/federation/l10n/fr.json
index 8863bc73810..05a3828887f 100644
--- a/apps/federation/l10n/fr.json
+++ b/apps/federation/l10n/fr.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Serveur ajouté à la liste des ownClouds de confiance",
+ "Added to the list of trusted servers" : "Ajouté à la liste des serveurs de confiance",
+ "No server found with ID: %s" : "Aucun serveur trouvé avec l'identifiant %s",
+ "Could not remove server" : "Impossible de supprimer le serveur",
"Server is already in the list of trusted servers." : "Le serveur est déjà dans la liste des serveurs de confiance.",
- "No ownCloud server found" : "Aucun serveur ownCloud trouvé",
- "Could not add server" : "Impossible d'ajouter le serveur",
+ "No server to federate with found" : "Aucun serveur avec lequel fédérer n’a été trouvé",
+ "Could not add server" : "Impossible d’ajouter le serveur",
+ "Trusted servers" : "Serveurs de confiance",
"Federation" : "Fédération",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La Fédération ownCloud permet la connexion à d'autres instances ownCloud de confiance pour partager les annuaires d'utilisateurs. Cela peut par exemple être utilisé pour compléter automatiquement les noms des utilisateurs externes lors d'un partage vers une autre instance.",
- "Add server automatically once a federated share was created successfully" : "Ajouter un serveur automatiquement une fois que le partage a été créer avec succès .",
- "Trusted ownCloud Servers" : "Serveur ownCloud de confiance ",
- "+ Add ownCloud server" : "Ajouter un serveur Owncloud",
- "ownCloud Server" : "Serveur OwnCloud"
-},"pluralForm" :"nplurals=2; plural=(n > 1);"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes. Par exemple, ce sera utilisé pour auto-compléter les comptes externes lors du partage fédéré.",
+ "External documentation for Federated Cloud Sharing" : "Documentation externe sur le partage de Cloud Fédéré",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Une fédération vous permet de vous connecter avec d'autres serveurs de confiance pour échanger la liste des comptes. Par exemple, ce sera utilisé pour auto-compléter les comptes externes lors du partage fédéré. Il n'est pas nécessaire d'ajouter un serveur comme serveur de confiance afin de créer un partage fédéré.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Chaque serveur doit valider l'autre. Ce processus peut prendre plusieurs cycles de tâches planifiées.",
+ "+ Add trusted server" : "+ Ajouter un serveur de confiance",
+ "Trusted server" : "Serveur de confiance",
+ "Add" : "Ajouter"
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/ga.js b/apps/federation/l10n/ga.js
new file mode 100644
index 00000000000..46b73669caa
--- /dev/null
+++ b/apps/federation/l10n/ga.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Curtha leis an liosta freastalaithe iontaofa",
+ "No server found with ID: %s" : "Níor aimsíodh aon fhreastalaí a bhfuil ID air: %s",
+ "Could not remove server" : "Níorbh fhéidir an freastalaí a bhaint",
+ "Server is already in the list of trusted servers." : "Tá an freastalaí ar liosta na bhfreastalaithe iontaofa cheana féin.",
+ "No server to federate with found" : "Níor aimsíodh aon fhreastalaí le cónascadh leis",
+ "Could not add server" : "Níorbh fhéidir an freastalaí a chur leis",
+ "Trusted servers" : "Freastalaithe iontaofa",
+ "Federation" : "Cónaidhm",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú. Mar shampla, úsáidfear é seo chun cuntais sheachtracha a uathchríochnú le haghaidh comhroinnte cónasctha.",
+ "External documentation for Federated Cloud Sharing" : "Doiciméadú seachtrach maidir le Comhroinnt Néalríomhaireachta",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú. Mar shampla, úsáidfear é seo chun cuntais sheachtracha a uathchríochnú le haghaidh comhroinnte cónasctha. Ní gá freastalaí a chur leis mar fhreastalaí iontaofa chun sciar cónasctha a chruthú.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Ní mór do gach freastalaí an ceann eile a bhailíochtú. D'fhéadfadh go mbeadh cúpla timthriall cron ag teastáil don phróiseas seo.",
+ "+ Add trusted server" : "+ Cuir freastalaí iontaofa leis",
+ "Trusted server" : "Freastalaí iontaofa",
+ "Add" : "Cuir"
+},
+"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);");
diff --git a/apps/federation/l10n/ga.json b/apps/federation/l10n/ga.json
new file mode 100644
index 00000000000..c706d6a54fd
--- /dev/null
+++ b/apps/federation/l10n/ga.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Curtha leis an liosta freastalaithe iontaofa",
+ "No server found with ID: %s" : "Níor aimsíodh aon fhreastalaí a bhfuil ID air: %s",
+ "Could not remove server" : "Níorbh fhéidir an freastalaí a bhaint",
+ "Server is already in the list of trusted servers." : "Tá an freastalaí ar liosta na bhfreastalaithe iontaofa cheana féin.",
+ "No server to federate with found" : "Níor aimsíodh aon fhreastalaí le cónascadh leis",
+ "Could not add server" : "Níorbh fhéidir an freastalaí a chur leis",
+ "Trusted servers" : "Freastalaithe iontaofa",
+ "Federation" : "Cónaidhm",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú. Mar shampla, úsáidfear é seo chun cuntais sheachtracha a uathchríochnú le haghaidh comhroinnte cónasctha.",
+ "External documentation for Federated Cloud Sharing" : "Doiciméadú seachtrach maidir le Comhroinnt Néalríomhaireachta",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Ceadaíonn Cónaidhm duit nascadh le freastalaithe iontaofa eile chun an t-eolaire cuntais a mhalartú. Mar shampla, úsáidfear é seo chun cuntais sheachtracha a uathchríochnú le haghaidh comhroinnte cónasctha. Ní gá freastalaí a chur leis mar fhreastalaí iontaofa chun sciar cónasctha a chruthú.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Ní mór do gach freastalaí an ceann eile a bhailíochtú. D'fhéadfadh go mbeadh cúpla timthriall cron ag teastáil don phróiseas seo.",
+ "+ Add trusted server" : "+ Cuir freastalaí iontaofa leis",
+ "Trusted server" : "Freastalaí iontaofa",
+ "Add" : "Cuir"
+},"pluralForm" :"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/gl.js b/apps/federation/l10n/gl.js
new file mode 100644
index 00000000000..39cbf379c8d
--- /dev/null
+++ b/apps/federation/l10n/gl.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Engadido á lista de servidores de confianza",
+ "No server found with ID: %s" : "Non se atopou ningún servidor co ID: %s",
+ "Could not remove server" : "Non foi posíbel retirar o servidor",
+ "Server is already in the list of trusted servers." : "O servidor xa está na lista de servidores de confianza.",
+ "No server to federate with found" : "Non se atopou ningún servidor co que federarse",
+ "Could not add server" : "Non foi posíbel engadir o servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta. Por exemplo, isto empregarase para autocompletar con contas externas ao compartir en federación.",
+ "External documentation for Federated Cloud Sharing" : "Documentación externa para «Nube compartida federada»",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta. Por exemplo, isto empregarase para autocompletar con contas externas ao compartir en federación. Non é necesario engadir un servidor como servidor de confianza para poder crear unha compartición federada.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor debe validar ao outro. Este proceso pode requirir algúns ciclos de «cron».",
+ "+ Add trusted server" : "+ Engadir servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Engadir"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/gl.json b/apps/federation/l10n/gl.json
new file mode 100644
index 00000000000..f987bc282af
--- /dev/null
+++ b/apps/federation/l10n/gl.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Engadido á lista de servidores de confianza",
+ "No server found with ID: %s" : "Non se atopou ningún servidor co ID: %s",
+ "Could not remove server" : "Non foi posíbel retirar o servidor",
+ "Server is already in the list of trusted servers." : "O servidor xa está na lista de servidores de confianza.",
+ "No server to federate with found" : "Non se atopou ningún servidor co que federarse",
+ "Could not add server" : "Non foi posíbel engadir o servidor",
+ "Trusted servers" : "Servidores de confianza",
+ "Federation" : "Federación",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta. Por exemplo, isto empregarase para autocompletar con contas externas ao compartir en federación.",
+ "External documentation for Federated Cloud Sharing" : "Documentación externa para «Nube compartida federada»",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A federación permítelle conectarse con outros servidores de confianza para intercambiar o directorio da conta. Por exemplo, isto empregarase para autocompletar con contas externas ao compartir en federación. Non é necesario engadir un servidor como servidor de confianza para poder crear unha compartición federada.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor debe validar ao outro. Este proceso pode requirir algúns ciclos de «cron».",
+ "+ Add trusted server" : "+ Engadir servidor de confianza",
+ "Trusted server" : "Servidor de confianza",
+ "Add" : "Engadir"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/he.js b/apps/federation/l10n/he.js
index 55facae61a6..24284abb963 100644
--- a/apps/federation/l10n/he.js
+++ b/apps/federation/l10n/he.js
@@ -1,15 +1,14 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "השרת נוסף לרשימת ה- ownCloud המהימנים",
+ "Added to the list of trusted servers" : "נוסף לרשימת השרתים המהימנים",
"Server is already in the list of trusted servers." : "השרת כבר נמצא ברשימת השרתים המהימנים.",
- "No ownCloud server found" : "לא אותר שרת ownCloud",
+ "No server to federate with found" : "לא נמצאו שרתים להתאגד מולם",
"Could not add server" : "לא ניתן היה להוסיף שרת",
+ "Trusted servers" : "שרתים מהימנים",
"Federation" : "איגוד",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "איגוד ownCloud מאפשר לך להתחבר לשרתי ownCloud מהימנים אחרים למטרת החלפת תיקיות משתמש. לדוגמא ניתן יהיה להשתמש בזה כדי להשלים באופן אוטומטי משתמשים חיצוניים לשיתוף מאוגד.",
- "Add server automatically once a federated share was created successfully" : "הוספת שרת באופן אוטומטי לאחר יצירת שרת מאוגד",
- "Trusted ownCloud Servers" : "שרתי ownCloud אמינים",
- "+ Add ownCloud server" : "+ הוספת שרת ownCloud",
- "ownCloud Server" : "שרת ownCloud"
+ "+ Add trusted server" : "+ הוספת שרת מהימן",
+ "Trusted server" : "שרת מהימן",
+ "Add" : "הוספה"
},
-"nplurals=2; plural=(n != 1);");
+"nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;");
diff --git a/apps/federation/l10n/he.json b/apps/federation/l10n/he.json
index 3ed837ffedc..23f108dbad3 100644
--- a/apps/federation/l10n/he.json
+++ b/apps/federation/l10n/he.json
@@ -1,13 +1,12 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "השרת נוסף לרשימת ה- ownCloud המהימנים",
+ "Added to the list of trusted servers" : "נוסף לרשימת השרתים המהימנים",
"Server is already in the list of trusted servers." : "השרת כבר נמצא ברשימת השרתים המהימנים.",
- "No ownCloud server found" : "לא אותר שרת ownCloud",
+ "No server to federate with found" : "לא נמצאו שרתים להתאגד מולם",
"Could not add server" : "לא ניתן היה להוסיף שרת",
+ "Trusted servers" : "שרתים מהימנים",
"Federation" : "איגוד",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "איגוד ownCloud מאפשר לך להתחבר לשרתי ownCloud מהימנים אחרים למטרת החלפת תיקיות משתמש. לדוגמא ניתן יהיה להשתמש בזה כדי להשלים באופן אוטומטי משתמשים חיצוניים לשיתוף מאוגד.",
- "Add server automatically once a federated share was created successfully" : "הוספת שרת באופן אוטומטי לאחר יצירת שרת מאוגד",
- "Trusted ownCloud Servers" : "שרתי ownCloud אמינים",
- "+ Add ownCloud server" : "+ הוספת שרת ownCloud",
- "ownCloud Server" : "שרת ownCloud"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
+ "+ Add trusted server" : "+ הוספת שרת מהימן",
+ "Trusted server" : "שרת מהימן",
+ "Add" : "הוספה"
+},"pluralForm" :"nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/hr.js b/apps/federation/l10n/hr.js
new file mode 100644
index 00000000000..37224c9e6d8
--- /dev/null
+++ b/apps/federation/l10n/hr.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Dodano na popis pouzdanih poslužitelja",
+ "Server is already in the list of trusted servers." : "Poslužitelj se već nalazi na popisu pouzdanih poslužitelja.",
+ "No server to federate with found" : "Nije pronađen nijedan poslužitelj za udruživanje",
+ "Could not add server" : "Poslužitelj nije dodan",
+ "Trusted servers" : "Pouzdani poslužitelji",
+ "Federation" : "Udruženje",
+ "+ Add trusted server" : "+ Dodaj pouzdani poslužitelj",
+ "Trusted server" : "Pouzdan poslužitelj",
+ "Add" : "Dodaj"
+},
+"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;");
diff --git a/apps/federation/l10n/hr.json b/apps/federation/l10n/hr.json
new file mode 100644
index 00000000000..dd413c764b8
--- /dev/null
+++ b/apps/federation/l10n/hr.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Dodano na popis pouzdanih poslužitelja",
+ "Server is already in the list of trusted servers." : "Poslužitelj se već nalazi na popisu pouzdanih poslužitelja.",
+ "No server to federate with found" : "Nije pronađen nijedan poslužitelj za udruživanje",
+ "Could not add server" : "Poslužitelj nije dodan",
+ "Trusted servers" : "Pouzdani poslužitelji",
+ "Federation" : "Udruženje",
+ "+ Add trusted server" : "+ Dodaj pouzdani poslužitelj",
+ "Trusted server" : "Pouzdan poslužitelj",
+ "Add" : "Dodaj"
+},"pluralForm" :"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/hu.js b/apps/federation/l10n/hu.js
new file mode 100644
index 00000000000..953cd963196
--- /dev/null
+++ b/apps/federation/l10n/hu.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Hozzáadva a megbízható kiszolgálók listájához",
+ "No server found with ID: %s" : "Nem található kiszolgáló az azonosítóval: %s",
+ "Could not remove server" : "Nem sikerült a kiszolgáló eltávolítása",
+ "Server is already in the list of trusted servers." : "A kiszolgáló már szerepel a megbízható kiszolgálók között.",
+ "No server to federate with found" : "Nem található olyan kiszolgáló, amellyel föderálni lehetne",
+ "Could not add server" : "A kiszolgáló nem adható hozzá",
+ "Trusted servers" : "Megbízható kiszolgálók",
+ "Federation" : "Föderáció",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cserélhessenek.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cseréljenek. Például ennek segítségével lesznek automatikusan kiegészítve a külső fiókok a föderált megosztásnál.",
+ "External documentation for Federated Cloud Sharing" : "Külső dokumentáció a föderált felhőmegosztáshoz",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cseréljenek. Például ennek segítségével lesznek automatikusan kiegészítve a külső fiókok a föderált megosztásnál. Nem szükséges egy kiszolgálót megbízhatóként hozzáadni ahhoz, hogy föderált megosztást hozzon létre.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Minden kiszolgálónak ellenőriznie kell a másikat. Ez a folyat néhány cron ciklust vehet igénybe.",
+ "+ Add trusted server" : "+ Megbízható kiszolgáló hozzáadása",
+ "Trusted server" : "Megbízható kiszolgáló",
+ "Add" : "Hozzáadás"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/hu.json b/apps/federation/l10n/hu.json
new file mode 100644
index 00000000000..d10201e424c
--- /dev/null
+++ b/apps/federation/l10n/hu.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Hozzáadva a megbízható kiszolgálók listájához",
+ "No server found with ID: %s" : "Nem található kiszolgáló az azonosítóval: %s",
+ "Could not remove server" : "Nem sikerült a kiszolgáló eltávolítása",
+ "Server is already in the list of trusted servers." : "A kiszolgáló már szerepel a megbízható kiszolgálók között.",
+ "No server to federate with found" : "Nem található olyan kiszolgáló, amellyel föderálni lehetne",
+ "Could not add server" : "A kiszolgáló nem adható hozzá",
+ "Trusted servers" : "Megbízható kiszolgálók",
+ "Federation" : "Föderáció",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cserélhessenek.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cseréljenek. Például ennek segítségével lesznek automatikusan kiegészítve a külső fiókok a föderált megosztásnál.",
+ "External documentation for Federated Cloud Sharing" : "Külső dokumentáció a föderált felhőmegosztáshoz",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A föderáció lehetővé teszi a más megbízható kiszolgálókhoz kapcsolódást, hogy a kiszolgálók fiókjegyzéket cseréljenek. Például ennek segítségével lesznek automatikusan kiegészítve a külső fiókok a föderált megosztásnál. Nem szükséges egy kiszolgálót megbízhatóként hozzáadni ahhoz, hogy föderált megosztást hozzon létre.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Minden kiszolgálónak ellenőriznie kell a másikat. Ez a folyat néhány cron ciklust vehet igénybe.",
+ "+ Add trusted server" : "+ Megbízható kiszolgáló hozzáadása",
+ "Trusted server" : "Megbízható kiszolgáló",
+ "Add" : "Hozzáadás"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/hu_HU.js b/apps/federation/l10n/hu_HU.js
deleted file mode 100644
index c210bd910d2..00000000000
--- a/apps/federation/l10n/hu_HU.js
+++ /dev/null
@@ -1,15 +0,0 @@
-OC.L10N.register(
- "federation",
- {
- "Server added to the list of trusted ownClouds" : "Szerver hozzáadva a megbízható ownCloud szerverekhez",
- "Server is already in the list of trusted servers." : "A szerver már a megbízható szerverek közt van.",
- "No ownCloud server found" : "Nem található ownCloud szerver",
- "Could not add server" : "Nem lehet hozzáadni a szervert",
- "Federation" : "Egyesítés",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Az ownCloud Egyesítés lehetővé teszi más megbízható ownCloud szerverekkel a felhasználói könyvtár csereforgalmát. Például ezt használjuk a külső felhasználók automata kiegészítéséhez az egyesített megosztásban.",
- "Add server automatically once a federated share was created successfully" : "Szerver automatikus hozzáadása, ha az egyesített megosztás létrehozása sikeres",
- "Trusted ownCloud Servers" : "Megbízható ownCloud szerverek",
- "+ Add ownCloud server" : "+ ownCloud szerver hozzáadása",
- "ownCloud Server" : "ownCloud szerver"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/hu_HU.json b/apps/federation/l10n/hu_HU.json
deleted file mode 100644
index 6f5eddb5d76..00000000000
--- a/apps/federation/l10n/hu_HU.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "translations": {
- "Server added to the list of trusted ownClouds" : "Szerver hozzáadva a megbízható ownCloud szerverekhez",
- "Server is already in the list of trusted servers." : "A szerver már a megbízható szerverek közt van.",
- "No ownCloud server found" : "Nem található ownCloud szerver",
- "Could not add server" : "Nem lehet hozzáadni a szervert",
- "Federation" : "Egyesítés",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Az ownCloud Egyesítés lehetővé teszi más megbízható ownCloud szerverekkel a felhasználói könyvtár csereforgalmát. Például ezt használjuk a külső felhasználók automata kiegészítéséhez az egyesített megosztásban.",
- "Add server automatically once a federated share was created successfully" : "Szerver automatikus hozzáadása, ha az egyesített megosztás létrehozása sikeres",
- "Trusted ownCloud Servers" : "Megbízható ownCloud szerverek",
- "+ Add ownCloud server" : "+ ownCloud szerver hozzáadása",
- "ownCloud Server" : "ownCloud szerver"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/federation/l10n/ia.js b/apps/federation/l10n/ia.js
new file mode 100644
index 00000000000..3ce43455dc5
--- /dev/null
+++ b/apps/federation/l10n/ia.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Addite al lista de servitores fiduciari.",
+ "Server is already in the list of trusted servers." : "Servitor ja es in le lista de servitores fiduciari.",
+ "No server to federate with found" : "Nulle servitor pro associar se per federation esseva trovate",
+ "Could not add server" : "Impossibile adder le servitor",
+ "Trusted servers" : "Servitores fiduciari",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ Adder servitor fiduciari",
+ "Trusted server" : "Servitor fiduciari",
+ "Add" : "Adder"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/ia.json b/apps/federation/l10n/ia.json
new file mode 100644
index 00000000000..19f8dc1732b
--- /dev/null
+++ b/apps/federation/l10n/ia.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Addite al lista de servitores fiduciari.",
+ "Server is already in the list of trusted servers." : "Servitor ja es in le lista de servitores fiduciari.",
+ "No server to federate with found" : "Nulle servitor pro associar se per federation esseva trovate",
+ "Could not add server" : "Impossibile adder le servitor",
+ "Trusted servers" : "Servitores fiduciari",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ Adder servitor fiduciari",
+ "Trusted server" : "Servitor fiduciari",
+ "Add" : "Adder"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/id.js b/apps/federation/l10n/id.js
new file mode 100644
index 00000000000..1b9c6a1071e
--- /dev/null
+++ b/apps/federation/l10n/id.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Server telah ditambahkan pada daftar server terpercaya",
+ "Server is already in the list of trusted servers." : "Server sudah ada pada daftar server terpercaya",
+ "No server to federate with found" : "Tidak ada server yang bisa difederasikan",
+ "Could not add server" : "Tidak dapat menambahkan server",
+ "Trusted servers" : "Server terpercaya",
+ "Federation" : "Federasi",
+ "+ Add trusted server" : "+ Tambah server terpercaya",
+ "Trusted server" : "Server terpercaya",
+ "Add" : "Tambah"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/id.json b/apps/federation/l10n/id.json
new file mode 100644
index 00000000000..49154b367e1
--- /dev/null
+++ b/apps/federation/l10n/id.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Server telah ditambahkan pada daftar server terpercaya",
+ "Server is already in the list of trusted servers." : "Server sudah ada pada daftar server terpercaya",
+ "No server to federate with found" : "Tidak ada server yang bisa difederasikan",
+ "Could not add server" : "Tidak dapat menambahkan server",
+ "Trusted servers" : "Server terpercaya",
+ "Federation" : "Federasi",
+ "+ Add trusted server" : "+ Tambah server terpercaya",
+ "Trusted server" : "Server terpercaya",
+ "Add" : "Tambah"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/is.js b/apps/federation/l10n/is.js
index 970656835fd..9e8cedcf9cc 100644
--- a/apps/federation/l10n/is.js
+++ b/apps/federation/l10n/is.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Þjóninum bætt við listann yfir treyst ownCloud-ský",
+ "Added to the list of trusted servers" : "Bætt á lista yfir treysta þjóna",
+ "No server found with ID: %s" : "Enginn þjónn fannst með auðkennið: %s",
+ "Could not remove server" : "Gat ekki fjarlægt netþjón",
"Server is already in the list of trusted servers." : "Þjónninn er nú þegar á listanum yfir treysta þjóna.",
- "No ownCloud server found" : "Enginn ownCloud-þjónn fannst",
+ "No server to federate with found" : "Enginn þjónn sem hæfur er til skýjasambands fannst",
"Could not add server" : "Gat ekki bætt við þjóni",
- "Federation" : "Samband",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud-samband (federation) gerir þér kleift að tengjast öðrumtreystum ownCloud-skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.",
- "Add server automatically once a federated share was created successfully" : "Bæta þjóni við sjálfkrafa, hafi tekist að búa til sambandssameign",
- "Trusted ownCloud Servers" : "Treystir ownCloud-þjónar",
- "+ Add ownCloud server" : "+ Bæta við ownCloud-þjóni",
- "ownCloud Server" : "ownCloud-þjónn"
+ "Trusted servers" : "Treystir þjónar",
+ "Federation" : "Deilt milli þjóna",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notendaaðganga við deilingu sambandssameigna.",
+ "External documentation for Federated Cloud Sharing" : "Utanaðkomandi leiðbeiningar fyrir skýjasambandsdeilingu (Federated Cloud Sharing)",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notendaaðganga við deilingu sambandssameigna. Ekki er nauðsynlegt að bæta netþjóni við sem treystum netþjóni til að útbúa sambandssameign (federated share).",
+ "Each server must validate the other. This process may require a few cron cycles." : "Hver þjónn þarf að sanngilda hina. Þetta gæti krafist nokkurra umferða cron-verka.",
+ "+ Add trusted server" : "+ Bæta við treystum þjóni",
+ "Trusted server" : "Treystur þjónn",
+ "Add" : "Bæta við"
},
"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);");
diff --git a/apps/federation/l10n/is.json b/apps/federation/l10n/is.json
index 3754dc12ed7..185d287f410 100644
--- a/apps/federation/l10n/is.json
+++ b/apps/federation/l10n/is.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Þjóninum bætt við listann yfir treyst ownCloud-ský",
+ "Added to the list of trusted servers" : "Bætt á lista yfir treysta þjóna",
+ "No server found with ID: %s" : "Enginn þjónn fannst með auðkennið: %s",
+ "Could not remove server" : "Gat ekki fjarlægt netþjón",
"Server is already in the list of trusted servers." : "Þjónninn er nú þegar á listanum yfir treysta þjóna.",
- "No ownCloud server found" : "Enginn ownCloud-þjónn fannst",
+ "No server to federate with found" : "Enginn þjónn sem hæfur er til skýjasambands fannst",
"Could not add server" : "Gat ekki bætt við þjóni",
- "Federation" : "Samband",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud-samband (federation) gerir þér kleift að tengjast öðrumtreystum ownCloud-skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.",
- "Add server automatically once a federated share was created successfully" : "Bæta þjóni við sjálfkrafa, hafi tekist að búa til sambandssameign",
- "Trusted ownCloud Servers" : "Treystir ownCloud-þjónar",
- "+ Add ownCloud server" : "+ Bæta við ownCloud-þjóni",
- "ownCloud Server" : "ownCloud-þjónn"
+ "Trusted servers" : "Treystir þjónar",
+ "Federation" : "Deilt milli þjóna",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notendaaðganga við deilingu sambandssameigna.",
+ "External documentation for Federated Cloud Sharing" : "Utanaðkomandi leiðbeiningar fyrir skýjasambandsdeilingu (Federated Cloud Sharing)",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á aðgangaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notendaaðganga við deilingu sambandssameigna. Ekki er nauðsynlegt að bæta netþjóni við sem treystum netþjóni til að útbúa sambandssameign (federated share).",
+ "Each server must validate the other. This process may require a few cron cycles." : "Hver þjónn þarf að sanngilda hina. Þetta gæti krafist nokkurra umferða cron-verka.",
+ "+ Add trusted server" : "+ Bæta við treystum þjóni",
+ "Trusted server" : "Treystur þjónn",
+ "Add" : "Bæta við"
},"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/it.js b/apps/federation/l10n/it.js
index c9a0de56f03..496caa51883 100644
--- a/apps/federation/l10n/it.js
+++ b/apps/federation/l10n/it.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Server aggiunto all'elenco di ownCloud affidabili",
+ "Added to the list of trusted servers" : "Aggiunto all'elenco dei server affidabili",
+ "No server found with ID: %s" : "Nessun server trovato con il seguete ID: %s",
+ "Could not remove server" : "Impossibile rimuovere il server",
"Server is already in the list of trusted servers." : "Il server è già nell'elenco dei server affidabili.",
- "No ownCloud server found" : "Nessun server ownCloud trovato",
+ "No server to federate with found" : "Non ho trovato alcun server per la federazione",
"Could not add server" : "Impossibile aggiungere il server",
+ "Trusted servers" : "Server affidabili",
"Federation" : "Federazione",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La federazione di ownCloud ti consente di collegarti con altri ownCloud di fiducia per scambiare la cartella degli utenti. Ad esempio, sarà utilizzata per il completamento automatico degli utenti esterni per la condivisione federata.",
- "Add server automatically once a federated share was created successfully" : "Aggiungi automaticamente il server dopo che una condivisione federata è stata creata con successo",
- "Trusted ownCloud Servers" : "Server ownCloud di fiducia",
- "+ Add ownCloud server" : "+ Aggiungi server ownCloud",
- "ownCloud Server" : "Server ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account. Ad esempio, questo verrà utilizzato per completare automaticamente gli account esterni per la condivisione federata.",
+ "External documentation for Federated Cloud Sharing" : "Documentazione esterna per la Condivisione Federata",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account. Ad esempio, questo verrà utilizzato per completare automaticamente gli account esterni per la condivisione federata. Non è necessario aggiungere un server come server attendibile per creare una condivisione federata.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Ogni server deve validare gli altri. Questa operazione può richiedere qualche ciclo cron.",
+ "+ Add trusted server" : "+ Aggiungi server affidabile",
+ "Trusted server" : "Server affidabile",
+ "Add" : "Aggiungi"
},
-"nplurals=2; plural=(n != 1);");
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/it.json b/apps/federation/l10n/it.json
index 9c22c4bb29c..be2f780b633 100644
--- a/apps/federation/l10n/it.json
+++ b/apps/federation/l10n/it.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server aggiunto all'elenco di ownCloud affidabili",
+ "Added to the list of trusted servers" : "Aggiunto all'elenco dei server affidabili",
+ "No server found with ID: %s" : "Nessun server trovato con il seguete ID: %s",
+ "Could not remove server" : "Impossibile rimuovere il server",
"Server is already in the list of trusted servers." : "Il server è già nell'elenco dei server affidabili.",
- "No ownCloud server found" : "Nessun server ownCloud trovato",
+ "No server to federate with found" : "Non ho trovato alcun server per la federazione",
"Could not add server" : "Impossibile aggiungere il server",
+ "Trusted servers" : "Server affidabili",
"Federation" : "Federazione",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "La federazione di ownCloud ti consente di collegarti con altri ownCloud di fiducia per scambiare la cartella degli utenti. Ad esempio, sarà utilizzata per il completamento automatico degli utenti esterni per la condivisione federata.",
- "Add server automatically once a federated share was created successfully" : "Aggiungi automaticamente il server dopo che una condivisione federata è stata creata con successo",
- "Trusted ownCloud Servers" : "Server ownCloud di fiducia",
- "+ Add ownCloud server" : "+ Aggiungi server ownCloud",
- "ownCloud Server" : "Server ownCloud"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account. Ad esempio, questo verrà utilizzato per completare automaticamente gli account esterni per la condivisione federata.",
+ "External documentation for Federated Cloud Sharing" : "Documentazione esterna per la Condivisione Federata",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "La federazione consente di connettersi ad altri server attendibili per scambiare la directory degli account. Ad esempio, questo verrà utilizzato per completare automaticamente gli account esterni per la condivisione federata. Non è necessario aggiungere un server come server attendibile per creare una condivisione federata.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Ogni server deve validare gli altri. Questa operazione può richiedere qualche ciclo cron.",
+ "+ Add trusted server" : "+ Aggiungi server affidabile",
+ "Trusted server" : "Server affidabile",
+ "Add" : "Aggiungi"
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/ja.js b/apps/federation/l10n/ja.js
index 3ea46d85b75..c292c8ce531 100644
--- a/apps/federation/l10n/ja.js
+++ b/apps/federation/l10n/ja.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "ownCloud の信頼済サイト に追加されているサーバー",
- "Server is already in the list of trusted servers." : "信頼済サイトとして既に登録されています。",
- "No ownCloud server found" : "ownCloudサーバーが見つかりません",
+ "Added to the list of trusted servers" : "信頼済サーバーとしてリストに登録済",
+ "No server found with ID: %s" : "IDを持つサーバーが見つかりません: %s",
+ "Could not remove server" : "サーバーを削除できませんでした",
+ "Server is already in the list of trusted servers." : "信頼済サーバーとしてすでに登録されています。",
+ "No server to federate with found" : "Nextcloud連携サーバーはありません。",
"Could not add server" : "サーバーを追加できませんでした",
+ "Trusted servers" : "信頼済サーバー",
"Federation" : "連携",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud 連携機能では信頼済のownCloudのユーザーディレクトリを相互に接続することができます。例えば、連携で共有したときには、連携先の外部ユーザー名の自動補完を使えるようになります。",
- "Add server automatically once a federated share was created successfully" : "追加するサーバは自動的に統合され、共有が追加されました",
- "Trusted ownCloud Servers" : "ownCloudサーバを信頼する",
- "+ Add ownCloud server" : "ownCloudサーバを追加",
- "ownCloud Server" : "ownCloudサーバ"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "フェデレーションは、信頼できる他のサーバーと接続し、アカウントリストを交換することを可能にします。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "フェデレーションでは他の信頼済サーバーとアカウントリストをやり取りすること許可します。例えば、フェデレーション共有時に他のサーバーのアカウントIDを自動補完します。",
+ "External documentation for Federated Cloud Sharing" : "Federated Cloud Sharingの外部ドキュメント",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Nextcloud連携では、他の信頼できるサーバーと接続して、アカウントリストをやりとりすることができます。例えば、これにより他のサーバーのアカウントがフェデレーション共有の時に自動的に補完されます。フェデレーション共有を行うときには、信頼できるサーバーとして追加する必要はありません。",
+ "Each server must validate the other. This process may require a few cron cycles." : "各サーバーは他のサーバーを検証しなければならない。このプロセスには数サイクルのcronが必要です。",
+ "+ Add trusted server" : "+ 信頼済サーバーに追加",
+ "Trusted server" : "信頼済サーバー",
+ "Add" : "追加"
},
"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/ja.json b/apps/federation/l10n/ja.json
index 48c53f63137..e890f99daa8 100644
--- a/apps/federation/l10n/ja.json
+++ b/apps/federation/l10n/ja.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "ownCloud の信頼済サイト に追加されているサーバー",
- "Server is already in the list of trusted servers." : "信頼済サイトとして既に登録されています。",
- "No ownCloud server found" : "ownCloudサーバーが見つかりません",
+ "Added to the list of trusted servers" : "信頼済サーバーとしてリストに登録済",
+ "No server found with ID: %s" : "IDを持つサーバーが見つかりません: %s",
+ "Could not remove server" : "サーバーを削除できませんでした",
+ "Server is already in the list of trusted servers." : "信頼済サーバーとしてすでに登録されています。",
+ "No server to federate with found" : "Nextcloud連携サーバーはありません。",
"Could not add server" : "サーバーを追加できませんでした",
+ "Trusted servers" : "信頼済サーバー",
"Federation" : "連携",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud 連携機能では信頼済のownCloudのユーザーディレクトリを相互に接続することができます。例えば、連携で共有したときには、連携先の外部ユーザー名の自動補完を使えるようになります。",
- "Add server automatically once a federated share was created successfully" : "追加するサーバは自動的に統合され、共有が追加されました",
- "Trusted ownCloud Servers" : "ownCloudサーバを信頼する",
- "+ Add ownCloud server" : "ownCloudサーバを追加",
- "ownCloud Server" : "ownCloudサーバ"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "フェデレーションは、信頼できる他のサーバーと接続し、アカウントリストを交換することを可能にします。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "フェデレーションでは他の信頼済サーバーとアカウントリストをやり取りすること許可します。例えば、フェデレーション共有時に他のサーバーのアカウントIDを自動補完します。",
+ "External documentation for Federated Cloud Sharing" : "Federated Cloud Sharingの外部ドキュメント",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Nextcloud連携では、他の信頼できるサーバーと接続して、アカウントリストをやりとりすることができます。例えば、これにより他のサーバーのアカウントがフェデレーション共有の時に自動的に補完されます。フェデレーション共有を行うときには、信頼できるサーバーとして追加する必要はありません。",
+ "Each server must validate the other. This process may require a few cron cycles." : "各サーバーは他のサーバーを検証しなければならない。このプロセスには数サイクルのcronが必要です。",
+ "+ Add trusted server" : "+ 信頼済サーバーに追加",
+ "Trusted server" : "信頼済サーバー",
+ "Add" : "追加"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/ka.js b/apps/federation/l10n/ka.js
new file mode 100644
index 00000000000..23f2d17e924
--- /dev/null
+++ b/apps/federation/l10n/ka.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Added to the list of trusted servers",
+ "Server is already in the list of trusted servers." : "Server is already in the list of trusted servers.",
+ "No server to federate with found" : "No server to federate with found",
+ "Could not add server" : "Could not add server",
+ "Trusted servers" : "Trusted servers",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ Add trusted server",
+ "Trusted server" : "Trusted server",
+ "Add" : "Add"
+},
+"nplurals=2; plural=(n!=1);");
diff --git a/apps/federation/l10n/ka.json b/apps/federation/l10n/ka.json
new file mode 100644
index 00000000000..44363176fef
--- /dev/null
+++ b/apps/federation/l10n/ka.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Added to the list of trusted servers",
+ "Server is already in the list of trusted servers." : "Server is already in the list of trusted servers.",
+ "No server to federate with found" : "No server to federate with found",
+ "Could not add server" : "Could not add server",
+ "Trusted servers" : "Trusted servers",
+ "Federation" : "Federation",
+ "+ Add trusted server" : "+ Add trusted server",
+ "Trusted server" : "Trusted server",
+ "Add" : "Add"
+},"pluralForm" :"nplurals=2; plural=(n!=1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/ka_GE.js b/apps/federation/l10n/ka_GE.js
new file mode 100644
index 00000000000..52a41211fe8
--- /dev/null
+++ b/apps/federation/l10n/ka_GE.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "დაემატა სანდო სერვერების სიას",
+ "Server is already in the list of trusted servers." : "სერვერი უკვე დაცული სერვერების სიაშია.",
+ "No server to federate with found" : "სერვერი რომელთანაც შედგება ფედერალიზირება არ იქნა ნაპოვნი",
+ "Could not add server" : "სერვერის დამატება ვერ მოხერხდა",
+ "Trusted servers" : "სანდო სერვერები",
+ "Federation" : "ფედერაცია",
+ "+ Add trusted server" : "+ სანდო სერვერის დამატება",
+ "Trusted server" : "სანდო სერვერი",
+ "Add" : "დამატება"
+},
+"nplurals=2; plural=(n!=1);");
diff --git a/apps/federation/l10n/ka_GE.json b/apps/federation/l10n/ka_GE.json
new file mode 100644
index 00000000000..40e307ce59f
--- /dev/null
+++ b/apps/federation/l10n/ka_GE.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "დაემატა სანდო სერვერების სიას",
+ "Server is already in the list of trusted servers." : "სერვერი უკვე დაცული სერვერების სიაშია.",
+ "No server to federate with found" : "სერვერი რომელთანაც შედგება ფედერალიზირება არ იქნა ნაპოვნი",
+ "Could not add server" : "სერვერის დამატება ვერ მოხერხდა",
+ "Trusted servers" : "სანდო სერვერები",
+ "Federation" : "ფედერაცია",
+ "+ Add trusted server" : "+ სანდო სერვერის დამატება",
+ "Trusted server" : "სანდო სერვერი",
+ "Add" : "დამატება"
+},"pluralForm" :"nplurals=2; plural=(n!=1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/ko.js b/apps/federation/l10n/ko.js
index c5baf30bb04..f6f49d9b79c 100644
--- a/apps/federation/l10n/ko.js
+++ b/apps/federation/l10n/ko.js
@@ -1,15 +1,17 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "신뢰할 수 있는 ownCloud 목록에 서버 추가함",
+ "Added to the list of trusted servers" : "신뢰할 수 있는 서버 목록에 추가됨",
"Server is already in the list of trusted servers." : "신뢰할 수 있는 서버 목록에 이미 추가되었습니다.",
- "No ownCloud server found" : "ownCloud 서버를 찾을 수 없음",
+ "No server to federate with found" : "연합 가능한 서버를 찾을 수 없음",
"Could not add server" : "서버를 추가할 수 없음",
- "Federation" : "연합 공유",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud 연합 공유를 사용하면 다른 믿을 수 있는 ownCloud 서버와 사용자 디렉터리를 상호간 공유할 수 있습니다. 이 정보는 연합 공유 시 외부 사용자 자동 완성 등에 사용합니다.",
- "Add server automatically once a federated share was created successfully" : "연합 공유를 생성했을 때 자동으로 서버 추가",
- "Trusted ownCloud Servers" : "신뢰할 수 있는 ownCloud 서버",
- "+ Add ownCloud server" : "+ ownCloud 서버 추가",
- "ownCloud Server" : "ownCloud 서버"
+ "Trusted servers" : "신뢰할 수 있는 서버",
+ "Federation" : "연합",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정 디렉토리를 교환할 수 있습니다.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정 디렉토리를 교환할 수 있습니다. 예를 들어, 연합 공유 시 외부 계정을 자동 완성하는 데 사용할 수 있습니다.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정의 디렉토리를 교환할 수 있습니다. 예를 들어, 연합 공유시 외부 계정을 자동 완성하는 데에 사용될 수 있습니다. 연합 공유를 생성하기 위해 특정 서버를 신뢰할 수 있는 서버에 반드시 추가할 필요는 없습니다.",
+ "+ Add trusted server" : "+ 신뢰할 수 있는 서버 추가",
+ "Trusted server" : "신뢰할 수 있는 서버",
+ "Add" : "추가"
},
"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/ko.json b/apps/federation/l10n/ko.json
index 373434a68ad..9f09dfb80b9 100644
--- a/apps/federation/l10n/ko.json
+++ b/apps/federation/l10n/ko.json
@@ -1,13 +1,15 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "신뢰할 수 있는 ownCloud 목록에 서버 추가함",
+ "Added to the list of trusted servers" : "신뢰할 수 있는 서버 목록에 추가됨",
"Server is already in the list of trusted servers." : "신뢰할 수 있는 서버 목록에 이미 추가되었습니다.",
- "No ownCloud server found" : "ownCloud 서버를 찾을 수 없음",
+ "No server to federate with found" : "연합 가능한 서버를 찾을 수 없음",
"Could not add server" : "서버를 추가할 수 없음",
- "Federation" : "연합 공유",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud 연합 공유를 사용하면 다른 믿을 수 있는 ownCloud 서버와 사용자 디렉터리를 상호간 공유할 수 있습니다. 이 정보는 연합 공유 시 외부 사용자 자동 완성 등에 사용합니다.",
- "Add server automatically once a federated share was created successfully" : "연합 공유를 생성했을 때 자동으로 서버 추가",
- "Trusted ownCloud Servers" : "신뢰할 수 있는 ownCloud 서버",
- "+ Add ownCloud server" : "+ ownCloud 서버 추가",
- "ownCloud Server" : "ownCloud 서버"
+ "Trusted servers" : "신뢰할 수 있는 서버",
+ "Federation" : "연합",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정 디렉토리를 교환할 수 있습니다.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정 디렉토리를 교환할 수 있습니다. 예를 들어, 연합 공유 시 외부 계정을 자동 완성하는 데 사용할 수 있습니다.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "서버 연합을 통해서 다른 신뢰할 수 있는 서버와 계정의 디렉토리를 교환할 수 있습니다. 예를 들어, 연합 공유시 외부 계정을 자동 완성하는 데에 사용될 수 있습니다. 연합 공유를 생성하기 위해 특정 서버를 신뢰할 수 있는 서버에 반드시 추가할 필요는 없습니다.",
+ "+ Add trusted server" : "+ 신뢰할 수 있는 서버 추가",
+ "Trusted server" : "신뢰할 수 있는 서버",
+ "Add" : "추가"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/lt_LT.js b/apps/federation/l10n/lt_LT.js
new file mode 100644
index 00000000000..8efd7d1b04e
--- /dev/null
+++ b/apps/federation/l10n/lt_LT.js
@@ -0,0 +1,16 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Pridėtas į patikimų serverių sąrašą",
+ "No server found with ID: %s" : "Nerasta jokio serverio, kurio ID: %s",
+ "Could not remove server" : "Nepavyko pašalinti serverio",
+ "Server is already in the list of trusted servers." : "Serveris jau yra patikimų serverių sąraše.",
+ "No server to federate with found" : "Nerasta jokio serverio, su kuriuo jungtis į federaciją",
+ "Could not add server" : "Nepavyko pridėti serverio",
+ "Trusted servers" : "Patikimi serveriai",
+ "Federation" : "Federacija",
+ "+ Add trusted server" : "+ Pridėti patikimą serverį",
+ "Trusted server" : "Patikimas serveris",
+ "Add" : "Pridėti"
+},
+"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);");
diff --git a/apps/federation/l10n/lt_LT.json b/apps/federation/l10n/lt_LT.json
new file mode 100644
index 00000000000..63c0ed5bab5
--- /dev/null
+++ b/apps/federation/l10n/lt_LT.json
@@ -0,0 +1,14 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Pridėtas į patikimų serverių sąrašą",
+ "No server found with ID: %s" : "Nerasta jokio serverio, kurio ID: %s",
+ "Could not remove server" : "Nepavyko pašalinti serverio",
+ "Server is already in the list of trusted servers." : "Serveris jau yra patikimų serverių sąraše.",
+ "No server to federate with found" : "Nerasta jokio serverio, su kuriuo jungtis į federaciją",
+ "Could not add server" : "Nepavyko pridėti serverio",
+ "Trusted servers" : "Patikimi serveriai",
+ "Federation" : "Federacija",
+ "+ Add trusted server" : "+ Pridėti patikimą serverį",
+ "Trusted server" : "Patikimas serveris",
+ "Add" : "Pridėti"
+},"pluralForm" :"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/lv.js b/apps/federation/l10n/lv.js
new file mode 100644
index 00000000000..1eab9f26ad7
--- /dev/null
+++ b/apps/federation/l10n/lv.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Pievienots uzticamo serveru sarakstam",
+ "Server is already in the list of trusted servers." : "Serveris jau ir uzticamo serveru sarakstā .",
+ "No server to federate with found" : "Nav atrasts neviens serveris",
+ "Could not add server" : "Nevarēja pievienot serveri",
+ "Trusted servers" : "Uzticami serveri",
+ "Federation" : "Federācija",
+ "+ Add trusted server" : "+ pievietot uzticamiem serveriem",
+ "Trusted server" : "Uzticams serveris",
+ "Add" : "Pievienot"
+},
+"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);");
diff --git a/apps/federation/l10n/lv.json b/apps/federation/l10n/lv.json
new file mode 100644
index 00000000000..9a05e6903a2
--- /dev/null
+++ b/apps/federation/l10n/lv.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Pievienots uzticamo serveru sarakstam",
+ "Server is already in the list of trusted servers." : "Serveris jau ir uzticamo serveru sarakstā .",
+ "No server to federate with found" : "Nav atrasts neviens serveris",
+ "Could not add server" : "Nevarēja pievienot serveri",
+ "Trusted servers" : "Uzticami serveri",
+ "Federation" : "Federācija",
+ "+ Add trusted server" : "+ pievietot uzticamiem serveriem",
+ "Trusted server" : "Uzticams serveris",
+ "Add" : "Pievienot"
+},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/mk.js b/apps/federation/l10n/mk.js
new file mode 100644
index 00000000000..f193b2ce08a
--- /dev/null
+++ b/apps/federation/l10n/mk.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Додаден во листата на доверливи сервери",
+ "Server is already in the list of trusted servers." : "Серверот е веќе во листата на доверливи сервери",
+ "No server to federate with found" : "Не е пронајден сервер за федерација со вас",
+ "Could not add server" : "Неможе да се додаде серверот",
+ "Trusted servers" : "Доверливи сервери",
+ "Federation" : "Федерација",
+ "+ Add trusted server" : "+ Додади доверлив сервер",
+ "Trusted server" : "Доверлив сервер",
+ "Add" : "Додади"
+},
+"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;");
diff --git a/apps/federation/l10n/mk.json b/apps/federation/l10n/mk.json
new file mode 100644
index 00000000000..0efc8eedc98
--- /dev/null
+++ b/apps/federation/l10n/mk.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Додаден во листата на доверливи сервери",
+ "Server is already in the list of trusted servers." : "Серверот е веќе во листата на доверливи сервери",
+ "No server to federate with found" : "Не е пронајден сервер за федерација со вас",
+ "Could not add server" : "Неможе да се додаде серверот",
+ "Trusted servers" : "Доверливи сервери",
+ "Federation" : "Федерација",
+ "+ Add trusted server" : "+ Додади доверлив сервер",
+ "Trusted server" : "Доверлив сервер",
+ "Add" : "Додади"
+},"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/mn.js b/apps/federation/l10n/mn.js
new file mode 100644
index 00000000000..f342839fc78
--- /dev/null
+++ b/apps/federation/l10n/mn.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "найдвартай серверийн жагсаалтанд нэмэх",
+ "Server is already in the list of trusted servers." : "сервер нь аль хэдийн найдвартай серверийн жагсаалтанд байна",
+ "No server to federate with found" : "Ямар ч холбооны сервер олдсонгүй ",
+ "Could not add server" : " сервер нэмж чадаагүй ",
+ "Trusted servers" : "найдвартай сервер",
+ "Federation" : "холбоо",
+ "+ Add trusted server" : "+ найдвартай сервер нэмэх",
+ "Trusted server" : "найдвартай сервер",
+ "Add" : "нэмэх"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/mn.json b/apps/federation/l10n/mn.json
new file mode 100644
index 00000000000..1b2131e55e1
--- /dev/null
+++ b/apps/federation/l10n/mn.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "найдвартай серверийн жагсаалтанд нэмэх",
+ "Server is already in the list of trusted servers." : "сервер нь аль хэдийн найдвартай серверийн жагсаалтанд байна",
+ "No server to federate with found" : "Ямар ч холбооны сервер олдсонгүй ",
+ "Could not add server" : " сервер нэмж чадаагүй ",
+ "Trusted servers" : "найдвартай сервер",
+ "Federation" : "холбоо",
+ "+ Add trusted server" : "+ найдвартай сервер нэмэх",
+ "Trusted server" : "найдвартай сервер",
+ "Add" : "нэмэх"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/nb.js b/apps/federation/l10n/nb.js
new file mode 100644
index 00000000000..f918b42b539
--- /dev/null
+++ b/apps/federation/l10n/nb.js
@@ -0,0 +1,19 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Lagt til i listen over klarerte servere",
+ "No server found with ID: %s" : "Kunne ikke finne tjener med ID: %s",
+ "Could not remove server" : "Kunne ikke fjerne tjener",
+ "Server is already in the list of trusted servers." : "Serveren er allerede i listen av klarerte servere.",
+ "No server to federate with found" : "Ingen server å sammenknytte med ble funnet",
+ "Could not add server" : "Kunne ikke legge til server",
+ "Trusted servers" : "Klarerte servere",
+ "Federation" : "Sammenknytting",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen. Dette brukes for eksempel til å automatisk fullføre eksterne kontoer for deling i organisasjonsnettverk.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen. Dette brukes for eksempel til å automatisk fullføre eksterne kontoer for deling i organisasjonsnettverk. Det er ikke nødvendig å legge til en server som klarert server for å opprette en delt delt ressurs i forbund.",
+ "+ Add trusted server" : "+ Legg til klarert server",
+ "Trusted server" : "Klarert server",
+ "Add" : "Legg til"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/nb.json b/apps/federation/l10n/nb.json
new file mode 100644
index 00000000000..672035bdccc
--- /dev/null
+++ b/apps/federation/l10n/nb.json
@@ -0,0 +1,17 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Lagt til i listen over klarerte servere",
+ "No server found with ID: %s" : "Kunne ikke finne tjener med ID: %s",
+ "Could not remove server" : "Kunne ikke fjerne tjener",
+ "Server is already in the list of trusted servers." : "Serveren er allerede i listen av klarerte servere.",
+ "No server to federate with found" : "Ingen server å sammenknytte med ble funnet",
+ "Could not add server" : "Kunne ikke legge til server",
+ "Trusted servers" : "Klarerte servere",
+ "Federation" : "Sammenknytting",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen. Dette brukes for eksempel til å automatisk fullføre eksterne kontoer for deling i organisasjonsnettverk.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Sammenknytting lar deg koble til andre klarerte servere for å utveksle kontokatalogen. Dette brukes for eksempel til å automatisk fullføre eksterne kontoer for deling i organisasjonsnettverk. Det er ikke nødvendig å legge til en server som klarert server for å opprette en delt delt ressurs i forbund.",
+ "+ Add trusted server" : "+ Legg til klarert server",
+ "Trusted server" : "Klarert server",
+ "Add" : "Legg til"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/nb_NO.js b/apps/federation/l10n/nb_NO.js
deleted file mode 100644
index 6dcaec43573..00000000000
--- a/apps/federation/l10n/nb_NO.js
+++ /dev/null
@@ -1,15 +0,0 @@
-OC.L10N.register(
- "federation",
- {
- "Server added to the list of trusted ownClouds" : "Server lagt til i listen av klarerte ownCloud'er",
- "Server is already in the list of trusted servers." : "Serveren er allerede i listen av klarerte servere.",
- "No ownCloud server found" : "Ingen ownCloud-server funnet",
- "Could not add server" : "Kunne ikke legge til server",
- "Federation" : "Sammenknytting",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud-sammenknytting lar deg koble til andre klarerte ownCloud'er og utveksle brukerkatalogen. Dette vil for eksempel brukes til å fylle ut eksterne brukere for sammenknyttet deling automatisk.",
- "Add server automatically once a federated share was created successfully" : "Legg til server automatisk når en sammenknyttet deling er blitt opprettet",
- "Trusted ownCloud Servers" : "Klarerte ownCloud-servere",
- "+ Add ownCloud server" : "+ Ny ownCloud-server",
- "ownCloud Server" : "ownCloud-server"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/nb_NO.json b/apps/federation/l10n/nb_NO.json
deleted file mode 100644
index 9b4ceea4674..00000000000
--- a/apps/federation/l10n/nb_NO.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server lagt til i listen av klarerte ownCloud'er",
- "Server is already in the list of trusted servers." : "Serveren er allerede i listen av klarerte servere.",
- "No ownCloud server found" : "Ingen ownCloud-server funnet",
- "Could not add server" : "Kunne ikke legge til server",
- "Federation" : "Sammenknytting",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud-sammenknytting lar deg koble til andre klarerte ownCloud'er og utveksle brukerkatalogen. Dette vil for eksempel brukes til å fylle ut eksterne brukere for sammenknyttet deling automatisk.",
- "Add server automatically once a federated share was created successfully" : "Legg til server automatisk når en sammenknyttet deling er blitt opprettet",
- "Trusted ownCloud Servers" : "Klarerte ownCloud-servere",
- "+ Add ownCloud server" : "+ Ny ownCloud-server",
- "ownCloud Server" : "ownCloud-server"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/apps/federation/l10n/nl.js b/apps/federation/l10n/nl.js
index 1a7fcff09f8..4633804db82 100644
--- a/apps/federation/l10n/nl.js
+++ b/apps/federation/l10n/nl.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Server toegevoegd aan de lijst van vertrouwde ownClouds",
+ "Added to the list of trusted servers" : "Toegevoegd aan de lijst met vertrouwde servers",
+ "No server found with ID: %s" : "Geen server gevonden met ID: %s",
+ "Could not remove server" : "Kon server niet verwijderen",
"Server is already in the list of trusted servers." : "Server bestaat reeds in de lijst van vertrouwde servers.",
- "No ownCloud server found" : "Geen ownCloud server gevonden",
+ "No server to federate with found" : "Geen server gevonden om mee te federeren",
"Could not add server" : "Kon server niet toevoegen",
+ "Trusted servers" : "Vertrouwde servers",
"Federation" : "Federatie",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federatie stelt u in staat om een verbinding op te zetten met andere vertrouwde ownClouds en uw gebruikers lijst uit te wisselen. Dit stelt u bijvoorbeeld in staat om automatish suggesties te krijgen voor gebruikers tijdens het delen via federatie.",
- "Add server automatically once a federated share was created successfully" : "Voeg server automatisch toe zodra een gefedereerde share succesvol gecreëerd is",
- "Trusted ownCloud Servers" : "Vertrouwde ownCloud Servers",
- "+ Add ownCloud server" : "+ Voeg ownCloud server toe",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Met Federatie kun je verbinding maken met andere vertrouwde servers om de accountmap uit te wisselen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federatie stelt je in staat om verbinding te maken met andere vertrouwde servers om de accountdirectory uit te wisselen. Dit zal bijvoorbeeld worden gebruikt om externe accounts automatisch aan te vullen voor gefedereerd delen.",
+ "External documentation for Federated Cloud Sharing" : "Externe documentatie voor Federated Cloud Sharing",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federatie stelt je in staat om verbinding te maken met andere vertrouwde servers om de accountdirectory uit te wisselen. Dit zal bijvoorbeeld worden gebruikt om externe accounts automatisch aan te vullen voor gefedereerd delen. Het is niet nodig om een server als vertrouwde server toe te voegen om een gefedereerde share te maken.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Elke server moet de andere valideren. Dit proces kan enkele croncycli duren.",
+ "+ Add trusted server" : "+ Toevoegen vertrouwde server",
+ "Trusted server" : "Vertrouwde server",
+ "Add" : "Toevoegen"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/nl.json b/apps/federation/l10n/nl.json
index 0a052cbc911..e217a0b03d3 100644
--- a/apps/federation/l10n/nl.json
+++ b/apps/federation/l10n/nl.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Server toegevoegd aan de lijst van vertrouwde ownClouds",
+ "Added to the list of trusted servers" : "Toegevoegd aan de lijst met vertrouwde servers",
+ "No server found with ID: %s" : "Geen server gevonden met ID: %s",
+ "Could not remove server" : "Kon server niet verwijderen",
"Server is already in the list of trusted servers." : "Server bestaat reeds in de lijst van vertrouwde servers.",
- "No ownCloud server found" : "Geen ownCloud server gevonden",
+ "No server to federate with found" : "Geen server gevonden om mee te federeren",
"Could not add server" : "Kon server niet toevoegen",
+ "Trusted servers" : "Vertrouwde servers",
"Federation" : "Federatie",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Federatie stelt u in staat om een verbinding op te zetten met andere vertrouwde ownClouds en uw gebruikers lijst uit te wisselen. Dit stelt u bijvoorbeeld in staat om automatish suggesties te krijgen voor gebruikers tijdens het delen via federatie.",
- "Add server automatically once a federated share was created successfully" : "Voeg server automatisch toe zodra een gefedereerde share succesvol gecreëerd is",
- "Trusted ownCloud Servers" : "Vertrouwde ownCloud Servers",
- "+ Add ownCloud server" : "+ Voeg ownCloud server toe",
- "ownCloud Server" : "ownCloud Server"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Met Federatie kun je verbinding maken met andere vertrouwde servers om de accountmap uit te wisselen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federatie stelt je in staat om verbinding te maken met andere vertrouwde servers om de accountdirectory uit te wisselen. Dit zal bijvoorbeeld worden gebruikt om externe accounts automatisch aan te vullen voor gefedereerd delen.",
+ "External documentation for Federated Cloud Sharing" : "Externe documentatie voor Federated Cloud Sharing",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federatie stelt je in staat om verbinding te maken met andere vertrouwde servers om de accountdirectory uit te wisselen. Dit zal bijvoorbeeld worden gebruikt om externe accounts automatisch aan te vullen voor gefedereerd delen. Het is niet nodig om een server als vertrouwde server toe te voegen om een gefedereerde share te maken.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Elke server moet de andere valideren. Dit proces kan enkele croncycli duren.",
+ "+ Add trusted server" : "+ Toevoegen vertrouwde server",
+ "Trusted server" : "Vertrouwde server",
+ "Add" : "Toevoegen"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/pl.js b/apps/federation/l10n/pl.js
index d8e10260525..75e12a8fec4 100644
--- a/apps/federation/l10n/pl.js
+++ b/apps/federation/l10n/pl.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Serwer został dodany do listy zaufanych serwerów ownCloud",
+ "Added to the list of trusted servers" : "Dodano do listy zaufanych serwerów.",
+ "No server found with ID: %s" : "Nie znaleziono serwera o ID: %s",
+ "Could not remove server" : "Nie można usunąć serwera",
"Server is already in the list of trusted servers." : "Serwer znajduje się już na liście zaufanych serwerów.",
- "No ownCloud server found" : "Nie znaleziono serwera ownCloud",
+ "No server to federate with found" : "Nie znaleziono federacyjnego serwera",
"Could not add server" : "Nie można dodać serwera",
- "Federation" : "Stowarzyszenia",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Stowarzyszenia ownCloud pozwalają na tworzenie połączeń z innymi zaufanymi serwerami ownCloud w celu współdzielenia katalogów użytkowników. Na przykład: funkcja będzie użyta przy tworzeniu podpowiedzi z listą zewnętrznych użytkowników przy tworzeniu stowarzyszonych udziałów.",
- "Add server automatically once a federated share was created successfully" : "Dodaj serwer automatycznie po pomyślnym utworzeniu stowarzyszonego udziału.",
- "Trusted ownCloud Servers" : "Zaufane serwery ownCloud",
- "+ Add ownCloud server" : "Dodaj serwer ownCloud",
- "ownCloud Server" : "Serwer ownCloud"
+ "Trusted servers" : "Zaufane serwery",
+ "Federation" : "Federacja",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont. Na przykład będzie to używane do automatycznego uzupełniania kont zewnętrznych na potrzeby udostępniania federacyjnego.",
+ "External documentation for Federated Cloud Sharing" : "Dokumentacja zewnętrzna dla usługi Udostępnienia Chmury Federacyjnej",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont. Na przykład zostanie to użyte do automatycznego uzupełniania dla zewnętrznych kont przy udostępnianiu federacyjnym. Nie jest konieczne dodawanie serwera jako serwera zaufanego w celu utworzenia udostępnienia federacyjnego.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Każdy serwer musi zweryfikować inny serwer. Ten proces może wymagać kilku cykli cron.",
+ "+ Add trusted server" : "+ Dodaj zaufany serwer",
+ "Trusted server" : "Zaufany serwer",
+ "Add" : "Dodaj"
},
-"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
+"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);");
diff --git a/apps/federation/l10n/pl.json b/apps/federation/l10n/pl.json
index 78ac2f6265a..bf54f1fc437 100644
--- a/apps/federation/l10n/pl.json
+++ b/apps/federation/l10n/pl.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Serwer został dodany do listy zaufanych serwerów ownCloud",
+ "Added to the list of trusted servers" : "Dodano do listy zaufanych serwerów.",
+ "No server found with ID: %s" : "Nie znaleziono serwera o ID: %s",
+ "Could not remove server" : "Nie można usunąć serwera",
"Server is already in the list of trusted servers." : "Serwer znajduje się już na liście zaufanych serwerów.",
- "No ownCloud server found" : "Nie znaleziono serwera ownCloud",
+ "No server to federate with found" : "Nie znaleziono federacyjnego serwera",
"Could not add server" : "Nie można dodać serwera",
- "Federation" : "Stowarzyszenia",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Stowarzyszenia ownCloud pozwalają na tworzenie połączeń z innymi zaufanymi serwerami ownCloud w celu współdzielenia katalogów użytkowników. Na przykład: funkcja będzie użyta przy tworzeniu podpowiedzi z listą zewnętrznych użytkowników przy tworzeniu stowarzyszonych udziałów.",
- "Add server automatically once a federated share was created successfully" : "Dodaj serwer automatycznie po pomyślnym utworzeniu stowarzyszonego udziału.",
- "Trusted ownCloud Servers" : "Zaufane serwery ownCloud",
- "+ Add ownCloud server" : "Dodaj serwer ownCloud",
- "ownCloud Server" : "Serwer ownCloud"
-},"pluralForm" :"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
+ "Trusted servers" : "Zaufane serwery",
+ "Federation" : "Federacja",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont. Na przykład będzie to używane do automatycznego uzupełniania kont zewnętrznych na potrzeby udostępniania federacyjnego.",
+ "External documentation for Federated Cloud Sharing" : "Dokumentacja zewnętrzna dla usługi Udostępnienia Chmury Federacyjnej",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federacja umożliwia łączenie się z innymi zaufanymi serwerami w celu wymiany katalogu kont. Na przykład zostanie to użyte do automatycznego uzupełniania dla zewnętrznych kont przy udostępnianiu federacyjnym. Nie jest konieczne dodawanie serwera jako serwera zaufanego w celu utworzenia udostępnienia federacyjnego.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Każdy serwer musi zweryfikować inny serwer. Ten proces może wymagać kilku cykli cron.",
+ "+ Add trusted server" : "+ Dodaj zaufany serwer",
+ "Trusted server" : "Zaufany serwer",
+ "Add" : "Dodaj"
+},"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/pt_BR.js b/apps/federation/l10n/pt_BR.js
index a3e4e0c6754..9423314eeef 100644
--- a/apps/federation/l10n/pt_BR.js
+++ b/apps/federation/l10n/pt_BR.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servidor adicionado à lista de ownClouds confiáveis",
+ "Added to the list of trusted servers" : "Adicionado à lista de servidores confiáveis.",
+ "No server found with ID: %s" : "Nenhum servidor encontrado com o ID: %s",
+ "Could not remove server" : "Não foi possível remover o servidor",
"Server is already in the list of trusted servers." : "O servidor já está na lista de servidores confiáveis.",
- "No ownCloud server found" : "Nenhum servidor ownCloud encontrado",
+ "No server to federate with found" : "Nenhum servidor encontrado para federar",
"Could not add server" : "Não foi possível adicionar servidor",
- "Federation" : "Associação",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "A associação ownCloud permite que você conecte com outros ownCloud confiáveis para que haja troca de diretórios do usuário. Por exemplo, este será utilizado para usuários externos de complementação para compartilhamento associado.",
- "Add server automatically once a federated share was created successfully" : "Adicionar servidor automaticamente uma vez que um compartilhamento associado foi criado com êxito",
- "Trusted ownCloud Servers" : "Servidores OwnCloud Confiáveis",
- "+ Add ownCloud server" : "+ Adicionar servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
+ "Trusted servers" : "Servidores confiáveis",
+ "Federation" : "Federação",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas. Por exemplo, isso será usado para preencher automaticamente contas externas para compartilhamento federado.",
+ "External documentation for Federated Cloud Sharing" : "Documentação externa para Compartilhamento de Nuvem Federada",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas. Por exemplo, isso será usado para preencher automaticamente contas externas para compartilhamento federado. Não é necessário adicionar um servidor como servidor confiável para criar um compartilhamento federado.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor deve validar o outro. Esse processo pode exigir alguns ciclos de cron.",
+ "+ Add trusted server" : "+Adicionar servidores confiáveis",
+ "Trusted server" : "Servidores confiáveis",
+ "Add" : "Adicionar"
},
-"nplurals=2; plural=(n > 1);");
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/pt_BR.json b/apps/federation/l10n/pt_BR.json
index c09a3036975..712e1f33687 100644
--- a/apps/federation/l10n/pt_BR.json
+++ b/apps/federation/l10n/pt_BR.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servidor adicionado à lista de ownClouds confiáveis",
+ "Added to the list of trusted servers" : "Adicionado à lista de servidores confiáveis.",
+ "No server found with ID: %s" : "Nenhum servidor encontrado com o ID: %s",
+ "Could not remove server" : "Não foi possível remover o servidor",
"Server is already in the list of trusted servers." : "O servidor já está na lista de servidores confiáveis.",
- "No ownCloud server found" : "Nenhum servidor ownCloud encontrado",
+ "No server to federate with found" : "Nenhum servidor encontrado para federar",
"Could not add server" : "Não foi possível adicionar servidor",
- "Federation" : "Associação",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "A associação ownCloud permite que você conecte com outros ownCloud confiáveis para que haja troca de diretórios do usuário. Por exemplo, este será utilizado para usuários externos de complementação para compartilhamento associado.",
- "Add server automatically once a federated share was created successfully" : "Adicionar servidor automaticamente uma vez que um compartilhamento associado foi criado com êxito",
- "Trusted ownCloud Servers" : "Servidores OwnCloud Confiáveis",
- "+ Add ownCloud server" : "+ Adicionar servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
-},"pluralForm" :"nplurals=2; plural=(n > 1);"
+ "Trusted servers" : "Servidores confiáveis",
+ "Federation" : "Federação",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas. Por exemplo, isso será usado para preencher automaticamente contas externas para compartilhamento federado.",
+ "External documentation for Federated Cloud Sharing" : "Documentação externa para Compartilhamento de Nuvem Federada",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "A federação permite que você se conecte a outros servidores confiáveis ​​para trocar o diretório de contas. Por exemplo, isso será usado para preencher automaticamente contas externas para compartilhamento federado. Não é necessário adicionar um servidor como servidor confiável para criar um compartilhamento federado.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Cada servidor deve validar o outro. Esse processo pode exigir alguns ciclos de cron.",
+ "+ Add trusted server" : "+Adicionar servidores confiáveis",
+ "Trusted server" : "Servidores confiáveis",
+ "Add" : "Adicionar"
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/pt_PT.js b/apps/federation/l10n/pt_PT.js
index 38ec142b689..a9c5b3e0af5 100644
--- a/apps/federation/l10n/pt_PT.js
+++ b/apps/federation/l10n/pt_PT.js
@@ -1,15 +1,14 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servidor adicionado à lista de ownClouds confiáveis",
+ "Added to the list of trusted servers" : "Adicionado à lista de servidores confiáveis",
"Server is already in the list of trusted servers." : "Servidor já pertence à lista de servidores confiáveis.",
- "No ownCloud server found" : "Nenhum servidor ownCloud encontrado",
+ "No server to federate with found" : "Nenhum servidor federado encontrado",
"Could not add server" : "Não foi possível adicionar servidor",
+ "Trusted servers" : "Servidores confiáveis",
"Federation" : "Federação",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federação ownCloud permite-lhe conectar-se com outros ownClouds de confiança para partilhar directórios. Por exemplo, isto será utilizado para auto-completar utilizadores externos para partilhas federadas.",
- "Add server automatically once a federated share was created successfully" : "Adicionar o servidor automaticamente assim que uma partilha federada tenha sido criada com sucesso",
- "Trusted ownCloud Servers" : "Servidores ownCloud de confiança",
- "+ Add ownCloud server" : "+ Adicionar servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
+ "+ Add trusted server" : "+ Adicionar servidor confiável",
+ "Trusted server" : "Servidor confiável",
+ "Add" : "Adicionar"
},
-"nplurals=2; plural=(n != 1);");
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/federation/l10n/pt_PT.json b/apps/federation/l10n/pt_PT.json
index 796a2127170..bec9eea1089 100644
--- a/apps/federation/l10n/pt_PT.json
+++ b/apps/federation/l10n/pt_PT.json
@@ -1,13 +1,12 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servidor adicionado à lista de ownClouds confiáveis",
+ "Added to the list of trusted servers" : "Adicionado à lista de servidores confiáveis",
"Server is already in the list of trusted servers." : "Servidor já pertence à lista de servidores confiáveis.",
- "No ownCloud server found" : "Nenhum servidor ownCloud encontrado",
+ "No server to federate with found" : "Nenhum servidor federado encontrado",
"Could not add server" : "Não foi possível adicionar servidor",
+ "Trusted servers" : "Servidores confiáveis",
"Federation" : "Federação",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federação ownCloud permite-lhe conectar-se com outros ownClouds de confiança para partilhar directórios. Por exemplo, isto será utilizado para auto-completar utilizadores externos para partilhas federadas.",
- "Add server automatically once a federated share was created successfully" : "Adicionar o servidor automaticamente assim que uma partilha federada tenha sido criada com sucesso",
- "Trusted ownCloud Servers" : "Servidores ownCloud de confiança",
- "+ Add ownCloud server" : "+ Adicionar servidor ownCloud",
- "ownCloud Server" : "Servidor ownCloud"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
+ "+ Add trusted server" : "+ Adicionar servidor confiável",
+ "Trusted server" : "Servidor confiável",
+ "Add" : "Adicionar"
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/ru.js b/apps/federation/l10n/ru.js
index 8e4b1372938..662a92f413e 100644
--- a/apps/federation/l10n/ru.js
+++ b/apps/federation/l10n/ru.js
@@ -1,14 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Сервер добавлен в список доверенных серверов ownClowd ",
- "Server is already in the list of trusted servers." : "Сервер уже в списке доверенных серверов.",
- "No ownCloud server found" : "Сервер ownCloud не найден",
+ "Added to the list of trusted servers" : "Добавлено в список доверенных серверов",
+ "No server found with ID: %s" : "Сервер с идентификатором не найден: %s",
+ "Could not remove server" : "Не удалось удалить сервер",
+ "Server is already in the list of trusted servers." : "Сервер уже есть в списке доверенных серверов.",
+ "No server to federate with found" : "Сервер для объединения не найден",
"Could not add server" : "Не удалось добавить сервер",
- "Federation" : "Объединение",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе.",
- "Trusted ownCloud Servers" : "Доверенные серверы ownCloud",
- "+ Add ownCloud server" : "+ Добавить сервер ownCloud",
- "ownCloud Server" : "Сервер ownCloud"
+ "Trusted servers" : "Доверенные серверы",
+ "Federation" : "Федерация",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей. Например, это будет использоваться для автоматического заполнения внешних учетных записей для федеративного общего доступа.",
+ "External documentation for Federated Cloud Sharing" : "Внешняя документация для федеративного облачного обмена",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей. Например, это будет использоваться для автоматического заполнения внешних учетных записей для федеративного общего доступа. Для создания федеративного общего ресурса нет необходимости добавлять сервер в качестве доверенного.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Каждый сервер должен проверить другой. Этот процесс может потребовать нескольких циклов cron.",
+ "+ Add trusted server" : "+ Добавить доверенный сервер",
+ "Trusted server" : "Доверенный сервер",
+ "Add" : "Добавить"
},
"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/apps/federation/l10n/ru.json b/apps/federation/l10n/ru.json
index 526005e3d38..f8d8ea90f5b 100644
--- a/apps/federation/l10n/ru.json
+++ b/apps/federation/l10n/ru.json
@@ -1,12 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Сервер добавлен в список доверенных серверов ownClowd ",
- "Server is already in the list of trusted servers." : "Сервер уже в списке доверенных серверов.",
- "No ownCloud server found" : "Сервер ownCloud не найден",
+ "Added to the list of trusted servers" : "Добавлено в список доверенных серверов",
+ "No server found with ID: %s" : "Сервер с идентификатором не найден: %s",
+ "Could not remove server" : "Не удалось удалить сервер",
+ "Server is already in the list of trusted servers." : "Сервер уже есть в списке доверенных серверов.",
+ "No server to federate with found" : "Сервер для объединения не найден",
"Could not add server" : "Не удалось добавить сервер",
- "Federation" : "Объединение",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Объединение серверов ownCloud позволит Вам подключиться к другим доверенным серверам ownCloud для обмена директориями пользователей. Это будет использовано, например, для автоматического завершения внешних пользователей при объединенном общем доступе.",
- "Trusted ownCloud Servers" : "Доверенные серверы ownCloud",
- "+ Add ownCloud server" : "+ Добавить сервер ownCloud",
- "ownCloud Server" : "Сервер ownCloud"
+ "Trusted servers" : "Доверенные серверы",
+ "Federation" : "Федерация",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей. Например, это будет использоваться для автоматического заполнения внешних учетных записей для федеративного общего доступа.",
+ "External documentation for Federated Cloud Sharing" : "Внешняя документация для федеративного облачного обмена",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Федерация позволяет вам подключаться к другим доверенным серверам для обмена каталогом учетных записей. Например, это будет использоваться для автоматического заполнения внешних учетных записей для федеративного общего доступа. Для создания федеративного общего ресурса нет необходимости добавлять сервер в качестве доверенного.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Каждый сервер должен проверить другой. Этот процесс может потребовать нескольких циклов cron.",
+ "+ Add trusted server" : "+ Добавить доверенный сервер",
+ "Trusted server" : "Доверенный сервер",
+ "Add" : "Добавить"
},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/sc.js b/apps/federation/l10n/sc.js
new file mode 100644
index 00000000000..122860c98fc
--- /dev/null
+++ b/apps/federation/l10n/sc.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Agiuntu a sa lista de is serbidores seguros",
+ "Server is already in the list of trusted servers." : "Su serbidore est giai in sa lista de is serbidores seguros.",
+ "No server to federate with found" : "Perunu serbidore agatadu pro sa federatzione",
+ "Could not add server" : "No at fatu a agiùnghere su serbidore",
+ "Trusted servers" : "Serbidores seguros",
+ "Federation" : "Federatzione",
+ "+ Add trusted server" : "+ Agiunghe serbidore seguru",
+ "Trusted server" : "Serbidore seguru",
+ "Add" : "Agiunghe"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/sc.json b/apps/federation/l10n/sc.json
new file mode 100644
index 00000000000..d666d8e5bab
--- /dev/null
+++ b/apps/federation/l10n/sc.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Agiuntu a sa lista de is serbidores seguros",
+ "Server is already in the list of trusted servers." : "Su serbidore est giai in sa lista de is serbidores seguros.",
+ "No server to federate with found" : "Perunu serbidore agatadu pro sa federatzione",
+ "Could not add server" : "No at fatu a agiùnghere su serbidore",
+ "Trusted servers" : "Serbidores seguros",
+ "Federation" : "Federatzione",
+ "+ Add trusted server" : "+ Agiunghe serbidore seguru",
+ "Trusted server" : "Serbidore seguru",
+ "Add" : "Agiunghe"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/sk.js b/apps/federation/l10n/sk.js
new file mode 100644
index 00000000000..222d89da7c7
--- /dev/null
+++ b/apps/federation/l10n/sk.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Pridané do zoznamu dôveryhodných serverov",
+ "No server found with ID: %s" : "Nenašiel sa žiadny server s ID: %s",
+ "Could not remove server" : "Nepodarilo sa odstrániť server",
+ "Server is already in the list of trusted servers." : "Server sa už nachádza v zozname dôveryhodných serverov",
+ "No server to federate with found" : "Server pre združenie sa nenašiel",
+ "Could not add server" : "Nebolo možné pridať server",
+ "Trusted servers" : "Dôveryhodné servery",
+ "Federation" : "Združovanie",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny účtov.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny účtov. Používa sa to napr. pre automatické doplňovanie externých účtov pri združenom zdieľaní.",
+ "External documentation for Federated Cloud Sharing" : "Externá dokumentácia pre Federatívne zdieľanie v cloude",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny zoznamu užívateľov. Používa sa to napr. pre automatické doplňovanie externých účtov pri združenom zdieľaní. Na vytvorenie združeného zdieľaného adresára nie je potrebné pridať server ako dôveryhodný server.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Každý server musí overiť ostatné. Tento proces môže vyžadovať pár cyklov v crone.",
+ "+ Add trusted server" : "Pridať dôveryhodný server",
+ "Trusted server" : "Dôveryhodný server",
+ "Add" : "Pridať"
+},
+"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);");
diff --git a/apps/federation/l10n/sk.json b/apps/federation/l10n/sk.json
new file mode 100644
index 00000000000..ed4f4d1d75c
--- /dev/null
+++ b/apps/federation/l10n/sk.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Pridané do zoznamu dôveryhodných serverov",
+ "No server found with ID: %s" : "Nenašiel sa žiadny server s ID: %s",
+ "Could not remove server" : "Nepodarilo sa odstrániť server",
+ "Server is already in the list of trusted servers." : "Server sa už nachádza v zozname dôveryhodných serverov",
+ "No server to federate with found" : "Server pre združenie sa nenašiel",
+ "Could not add server" : "Nebolo možné pridať server",
+ "Trusted servers" : "Dôveryhodné servery",
+ "Federation" : "Združovanie",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny účtov.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny účtov. Používa sa to napr. pre automatické doplňovanie externých účtov pri združenom zdieľaní.",
+ "External documentation for Federated Cloud Sharing" : "Externá dokumentácia pre Federatívne zdieľanie v cloude",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Združovanie vám umožňuje sa pripojiť k iným dôveryhodným serverom za účelom výmeny zoznamu užívateľov. Používa sa to napr. pre automatické doplňovanie externých účtov pri združenom zdieľaní. Na vytvorenie združeného zdieľaného adresára nie je potrebné pridať server ako dôveryhodný server.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Každý server musí overiť ostatné. Tento proces môže vyžadovať pár cyklov v crone.",
+ "+ Add trusted server" : "Pridať dôveryhodný server",
+ "Trusted server" : "Dôveryhodný server",
+ "Add" : "Pridať"
+},"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/sl.js b/apps/federation/l10n/sl.js
index be13333301f..d93005e5df8 100644
--- a/apps/federation/l10n/sl.js
+++ b/apps/federation/l10n/sl.js
@@ -1,15 +1,17 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Strežnik je dodan na seznam potrjenih strežnikov ownCloud",
- "Server is already in the list of trusted servers." : "Strežnik je že na seznamu potrjenih strežnikov.",
- "No ownCloud server found" : "Ni mogoče najti nobenega strežnika ownCloud.",
- "Could not add server" : "Ni mogoče dodati strežnika.",
+ "Added to the list of trusted servers" : "Strežnik je dodan na seznam varnih strežnikov.",
+ "Server is already in the list of trusted servers." : "Strežnik je že na seznamu varnih strežnikov.",
+ "No server to federate with found" : "Ne najdem strežnika za federiranje",
+ "Could not add server" : "Strežnika ni mogoče dodati.",
+ "Trusted servers" : "Varni strežniki",
"Federation" : "Zvezni oblaki",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Zvezni oblak ownCloud omogoča povezovanje z drugimi potrjenimi strežniki ownCloud in souporabo uporabniških map in s prenosom dovoljenj na oddaljeni strežnik. Možnost je uporabljena za samodejno dokončanje izpisa zunanjih uporabnikov za souporabo s prenosom dovoljenj.",
- "Add server automatically once a federated share was created successfully" : "Strežnik dodaj samodejno, ko je povezava zveznega oblaka uspešno ustvarjena",
- "Trusted ownCloud Servers" : "Zaupanja vredni strežniki ownCloud",
- "+ Add ownCloud server" : "+ Dodaj strežnik ownCloud",
- "ownCloud Server" : "Strežnik ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Zvezni oblak omogoča povezovanje zunanjih strežnikov v skupen oblak in izmenjavo datotek in map uporabnikov različnih sistemov.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Zvezni oblak omogoča povezovanje z drugimi varnimi strežniki in izmenjavo datotek in map računov v enotnem oblaku. Možnost omogoča na primer samodejno dopolnjevanje tudi računov na drugih, zunanjih strežnikih.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Zvezni oblak omogoča povezovanje z drugimi varnimi strežniki in izmenjavo datotek in map računov v enotnem oblaku. Možnost omogoča na primer samodejno dopolnjevanje tudi imen računov na drugih, zunanjih strežnikih. Zunanjih strežnikov ni nujno dodati kot zaupanja vredne, da lahko ustvarite povezave.",
+ "+ Add trusted server" : "+ Dodaj varen strežnik",
+ "Trusted server" : "Varen strežnik",
+ "Add" : "Dodaj"
},
"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);");
diff --git a/apps/federation/l10n/sl.json b/apps/federation/l10n/sl.json
index a3eb030c828..a864b1159bd 100644
--- a/apps/federation/l10n/sl.json
+++ b/apps/federation/l10n/sl.json
@@ -1,13 +1,15 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Strežnik je dodan na seznam potrjenih strežnikov ownCloud",
- "Server is already in the list of trusted servers." : "Strežnik je že na seznamu potrjenih strežnikov.",
- "No ownCloud server found" : "Ni mogoče najti nobenega strežnika ownCloud.",
- "Could not add server" : "Ni mogoče dodati strežnika.",
+ "Added to the list of trusted servers" : "Strežnik je dodan na seznam varnih strežnikov.",
+ "Server is already in the list of trusted servers." : "Strežnik je že na seznamu varnih strežnikov.",
+ "No server to federate with found" : "Ne najdem strežnika za federiranje",
+ "Could not add server" : "Strežnika ni mogoče dodati.",
+ "Trusted servers" : "Varni strežniki",
"Federation" : "Zvezni oblaki",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Zvezni oblak ownCloud omogoča povezovanje z drugimi potrjenimi strežniki ownCloud in souporabo uporabniških map in s prenosom dovoljenj na oddaljeni strežnik. Možnost je uporabljena za samodejno dokončanje izpisa zunanjih uporabnikov za souporabo s prenosom dovoljenj.",
- "Add server automatically once a federated share was created successfully" : "Strežnik dodaj samodejno, ko je povezava zveznega oblaka uspešno ustvarjena",
- "Trusted ownCloud Servers" : "Zaupanja vredni strežniki ownCloud",
- "+ Add ownCloud server" : "+ Dodaj strežnik ownCloud",
- "ownCloud Server" : "Strežnik ownCloud"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Zvezni oblak omogoča povezovanje zunanjih strežnikov v skupen oblak in izmenjavo datotek in map uporabnikov različnih sistemov.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Zvezni oblak omogoča povezovanje z drugimi varnimi strežniki in izmenjavo datotek in map računov v enotnem oblaku. Možnost omogoča na primer samodejno dopolnjevanje tudi računov na drugih, zunanjih strežnikih.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Zvezni oblak omogoča povezovanje z drugimi varnimi strežniki in izmenjavo datotek in map računov v enotnem oblaku. Možnost omogoča na primer samodejno dopolnjevanje tudi imen računov na drugih, zunanjih strežnikih. Zunanjih strežnikov ni nujno dodati kot zaupanja vredne, da lahko ustvarite povezave.",
+ "+ Add trusted server" : "+ Dodaj varen strežnik",
+ "Trusted server" : "Varen strežnik",
+ "Add" : "Dodaj"
},"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/sq.js b/apps/federation/l10n/sq.js
index 9d69a1fdf80..cf7edac45cc 100644
--- a/apps/federation/l10n/sq.js
+++ b/apps/federation/l10n/sq.js
@@ -1,15 +1,14 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Shërbyesi u shtua te lista e ownCloud-eve të besuar",
- "Server is already in the list of trusted servers." : "Shërbyesi është tashmë në listën e shërbyesve të besuar.",
- "No ownCloud server found" : "S’u gjet shërbyes ownCloud",
- "Could not add server" : "Shërbyesi s’u shtua dot",
+ "Added to the list of trusted servers" : "U shtua në listën e server-ave të besuar",
+ "Server is already in the list of trusted servers." : "Server-i është tashmë në listën e server-ave të besuar.",
+ "No server to federate with found" : "Nuk u gjet server me të cilin mund të federohej",
+ "Could not add server" : "Server-i s’u shtua dot",
+ "Trusted servers" : "Servera të besuar",
"Federation" : "Federim",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federimi ownCloud ju lejon të lidheni me ownCloud-e të tjerë për të shkëmbyer drejtorinë e përdoruesve. Për shembull, kjo do të përdoret për për vetëplotësim përdoruesish të jashtëm për ndarje të federuar.",
- "Add server automatically once a federated share was created successfully" : "Shtoje vetvetiu shërbyesin pasi të jetë krijuar me sukses një ndarje e federuar",
- "Trusted ownCloud Servers" : "Shërbyes ownCloud të Besuar",
- "+ Add ownCloud server" : "+ Shtoni shërbyes ownCloud",
- "ownCloud Server" : "Shërbyes ownCloud"
+ "+ Add trusted server" : "+ Shto server-a të besuar",
+ "Trusted server" : "Server i besuar",
+ "Add" : "Shto"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/sq.json b/apps/federation/l10n/sq.json
index 67dcdcebe07..ee5c9fc0e40 100644
--- a/apps/federation/l10n/sq.json
+++ b/apps/federation/l10n/sq.json
@@ -1,13 +1,12 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Shërbyesi u shtua te lista e ownCloud-eve të besuar",
- "Server is already in the list of trusted servers." : "Shërbyesi është tashmë në listën e shërbyesve të besuar.",
- "No ownCloud server found" : "S’u gjet shërbyes ownCloud",
- "Could not add server" : "Shërbyesi s’u shtua dot",
+ "Added to the list of trusted servers" : "U shtua në listën e server-ave të besuar",
+ "Server is already in the list of trusted servers." : "Server-i është tashmë në listën e server-ave të besuar.",
+ "No server to federate with found" : "Nuk u gjet server me të cilin mund të federohej",
+ "Could not add server" : "Server-i s’u shtua dot",
+ "Trusted servers" : "Servera të besuar",
"Federation" : "Federim",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federimi ownCloud ju lejon të lidheni me ownCloud-e të tjerë për të shkëmbyer drejtorinë e përdoruesve. Për shembull, kjo do të përdoret për për vetëplotësim përdoruesish të jashtëm për ndarje të federuar.",
- "Add server automatically once a federated share was created successfully" : "Shtoje vetvetiu shërbyesin pasi të jetë krijuar me sukses një ndarje e federuar",
- "Trusted ownCloud Servers" : "Shërbyes ownCloud të Besuar",
- "+ Add ownCloud server" : "+ Shtoni shërbyes ownCloud",
- "ownCloud Server" : "Shërbyes ownCloud"
+ "+ Add trusted server" : "+ Shto server-a të besuar",
+ "Trusted server" : "Server i besuar",
+ "Add" : "Shto"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/sr.js b/apps/federation/l10n/sr.js
index 4a0fad5ae4c..c50566e97d4 100644
--- a/apps/federation/l10n/sr.js
+++ b/apps/federation/l10n/sr.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Сервер додат на списак поверљивих оунКлауд сервера",
- "Server is already in the list of trusted servers." : "Сервер је већ на списку поверљивих сервера.",
- "No ownCloud server found" : "Ниједан оунКлауд сервер није нађен",
- "Could not add server" : "Не могох да додам сервер",
+ "Added to the list of trusted servers" : "Додат на листу сервера од поверења",
+ "No server found with ID: %s" : "Није пронађен сервер са ID: %s",
+ "Could not remove server" : "Сервер није могао да се уклони",
+ "Server is already in the list of trusted servers." : "Сервер је већ на списку сервера од поверења.",
+ "No server to federate with found" : "Није нађен сервер за здруживање",
+ "Could not add server" : "Неуспело додавање сервера",
+ "Trusted servers" : "Сервери од поверења",
"Federation" : "Здруживање",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "оунКлауд здруживање вам омогућује да се повежете са другим поверљивим оунКлауд серверима да бисте разменили кориснички директоријум. На пример, ово ће да се користи за аутоматско довршавање спољашњих корисника за здружено дељење.",
- "Add server automatically once a federated share was created successfully" : "Додај сервер аутоматски по успешном прављењу здруженог дељења",
- "Trusted ownCloud Servers" : "Поверљиви оунКлауд сервери",
- "+ Add ownCloud server" : "+ Додај оунКлауд сервер",
- "ownCloud Server" : "оунКлауд сервер"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога. На пример, ово ће се користити за аутоматско довршавање спољних налога када се врши федерисано дељење.",
+ "External documentation for Federated Cloud Sharing" : "Спољна документација за Здружено дељење у облаку",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога. На пример, ово ће се користити за аутоматско довршавање спољних налога када се врши федерисано дељење. Да би се креирало федерисано дељење, нема потребе да се сервер дода као сервер којем се верује.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Сваки сервер мора да потврди остале. За овај процес може бити потребно неколико cron циклуса.",
+ "+ Add trusted server" : "+ Додај сервер од поверења",
+ "Trusted server" : "Сервер од поверења",
+ "Add" : "Додај"
},
"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/federation/l10n/sr.json b/apps/federation/l10n/sr.json
index d821056fc62..329c7f1df41 100644
--- a/apps/federation/l10n/sr.json
+++ b/apps/federation/l10n/sr.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Сервер додат на списак поверљивих оунКлауд сервера",
- "Server is already in the list of trusted servers." : "Сервер је већ на списку поверљивих сервера.",
- "No ownCloud server found" : "Ниједан оунКлауд сервер није нађен",
- "Could not add server" : "Не могох да додам сервер",
+ "Added to the list of trusted servers" : "Додат на листу сервера од поверења",
+ "No server found with ID: %s" : "Није пронађен сервер са ID: %s",
+ "Could not remove server" : "Сервер није могао да се уклони",
+ "Server is already in the list of trusted servers." : "Сервер је већ на списку сервера од поверења.",
+ "No server to federate with found" : "Није нађен сервер за здруживање",
+ "Could not add server" : "Неуспело додавање сервера",
+ "Trusted servers" : "Сервери од поверења",
"Federation" : "Здруживање",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "оунКлауд здруживање вам омогућује да се повежете са другим поверљивим оунКлауд серверима да бисте разменили кориснички директоријум. На пример, ово ће да се користи за аутоматско довршавање спољашњих корисника за здружено дељење.",
- "Add server automatically once a federated share was created successfully" : "Додај сервер аутоматски по успешном прављењу здруженог дељења",
- "Trusted ownCloud Servers" : "Поверљиви оунКлауд сервери",
- "+ Add ownCloud server" : "+ Додај оунКлауд сервер",
- "ownCloud Server" : "оунКлауд сервер"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога. На пример, ово ће се користити за аутоматско довршавање спољних налога када се врши федерисано дељење.",
+ "External documentation for Federated Cloud Sharing" : "Спољна документација за Здружено дељење у облаку",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Федерисање вам омогућава да се повежете са другим серверима којима се верује и да размењујете директоријум налога. На пример, ово ће се користити за аутоматско довршавање спољних налога када се врши федерисано дељење. Да би се креирало федерисано дељење, нема потребе да се сервер дода као сервер којем се верује.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Сваки сервер мора да потврди остале. За овај процес може бити потребно неколико cron циклуса.",
+ "+ Add trusted server" : "+ Додај сервер од поверења",
+ "Trusted server" : "Сервер од поверења",
+ "Add" : "Додај"
},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/sv.js b/apps/federation/l10n/sv.js
index 7855084e268..ae2ff0bdb4c 100644
--- a/apps/federation/l10n/sv.js
+++ b/apps/federation/l10n/sv.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Servern är tillagd till listan över pålitliga ownCloud-servrar",
+ "Added to the list of trusted servers" : "Tillagd i listan med betrodda servrar",
+ "No server found with ID: %s" : "Ingen server hittades med ID: %s",
+ "Could not remove server" : "Kunde inte ta bort server",
"Server is already in the list of trusted servers." : "Servern finns redan i listan",
- "No ownCloud server found" : "Ingen ownCloud-server kunde hittas",
+ "No server to federate with found" : "Ingen server att federera med hittades",
"Could not add server" : "Kunde inte lägga till server",
- "Federation" : "Federerad delning",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "\"ownCloud Federation\" låter dig ansluta till andra pålitliga ownCloud-servrar för att dela användarkatalogen. Detta används t.ex. för att automatiskt fylla i externa användares namn när man delar över federerade ownCloud-servrar",
- "Add server automatically once a federated share was created successfully" : "Lägg till servern automatiskt så fort en lyckad federerad delning skapats",
- "Trusted ownCloud Servers" : "Pålitliga ownCloud-servrar",
- "+ Add ownCloud server" : "+ Lägg till ownCloud-server",
- "ownCloud Server" : "ownCloud-server"
+ "Trusted servers" : "Betrodda servrar",
+ "Federation" : "Federation",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation låter dig ansluta med andra betrodda servrar för att utbyta användarkatalogen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation låter dig ansluta till andra betrodda servrar för att utbyta användarkatalogen. Till exempel kommer detta användas för att auto-komplettera externa konton för federerad delning.",
+ "External documentation for Federated Cloud Sharing" : "Extern dokumentation för Federerad molndelning",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation låter dig ansluta till andra betrodda servrar för att utbyta användarkatalogen. Till exempel kommer detta användas för att auto-komplettera externa användare för federerad delning. Det är inte nödvändigt att lägga till en server som betrodd för att skapa en federerad delning.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Varje server måste validera den andra. Denna process kan kräva några cron-cykler.",
+ "+ Add trusted server" : "+ Lägg till betrodd server",
+ "Trusted server" : "Betrodd server",
+ "Add" : "Lägg till"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/sv.json b/apps/federation/l10n/sv.json
index c27008a5312..78448971d78 100644
--- a/apps/federation/l10n/sv.json
+++ b/apps/federation/l10n/sv.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Servern är tillagd till listan över pålitliga ownCloud-servrar",
+ "Added to the list of trusted servers" : "Tillagd i listan med betrodda servrar",
+ "No server found with ID: %s" : "Ingen server hittades med ID: %s",
+ "Could not remove server" : "Kunde inte ta bort server",
"Server is already in the list of trusted servers." : "Servern finns redan i listan",
- "No ownCloud server found" : "Ingen ownCloud-server kunde hittas",
+ "No server to federate with found" : "Ingen server att federera med hittades",
"Could not add server" : "Kunde inte lägga till server",
- "Federation" : "Federerad delning",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "\"ownCloud Federation\" låter dig ansluta till andra pålitliga ownCloud-servrar för att dela användarkatalogen. Detta används t.ex. för att automatiskt fylla i externa användares namn när man delar över federerade ownCloud-servrar",
- "Add server automatically once a federated share was created successfully" : "Lägg till servern automatiskt så fort en lyckad federerad delning skapats",
- "Trusted ownCloud Servers" : "Pålitliga ownCloud-servrar",
- "+ Add ownCloud server" : "+ Lägg till ownCloud-server",
- "ownCloud Server" : "ownCloud-server"
+ "Trusted servers" : "Betrodda servrar",
+ "Federation" : "Federation",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Federation låter dig ansluta med andra betrodda servrar för att utbyta användarkatalogen.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Federation låter dig ansluta till andra betrodda servrar för att utbyta användarkatalogen. Till exempel kommer detta användas för att auto-komplettera externa konton för federerad delning.",
+ "External documentation for Federated Cloud Sharing" : "Extern dokumentation för Federerad molndelning",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Federation låter dig ansluta till andra betrodda servrar för att utbyta användarkatalogen. Till exempel kommer detta användas för att auto-komplettera externa användare för federerad delning. Det är inte nödvändigt att lägga till en server som betrodd för att skapa en federerad delning.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Varje server måste validera den andra. Denna process kan kräva några cron-cykler.",
+ "+ Add trusted server" : "+ Lägg till betrodd server",
+ "Trusted server" : "Betrodd server",
+ "Add" : "Lägg till"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/sw.js b/apps/federation/l10n/sw.js
new file mode 100644
index 00000000000..4c09b59af82
--- /dev/null
+++ b/apps/federation/l10n/sw.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : " Imeongezwa kwenye orodha ya seva zinazoaminika",
+ "No server found with ID: %s" : "Hakuna seva iliyopatikana na kitambulisho: %s",
+ "Could not remove server" : "Isingeweza kuondoa seva",
+ "Server is already in the list of trusted servers." : "Seva tayari iko kwenye orodha ya seva zinazoaminika.",
+ "No server to federate with found" : "Hakuna seva ya kushirikiana na, iliyopatikana",
+ "Could not add server" : "Isingeweza kuongeza seva",
+ "Trusted servers" : "Seva zinazoaminiwa",
+ "Federation" : "Shirikisho",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti. Kwa mfano hii itatumika kukamilisha kiotomatiki akaunti za nje kwa ushiriki wa shirikisho.",
+ "External documentation for Federated Cloud Sharing" : "Hati za nje za Ushirikiano wa Nextcloud Ulioshirikishwa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti. Kwa mfano hii itatumika kukamilisha kiotomatiki akaunti za nje kwa kushiriki kwa shirikisho. Sio lazima kuongeza seva kama seva inayoaminika ili kuunda sehemu iliyoshirikishwa.",
+ "Each server must validate the other. This process may require a few cron cycles." : " Kila seva lazima ithibitishe nyingine. Mchakato huu unaweza kuhitaji mizunguko michache ya cron.",
+ "+ Add trusted server" : "+ ongeza seva inayoaminiwa",
+ "Trusted server" : "Seva inayoaminiwa",
+ "Add" : "Ongeza"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/sw.json b/apps/federation/l10n/sw.json
new file mode 100644
index 00000000000..6f9abc85cbc
--- /dev/null
+++ b/apps/federation/l10n/sw.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : " Imeongezwa kwenye orodha ya seva zinazoaminika",
+ "No server found with ID: %s" : "Hakuna seva iliyopatikana na kitambulisho: %s",
+ "Could not remove server" : "Isingeweza kuondoa seva",
+ "Server is already in the list of trusted servers." : "Seva tayari iko kwenye orodha ya seva zinazoaminika.",
+ "No server to federate with found" : "Hakuna seva ya kushirikiana na, iliyopatikana",
+ "Could not add server" : "Isingeweza kuongeza seva",
+ "Trusted servers" : "Seva zinazoaminiwa",
+ "Federation" : "Shirikisho",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti. Kwa mfano hii itatumika kukamilisha kiotomatiki akaunti za nje kwa ushiriki wa shirikisho.",
+ "External documentation for Federated Cloud Sharing" : "Hati za nje za Ushirikiano wa Nextcloud Ulioshirikishwa",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Shirikisho hukuruhusu kuunganishwa na seva zingine zinazoaminika ili kubadilishana saraka ya akaunti. Kwa mfano hii itatumika kukamilisha kiotomatiki akaunti za nje kwa kushiriki kwa shirikisho. Sio lazima kuongeza seva kama seva inayoaminika ili kuunda sehemu iliyoshirikishwa.",
+ "Each server must validate the other. This process may require a few cron cycles." : " Kila seva lazima ithibitishe nyingine. Mchakato huu unaweza kuhitaji mizunguko michache ya cron.",
+ "+ Add trusted server" : "+ ongeza seva inayoaminiwa",
+ "Trusted server" : "Seva inayoaminiwa",
+ "Add" : "Ongeza"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/th_TH.js b/apps/federation/l10n/th_TH.js
deleted file mode 100644
index 8aa63c8ca74..00000000000
--- a/apps/federation/l10n/th_TH.js
+++ /dev/null
@@ -1,11 +0,0 @@
-OC.L10N.register(
- "federation",
- {
- "Server added to the list of trusted ownClouds" : "เพิ่มเซิร์ฟเวอร์เข้าไปในรายการ ownClouds ที่น่าเชื่อถือ",
- "Server is already in the list of trusted servers." : "มีเซิร์ฟเวอร์นี้อยู่แล้วในรายการของเซิร์ฟเวอร์ที่เชื่อถือ",
- "No ownCloud server found" : "ไม่พบเซิร์ฟเวอร์ ownCloud",
- "Could not add server" : "ไม่สามารถเพิ่มเซิร์ฟเวอร์",
- "Federation" : "สหพันธ์",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "สหพันธ์ ownCloud ช่วยให้คุณสามารถเชื่อมต่อกับ ownCloud ที่น่าเชื่อถืออื่นๆ เพื่อแลกเปลี่ยนไดเรกทอรีของผู้ใช้ ตัวอย่างเช่น นี้จะถูกนำมาใช้กับผู้ใช้งานภายนอกโดยอัตโนมัติสำหรับการแชร์สหพันธ์"
-},
-"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/th_TH.json b/apps/federation/l10n/th_TH.json
deleted file mode 100644
index 49c8bad4192..00000000000
--- a/apps/federation/l10n/th_TH.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{ "translations": {
- "Server added to the list of trusted ownClouds" : "เพิ่มเซิร์ฟเวอร์เข้าไปในรายการ ownClouds ที่น่าเชื่อถือ",
- "Server is already in the list of trusted servers." : "มีเซิร์ฟเวอร์นี้อยู่แล้วในรายการของเซิร์ฟเวอร์ที่เชื่อถือ",
- "No ownCloud server found" : "ไม่พบเซิร์ฟเวอร์ ownCloud",
- "Could not add server" : "ไม่สามารถเพิ่มเซิร์ฟเวอร์",
- "Federation" : "สหพันธ์",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "สหพันธ์ ownCloud ช่วยให้คุณสามารถเชื่อมต่อกับ ownCloud ที่น่าเชื่อถืออื่นๆ เพื่อแลกเปลี่ยนไดเรกทอรีของผู้ใช้ ตัวอย่างเช่น นี้จะถูกนำมาใช้กับผู้ใช้งานภายนอกโดยอัตโนมัติสำหรับการแชร์สหพันธ์"
-},"pluralForm" :"nplurals=1; plural=0;"
-} \ No newline at end of file
diff --git a/apps/federation/l10n/tr.js b/apps/federation/l10n/tr.js
index 71e76bdec98..e8a0f31fe2b 100644
--- a/apps/federation/l10n/tr.js
+++ b/apps/federation/l10n/tr.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Sunucu güvenilen ownCloud sunucuları listesine eklendi",
+ "Added to the list of trusted servers" : "Güvenilen sunucular listesine eklendi",
+ "No server found with ID: %s" : "Şu kimlikle bir sunucu bulunamadı: %s",
+ "Could not remove server" : "Sunucu kaldırılamadı",
"Server is already in the list of trusted servers." : "Sunucu zaten güvenilen sunucu listesine eklenmiş.",
- "No ownCloud server found" : "Hiçbir ownCloud sunucusu bulunamadı",
+ "No server to federate with found" : "Birleştirilecek bir sunucu bulunamadı",
"Could not add server" : "Sunucu eklenemedi",
+ "Trusted servers" : "Güvenilen sunucular",
"Federation" : "Birleşim",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Birleşimi, kullanıcı dizin değişimi yapmak için diğer güvenilir ownCloud'larla bağlanmanızı sağlar. Örneğin, birleşmiş paylaşım için hatici kullanıcıları otomatik doldurmak için kullanılacaktır.",
- "Add server automatically once a federated share was created successfully" : "Birleşmiş bir paylaşım başarıyla eklenildiğinde sunucuyu otomatik olarak ekle",
- "Trusted ownCloud Servers" : "Güvenilen ownCloud Sunucuları",
- "+ Add ownCloud server" : "+ ownCloud sunucusu ekle",
- "ownCloud Server" : "ownCloud Sunucusu"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Birleşim, diğer güvenilen sunucularla bağlantı kurarak hesap dizininin paylaşılmasını sağlar.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Birleşik çalışma, diğer güvenilen sunucularla hesap dizininin paylaşılmasını sağlar. Örneğin, bu işlem birleşik paylaşım için dış hesapların otomatik olarak tamamlanmasını sağlar.",
+ "External documentation for Federated Cloud Sharing" : "Birleşik bulut paylaşımı belgeleri",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Birleşik çalışma, diğer güvenilen sunucularla hesap dizininin paylaşılmasını sağlar. Örneğin, bu işlem birleşik paylaşım için dış hesapların otomatik olarak tamamlanmasını sağlar. Bir birleşik çalışma oluşturmak için bir güvenilen sunucu eklenmesi gerekmez.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Her sunucunun diğerini doğrulaması gerekir. Bu işlemin tamamlanması için birkaç zamanlanmış görev döngüsünün geçilmesi gerekebilir.",
+ "+ Add trusted server" : "+ Güvenilen sunucu ekle",
+ "Trusted server" : "Güvenilen sunucu",
+ "Add" : "Ekle"
},
"nplurals=2; plural=(n > 1);");
diff --git a/apps/federation/l10n/tr.json b/apps/federation/l10n/tr.json
index 68f7b38218b..c0ed4ea0d74 100644
--- a/apps/federation/l10n/tr.json
+++ b/apps/federation/l10n/tr.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Sunucu güvenilen ownCloud sunucuları listesine eklendi",
+ "Added to the list of trusted servers" : "Güvenilen sunucular listesine eklendi",
+ "No server found with ID: %s" : "Şu kimlikle bir sunucu bulunamadı: %s",
+ "Could not remove server" : "Sunucu kaldırılamadı",
"Server is already in the list of trusted servers." : "Sunucu zaten güvenilen sunucu listesine eklenmiş.",
- "No ownCloud server found" : "Hiçbir ownCloud sunucusu bulunamadı",
+ "No server to federate with found" : "Birleştirilecek bir sunucu bulunamadı",
"Could not add server" : "Sunucu eklenemedi",
+ "Trusted servers" : "Güvenilen sunucular",
"Federation" : "Birleşim",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "ownCloud Birleşimi, kullanıcı dizin değişimi yapmak için diğer güvenilir ownCloud'larla bağlanmanızı sağlar. Örneğin, birleşmiş paylaşım için hatici kullanıcıları otomatik doldurmak için kullanılacaktır.",
- "Add server automatically once a federated share was created successfully" : "Birleşmiş bir paylaşım başarıyla eklenildiğinde sunucuyu otomatik olarak ekle",
- "Trusted ownCloud Servers" : "Güvenilen ownCloud Sunucuları",
- "+ Add ownCloud server" : "+ ownCloud sunucusu ekle",
- "ownCloud Server" : "ownCloud Sunucusu"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Birleşim, diğer güvenilen sunucularla bağlantı kurarak hesap dizininin paylaşılmasını sağlar.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Birleşik çalışma, diğer güvenilen sunucularla hesap dizininin paylaşılmasını sağlar. Örneğin, bu işlem birleşik paylaşım için dış hesapların otomatik olarak tamamlanmasını sağlar.",
+ "External documentation for Federated Cloud Sharing" : "Birleşik bulut paylaşımı belgeleri",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Birleşik çalışma, diğer güvenilen sunucularla hesap dizininin paylaşılmasını sağlar. Örneğin, bu işlem birleşik paylaşım için dış hesapların otomatik olarak tamamlanmasını sağlar. Bir birleşik çalışma oluşturmak için bir güvenilen sunucu eklenmesi gerekmez.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Her sunucunun diğerini doğrulaması gerekir. Bu işlemin tamamlanması için birkaç zamanlanmış görev döngüsünün geçilmesi gerekebilir.",
+ "+ Add trusted server" : "+ Güvenilen sunucu ekle",
+ "Trusted server" : "Güvenilen sunucu",
+ "Add" : "Ekle"
},"pluralForm" :"nplurals=2; plural=(n > 1);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/ug.js b/apps/federation/l10n/ug.js
new file mode 100644
index 00000000000..eee95bdf3c8
--- /dev/null
+++ b/apps/federation/l10n/ug.js
@@ -0,0 +1,17 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "ئىشەنچلىك مۇلازىمېتىرلار تىزىملىكىگە قوشۇلدى",
+ "Server is already in the list of trusted servers." : "مۇلازىمېتىر ئاللىقاچان ئىشەنچلىك مۇلازىمېتىرلار تىزىملىكىدە.",
+ "No server to federate with found" : "تېپىلغان مۇلازىمېتىر يوق",
+ "Could not add server" : "مۇلازىمېتىرنى قوشالمىدى",
+ "Trusted servers" : "ئىشەنچلىك مۇلازىمېتىرلار",
+ "Federation" : "فېدېراتسىيە",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز. مەسىلەن ، فېدېراتسىيە ئورتاقلىشىش ئۈچۈن تاشقى ھېساباتلارنى ئاپتوماتىك تاماملاشقا ئىشلىتىلىدۇ.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز. مەسىلەن ، فېدېراتسىيە ئورتاقلىشىش ئۈچۈن تاشقى ھېساباتلارنى ئاپتوماتىك تاماملاشقا ئىشلىتىلىدۇ. فېدېراتىپ ئورتاقلىشىش ئۈچۈن مۇلازىمېتىرنى ئىشەنچلىك مۇلازىمېتىر قىلىپ قوشۇشنىڭ ھاجىتى يوق.",
+ "+ Add trusted server" : "+ ئىشەنچلىك مۇلازىمېتىر قوشۇڭ",
+ "Trusted server" : "ئىشەنچلىك مۇلازىمېتىر",
+ "Add" : "قوش"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/ug.json b/apps/federation/l10n/ug.json
new file mode 100644
index 00000000000..796bdc4394b
--- /dev/null
+++ b/apps/federation/l10n/ug.json
@@ -0,0 +1,15 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "ئىشەنچلىك مۇلازىمېتىرلار تىزىملىكىگە قوشۇلدى",
+ "Server is already in the list of trusted servers." : "مۇلازىمېتىر ئاللىقاچان ئىشەنچلىك مۇلازىمېتىرلار تىزىملىكىدە.",
+ "No server to federate with found" : "تېپىلغان مۇلازىمېتىر يوق",
+ "Could not add server" : "مۇلازىمېتىرنى قوشالمىدى",
+ "Trusted servers" : "ئىشەنچلىك مۇلازىمېتىرلار",
+ "Federation" : "فېدېراتسىيە",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز. مەسىلەن ، فېدېراتسىيە ئورتاقلىشىش ئۈچۈن تاشقى ھېساباتلارنى ئاپتوماتىك تاماملاشقا ئىشلىتىلىدۇ.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "فېدېراتسىيە ھېسابات مۇندەرىجىسىنى ئالماشتۇرۇش ئۈچۈن باشقا ئىشەنچلىك مۇلازىمېتىرلار بىلەن ئۇلىنالايسىز. مەسىلەن ، فېدېراتسىيە ئورتاقلىشىش ئۈچۈن تاشقى ھېساباتلارنى ئاپتوماتىك تاماملاشقا ئىشلىتىلىدۇ. فېدېراتىپ ئورتاقلىشىش ئۈچۈن مۇلازىمېتىرنى ئىشەنچلىك مۇلازىمېتىر قىلىپ قوشۇشنىڭ ھاجىتى يوق.",
+ "+ Add trusted server" : "+ ئىشەنچلىك مۇلازىمېتىر قوشۇڭ",
+ "Trusted server" : "ئىشەنچلىك مۇلازىمېتىر",
+ "Add" : "قوش"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/uk.js b/apps/federation/l10n/uk.js
index 6837d75606c..adcd2ee732b 100644
--- a/apps/federation/l10n/uk.js
+++ b/apps/federation/l10n/uk.js
@@ -1,11 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "Сервер додано до переліку довірених серверів ownClouds",
+ "Added to the list of trusted servers" : "Сервер додано до списку довірених серверів",
+ "No server found with ID: %s" : "Не знайдено сервер з ідентифікатором: %s",
+ "Could not remove server" : "Не вдалося видалити сервер",
"Server is already in the list of trusted servers." : "Сервер вже знаходиться в переліку довірених серверів",
- "No ownCloud server found" : "Не знайдено сервер ownCloud",
+ "No server to federate with found" : "Не знайдено жодного сервера для об'єднання",
"Could not add server" : "Не вдалося додати сервер",
+ "Trusted servers" : "Довірені сервера",
"Federation" : "Об'єднання",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Об'єднання ownCloud дозволяє вам з'єднання з іншими довіреними серверами ownClouds для обміну директоріями користувачів. Наприклад це буде використовуватись для авто-доповнення зовнішніх користувачів до об'єднаних ресурсів обміну. "
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів. Так, це може бути корисно для автоматичної підстановки зовнішніх користувачів під час надання у спільний доступ ресурсів об'єднаних хмар.",
+ "External documentation for Federated Cloud Sharing" : "Документація з надання доступу у об'єднаних хмарах",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів. Так, це може бути корисно для автоматичної підстановки зовнішніх користувачів під час надання у спільний доступ ресурсів об'єднаних хмар. Необов'язково додавати сервер яко довірений для створення спільного ресурсу між об'єднаними хмарами.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Кожен сервер має підтвердити один одного. Цей процес може вимагати кількох циклів виконання cron.",
+ "+ Add trusted server" : "Додати довірений сервер",
+ "Trusted server" : "Довірений сервер",
+ "Add" : "Додати"
},
-"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
+"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);");
diff --git a/apps/federation/l10n/uk.json b/apps/federation/l10n/uk.json
index 6eb357d6284..97e4915bdf7 100644
--- a/apps/federation/l10n/uk.json
+++ b/apps/federation/l10n/uk.json
@@ -1,9 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "Сервер додано до переліку довірених серверів ownClouds",
+ "Added to the list of trusted servers" : "Сервер додано до списку довірених серверів",
+ "No server found with ID: %s" : "Не знайдено сервер з ідентифікатором: %s",
+ "Could not remove server" : "Не вдалося видалити сервер",
"Server is already in the list of trusted servers." : "Сервер вже знаходиться в переліку довірених серверів",
- "No ownCloud server found" : "Не знайдено сервер ownCloud",
+ "No server to federate with found" : "Не знайдено жодного сервера для об'єднання",
"Could not add server" : "Не вдалося додати сервер",
+ "Trusted servers" : "Довірені сервера",
"Federation" : "Об'єднання",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Об'єднання ownCloud дозволяє вам з'єднання з іншими довіреними серверами ownClouds для обміну директоріями користувачів. Наприклад це буде використовуватись для авто-доповнення зовнішніх користувачів до об'єднаних ресурсів обміну. "
-},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів.",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів. Так, це може бути корисно для автоматичної підстановки зовнішніх користувачів під час надання у спільний доступ ресурсів об'єднаних хмар.",
+ "External documentation for Federated Cloud Sharing" : "Документація з надання доступу у об'єднаних хмарах",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "Об'єднання хмар дозволяє з'єднуватися з іншими довіреними серверами й обмінюватися обліковими даними користувачів. Так, це може бути корисно для автоматичної підстановки зовнішніх користувачів під час надання у спільний доступ ресурсів об'єднаних хмар. Необов'язково додавати сервер яко довірений для створення спільного ресурсу між об'єднаними хмарами.",
+ "Each server must validate the other. This process may require a few cron cycles." : "Кожен сервер має підтвердити один одного. Цей процес може вимагати кількох циклів виконання cron.",
+ "+ Add trusted server" : "Додати довірений сервер",
+ "Trusted server" : "Довірений сервер",
+ "Add" : "Додати"
+},"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"
} \ No newline at end of file
diff --git a/apps/federation/l10n/vi.js b/apps/federation/l10n/vi.js
new file mode 100644
index 00000000000..6e3ccfb1243
--- /dev/null
+++ b/apps/federation/l10n/vi.js
@@ -0,0 +1,14 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "Đã thêm vào danh sách của các máy chủ được tin tưởng",
+ "Server is already in the list of trusted servers." : "Máy chủ đã ở trong danh sách của các máy chủ được tin tưởng",
+ "No server to federate with found" : "Không tìm thấy máy chủ để liên kết Liên Bang với",
+ "Could not add server" : "Không thể thêm máy chủ",
+ "Trusted servers" : "Các máy chủ được tin tưởng",
+ "Federation" : "Kết nối Liên Bang ",
+ "+ Add trusted server" : "+ Thêm máy chủ được tin cậy",
+ "Trusted server" : "Máy chủ được tin cậy",
+ "Add" : "Thêm"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/vi.json b/apps/federation/l10n/vi.json
new file mode 100644
index 00000000000..e4fb729c7b5
--- /dev/null
+++ b/apps/federation/l10n/vi.json
@@ -0,0 +1,12 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "Đã thêm vào danh sách của các máy chủ được tin tưởng",
+ "Server is already in the list of trusted servers." : "Máy chủ đã ở trong danh sách của các máy chủ được tin tưởng",
+ "No server to federate with found" : "Không tìm thấy máy chủ để liên kết Liên Bang với",
+ "Could not add server" : "Không thể thêm máy chủ",
+ "Trusted servers" : "Các máy chủ được tin tưởng",
+ "Federation" : "Kết nối Liên Bang ",
+ "+ Add trusted server" : "+ Thêm máy chủ được tin cậy",
+ "Trusted server" : "Máy chủ được tin cậy",
+ "Add" : "Thêm"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/zh_CN.js b/apps/federation/l10n/zh_CN.js
index a84f6350671..ac6b51d5659 100644
--- a/apps/federation/l10n/zh_CN.js
+++ b/apps/federation/l10n/zh_CN.js
@@ -1,15 +1,21 @@
OC.L10N.register(
"federation",
{
- "Server added to the list of trusted ownClouds" : "服务器已成功添加至信任服务器列表。",
- "Server is already in the list of trusted servers." : "服务器在线,并已成功添加至信任服务器列表。",
- "No ownCloud server found" : "没有找到对应服务器",
+ "Added to the list of trusted servers" : "添加到受信任服务器列表中",
+ "No server found with ID: %s" : "未找到此 ID 的服务器:%s",
+ "Could not remove server" : "无法移除服务器",
+ "Server is already in the list of trusted servers." : "服务器已在受信任服务器列表中。",
+ "No server to federate with found" : "没有找到联合云服务器",
"Could not add server" : "无法添加服务器",
- "Federation" : "联合",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "联合云系统使您可以方便快速的和其他用户共享文件。",
- "Add server automatically once a federated share was created successfully" : "一旦联合共享创建成功自动添加服务器",
- "Trusted ownCloud Servers" : "可信 ownCloud 服务器",
- "+ Add ownCloud server" : "+ 添加 ownCloud 服务器",
- "ownCloud Server" : "ownCloud 服务器"
+ "Trusted servers" : "受信任服务器",
+ "Federation" : "联合云",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "联合允许您与其他受信任的服务器连接以交换账号目录。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "联合云允许您与其他受信任的服务器连接以交换帐户目录。例如,这将用于自动完成联合云共享的外部帐户。",
+ "External documentation for Federated Cloud Sharing" : "联合云共享的外部文档",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "联合允许您与其他受信任的服务器连接以交换账号目录。例如,这将用于自动完成联合共享的外部账号。无需将服务器添加为受信任的服务器即可创建联合共享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每个服务器都必须验证其他服务器,此过程可能需要几个 cron 周期。",
+ "+ Add trusted server" : "+ 添加受信任服务器",
+ "Trusted server" : "受信任服务器",
+ "Add" : "添加"
},
"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/zh_CN.json b/apps/federation/l10n/zh_CN.json
index de8663eb7ab..8c53944acbf 100644
--- a/apps/federation/l10n/zh_CN.json
+++ b/apps/federation/l10n/zh_CN.json
@@ -1,13 +1,19 @@
{ "translations": {
- "Server added to the list of trusted ownClouds" : "服务器已成功添加至信任服务器列表。",
- "Server is already in the list of trusted servers." : "服务器在线,并已成功添加至信任服务器列表。",
- "No ownCloud server found" : "没有找到对应服务器",
+ "Added to the list of trusted servers" : "添加到受信任服务器列表中",
+ "No server found with ID: %s" : "未找到此 ID 的服务器:%s",
+ "Could not remove server" : "无法移除服务器",
+ "Server is already in the list of trusted servers." : "服务器已在受信任服务器列表中。",
+ "No server to federate with found" : "没有找到联合云服务器",
"Could not add server" : "无法添加服务器",
- "Federation" : "联合",
- "ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "联合云系统使您可以方便快速的和其他用户共享文件。",
- "Add server automatically once a federated share was created successfully" : "一旦联合共享创建成功自动添加服务器",
- "Trusted ownCloud Servers" : "可信 ownCloud 服务器",
- "+ Add ownCloud server" : "+ 添加 ownCloud 服务器",
- "ownCloud Server" : "ownCloud 服务器"
+ "Trusted servers" : "受信任服务器",
+ "Federation" : "联合云",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "联合允许您与其他受信任的服务器连接以交换账号目录。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "联合云允许您与其他受信任的服务器连接以交换帐户目录。例如,这将用于自动完成联合云共享的外部帐户。",
+ "External documentation for Federated Cloud Sharing" : "联合云共享的外部文档",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "联合允许您与其他受信任的服务器连接以交换账号目录。例如,这将用于自动完成联合共享的外部账号。无需将服务器添加为受信任的服务器即可创建联合共享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每个服务器都必须验证其他服务器,此过程可能需要几个 cron 周期。",
+ "+ Add trusted server" : "+ 添加受信任服务器",
+ "Trusted server" : "受信任服务器",
+ "Add" : "添加"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/apps/federation/l10n/zh_HK.js b/apps/federation/l10n/zh_HK.js
new file mode 100644
index 00000000000..573672c5211
--- /dev/null
+++ b/apps/federation/l10n/zh_HK.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "已加入信任伺服器清單",
+ "No server found with ID: %s" : "沒有找到此 ID 的伺服器:%s",
+ "Could not remove server" : "無法移除伺服器",
+ "Server is already in the list of trusted servers." : "伺服器已經在信任清單內",
+ "No server to federate with found" : "沒有找到可結盟的伺服器",
+ "Could not add server" : "無法加入伺服器",
+ "Trusted servers" : "信任的伺服器",
+ "Federation" : "聯盟",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。舉例來說,與其他雲端聯盟的帳戶分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳戶名稱。",
+ "External documentation for Federated Cloud Sharing" : "聯邦雲共享(Federated Cloud Sharing)的外部說明書",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。舉例來說,與其他雲端聯盟的用戶分享檔案時,有了這一份目錄,就可以在輸入框搜尋他們的帳戶名稱。不必將伺服器新增為受信任的伺服器就可以建立聯盟分享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每個伺服器必須彼此驗證。此過程可能需要幾個 cron 周期。",
+ "+ Add trusted server" : "+ 加入信任的伺服器",
+ "Trusted server" : "信任的伺服器",
+ "Add" : "新增"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/zh_HK.json b/apps/federation/l10n/zh_HK.json
new file mode 100644
index 00000000000..42b53588880
--- /dev/null
+++ b/apps/federation/l10n/zh_HK.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "已加入信任伺服器清單",
+ "No server found with ID: %s" : "沒有找到此 ID 的伺服器:%s",
+ "Could not remove server" : "無法移除伺服器",
+ "Server is already in the list of trusted servers." : "伺服器已經在信任清單內",
+ "No server to federate with found" : "沒有找到可結盟的伺服器",
+ "Could not add server" : "無法加入伺服器",
+ "Trusted servers" : "信任的伺服器",
+ "Federation" : "聯盟",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。舉例來說,與其他雲端聯盟的帳戶分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳戶名稱。",
+ "External documentation for Federated Cloud Sharing" : "聯邦雲共享(Federated Cloud Sharing)的外部說明書",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "聯盟功能允許您與信任的伺服器連結,交換帳戶目錄。舉例來說,與其他雲端聯盟的用戶分享檔案時,有了這一份目錄,就可以在輸入框搜尋他們的帳戶名稱。不必將伺服器新增為受信任的伺服器就可以建立聯盟分享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每個伺服器必須彼此驗證。此過程可能需要幾個 cron 周期。",
+ "+ Add trusted server" : "+ 加入信任的伺服器",
+ "Trusted server" : "信任的伺服器",
+ "Add" : "新增"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/federation/l10n/zh_TW.js b/apps/federation/l10n/zh_TW.js
new file mode 100644
index 00000000000..567713c353f
--- /dev/null
+++ b/apps/federation/l10n/zh_TW.js
@@ -0,0 +1,21 @@
+OC.L10N.register(
+ "federation",
+ {
+ "Added to the list of trusted servers" : "已加入信任伺服器清單",
+ "No server found with ID: %s" : "沒有找到此 ID 的伺服器:%s",
+ "Could not remove server" : "無法移除伺服器",
+ "Server is already in the list of trusted servers." : "伺服器已在信任清單內。",
+ "No server to federate with found" : "沒有找到可聯邦的伺服器",
+ "Could not add server" : "無法新增伺服器",
+ "Trusted servers" : "信任的伺服器",
+ "Federation" : "聯邦",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "聯盟功能允許您與信任的伺服器連結,交換帳號列表。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "聯盟功能允許您與信任的伺服器連結,交換帳號列表。舉例來說,與其他雲端聯盟的使用者分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳號名稱。",
+ "External documentation for Federated Cloud Sharing" : "聯邦雲端分享的外部文件",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "聯盟功能允許您與信任的伺服器連結,交換使用者列表。舉例來說,與其他雲端聯盟的帳號分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳號名稱。不必將伺服器新增為受信任的伺服器就可以建立聯盟分享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每個伺服器都必須驗證其他伺服器。這個過程可能需要幾個 cron 循環。",
+ "+ Add trusted server" : "+ 新增信任的伺服器",
+ "Trusted server" : "信任的伺服器",
+ "Add" : "新增"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/federation/l10n/zh_TW.json b/apps/federation/l10n/zh_TW.json
new file mode 100644
index 00000000000..e74ac19f36f
--- /dev/null
+++ b/apps/federation/l10n/zh_TW.json
@@ -0,0 +1,19 @@
+{ "translations": {
+ "Added to the list of trusted servers" : "已加入信任伺服器清單",
+ "No server found with ID: %s" : "沒有找到此 ID 的伺服器:%s",
+ "Could not remove server" : "無法移除伺服器",
+ "Server is already in the list of trusted servers." : "伺服器已在信任清單內。",
+ "No server to federate with found" : "沒有找到可聯邦的伺服器",
+ "Could not add server" : "無法新增伺服器",
+ "Trusted servers" : "信任的伺服器",
+ "Federation" : "聯邦",
+ "Federation allows you to connect with other trusted servers to exchange the account directory." : "聯盟功能允許您與信任的伺服器連結,交換帳號列表。",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing." : "聯盟功能允許您與信任的伺服器連結,交換帳號列表。舉例來說,與其他雲端聯盟的使用者分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳號名稱。",
+ "External documentation for Federated Cloud Sharing" : "聯邦雲端分享的外部文件",
+ "Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share." : "聯盟功能允許您與信任的伺服器連結,交換使用者列表。舉例來說,與其他雲端聯盟的帳號分享檔案時,有了這一份列表,就可以在輸入框搜尋他們的帳號名稱。不必將伺服器新增為受信任的伺服器就可以建立聯盟分享。",
+ "Each server must validate the other. This process may require a few cron cycles." : "每個伺服器都必須驗證其他伺服器。這個過程可能需要幾個 cron 循環。",
+ "+ Add trusted server" : "+ 新增信任的伺服器",
+ "Trusted server" : "信任的伺服器",
+ "Add" : "新增"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php
new file mode 100644
index 00000000000..358e3f68d50
--- /dev/null
+++ b/apps/federation/lib/AppInfo/Application.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\AppInfo;
+
+use OCA\DAV\Events\SabrePluginAuthInitEvent;
+use OCA\Federation\Listener\SabrePluginAuthInitListener;
+use OCP\AppFramework\App;
+use OCP\AppFramework\Bootstrap\IBootContext;
+use OCP\AppFramework\Bootstrap\IBootstrap;
+use OCP\AppFramework\Bootstrap\IRegistrationContext;
+
+class Application extends App implements IBootstrap {
+
+ /**
+ * @param array $urlParams
+ */
+ public function __construct($urlParams = []) {
+ parent::__construct('federation', $urlParams);
+ }
+
+ public function register(IRegistrationContext $context): void {
+ $context->registerEventListener(SabrePluginAuthInitEvent::class, SabrePluginAuthInitListener::class);
+ }
+
+ public function boot(IBootContext $context): void {
+ }
+}
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
new file mode 100644
index 00000000000..dc57db9fd62
--- /dev/null
+++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
@@ -0,0 +1,176 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\BackgroundJob;
+
+use GuzzleHttp\Exception\ClientException;
+use GuzzleHttp\Exception\RequestException;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\BackgroundJob\Job;
+use OCP\Http\Client\IClient;
+use OCP\Http\Client\IClientService;
+use OCP\Http\Client\IResponse;
+use OCP\IConfig;
+use OCP\IURLGenerator;
+use OCP\OCS\IDiscoveryService;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class GetSharedSecret
+ *
+ * Request shared secret from remote Nextcloud
+ *
+ * @package OCA\Federation\Backgroundjob
+ */
+class GetSharedSecret extends Job {
+ private IClient $httpClient;
+ protected bool $retainJob = false;
+ private string $defaultEndPoint = '/ocs/v2.php/apps/federation/api/v1/shared-secret';
+ /** 30 day = 2592000sec */
+ private int $maxLifespan = 2592000;
+
+ public function __construct(
+ IClientService $httpClientService,
+ private IURLGenerator $urlGenerator,
+ private IJobList $jobList,
+ private TrustedServers $trustedServers,
+ private LoggerInterface $logger,
+ private IDiscoveryService $ocsDiscoveryService,
+ ITimeFactory $timeFactory,
+ private IConfig $config,
+ ) {
+ parent::__construct($timeFactory);
+ $this->httpClient = $httpClientService->newClient();
+ }
+
+ /**
+ * Run the job, then remove it from the joblist
+ */
+ public function start(IJobList $jobList): void {
+ $target = $this->argument['url'];
+ // only execute if target is still in the list of trusted domains
+ if ($this->trustedServers->isTrustedServer($target)) {
+ $this->parentStart($jobList);
+ }
+
+ $jobList->remove($this, $this->argument);
+
+ if ($this->retainJob) {
+ $this->reAddJob($this->argument);
+ }
+ }
+
+ protected function parentStart(IJobList $jobList): void {
+ parent::start($jobList);
+ }
+
+ protected function run($argument) {
+ $target = $argument['url'];
+ $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime();
+ $currentTime = $this->time->getTime();
+ $source = $this->urlGenerator->getAbsoluteURL('/');
+ $source = rtrim($source, '/');
+ $token = $argument['token'];
+
+ // kill job after 30 days of trying
+ $deadline = $currentTime - $this->maxLifespan;
+ if ($created < $deadline) {
+ $this->logger->warning("The job to get the shared secret job is too old and gets stopped now without retention. Setting server status of '{$target}' to failure.");
+ $this->retainJob = false;
+ $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
+ return;
+ }
+
+ $endPoints = $this->ocsDiscoveryService->discover($target, 'FEDERATED_SHARING');
+ $endPoint = $endPoints['shared-secret'] ?? $this->defaultEndPoint;
+
+ // make sure that we have a well formatted url
+ $url = rtrim($target, '/') . '/' . trim($endPoint, '/');
+
+ $result = null;
+ try {
+ $result = $this->httpClient->get(
+ $url,
+ [
+ 'query' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => !$this->config->getSystemValue('sharing.federation.allowSelfSignedCertificates', false),
+ ]
+ );
+
+ $status = $result->getStatusCode();
+ } catch (ClientException $e) {
+ $status = $e->getCode();
+ if ($status === Http::STATUS_FORBIDDEN) {
+ $this->logger->info($target . ' refused to exchange a shared secret with you.');
+ } else {
+ $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage());
+ }
+ } catch (RequestException $e) {
+ $status = -1; // There is no status code if we could not connect
+ $this->logger->info('Could not connect to ' . $target, [
+ 'exception' => $e,
+ ]);
+ } catch (\Throwable $e) {
+ $status = Http::STATUS_INTERNAL_SERVER_ERROR;
+ $this->logger->error($e->getMessage(), [
+ 'exception' => $e,
+ ]);
+ }
+
+ // if we received a unexpected response we try again later
+ if (
+ $status !== Http::STATUS_OK
+ && $status !== Http::STATUS_FORBIDDEN
+ ) {
+ $this->retainJob = true;
+ }
+
+ if ($status === Http::STATUS_OK && $result instanceof IResponse) {
+ $body = $result->getBody();
+ $result = json_decode($body, true);
+ if (isset($result['ocs']['data']['sharedSecret'])) {
+ $this->trustedServers->addSharedSecret(
+ $target,
+ $result['ocs']['data']['sharedSecret']
+ );
+ } else {
+ $this->logger->error(
+ 'remote server "' . $target . '"" does not return a valid shared secret. Received data: ' . $body
+ );
+ $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
+ }
+ }
+ }
+
+ /**
+ * Re-add background job
+ *
+ * @param array $argument
+ */
+ protected function reAddJob(array $argument): void {
+ $url = $argument['url'];
+ $created = $argument['created'] ?? $this->time->getTime();
+ $token = $argument['token'];
+ $this->jobList->add(
+ GetSharedSecret::class,
+ [
+ 'url' => $url,
+ 'token' => $token,
+ 'created' => $created
+ ]
+ );
+ }
+}
diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
new file mode 100644
index 00000000000..4d57d1f6aef
--- /dev/null
+++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\BackgroundJob;
+
+use GuzzleHttp\Exception\ClientException;
+use GuzzleHttp\Exception\RequestException;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\BackgroundJob\Job;
+use OCP\Http\Client\IClient;
+use OCP\Http\Client\IClientService;
+use OCP\IConfig;
+use OCP\IURLGenerator;
+use OCP\OCS\IDiscoveryService;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class RequestSharedSecret
+ *
+ * Ask remote Nextcloud to request a sharedSecret from this server
+ *
+ * @package OCA\Federation\Backgroundjob
+ */
+class RequestSharedSecret extends Job {
+ private IClient $httpClient;
+
+ protected bool $retainJob = false;
+
+ private string $defaultEndPoint = '/ocs/v2.php/apps/federation/api/v1/request-shared-secret';
+
+ /** @var int 30 day = 2592000sec */
+ private int $maxLifespan = 2592000;
+
+ public function __construct(
+ IClientService $httpClientService,
+ private IURLGenerator $urlGenerator,
+ private IJobList $jobList,
+ private TrustedServers $trustedServers,
+ private IDiscoveryService $ocsDiscoveryService,
+ private LoggerInterface $logger,
+ ITimeFactory $timeFactory,
+ private IConfig $config,
+ ) {
+ parent::__construct($timeFactory);
+ $this->httpClient = $httpClientService->newClient();
+ }
+
+
+ /**
+ * run the job, then remove it from the joblist
+ */
+ public function start(IJobList $jobList): void {
+ $target = $this->argument['url'];
+ // only execute if target is still in the list of trusted domains
+ if ($this->trustedServers->isTrustedServer($target)) {
+ $this->parentStart($jobList);
+ }
+
+ $jobList->remove($this, $this->argument);
+
+ if ($this->retainJob) {
+ $this->reAddJob($this->argument);
+ }
+ }
+
+ /**
+ * Call start() method of parent
+ * Useful for unit tests
+ */
+ protected function parentStart(IJobList $jobList): void {
+ parent::start($jobList);
+ }
+
+ /**
+ * @param array $argument
+ * @return void
+ */
+ protected function run($argument) {
+ $target = $argument['url'];
+ $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime();
+ $currentTime = $this->time->getTime();
+ $source = $this->urlGenerator->getAbsoluteURL('/');
+ $source = rtrim($source, '/');
+ $token = $argument['token'];
+
+ // kill job after 30 days of trying
+ $deadline = $currentTime - $this->maxLifespan;
+ if ($created < $deadline) {
+ $this->logger->warning("The job to request the shared secret job is too old and gets stopped now without retention. Setting server status of '{$target}' to failure.");
+ $this->retainJob = false;
+ $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
+ return;
+ }
+
+ $endPoints = $this->ocsDiscoveryService->discover($target, 'FEDERATED_SHARING');
+ $endPoint = $endPoints['shared-secret'] ?? $this->defaultEndPoint;
+
+ // make sure that we have a well formatted url
+ $url = rtrim($target, '/') . '/' . trim($endPoint, '/');
+
+ try {
+ $result = $this->httpClient->post(
+ $url,
+ [
+ 'body' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => !$this->config->getSystemValue('sharing.federation.allowSelfSignedCertificates', false),
+ ]
+ );
+
+ $status = $result->getStatusCode();
+ } catch (ClientException $e) {
+ $status = $e->getCode();
+ if ($status === Http::STATUS_FORBIDDEN) {
+ $this->logger->info($target . ' refused to ask for a shared secret.');
+ } else {
+ $this->logger->info($target . ' responded with a ' . $status . ' containing: ' . $e->getMessage());
+ }
+ } catch (RequestException $e) {
+ $status = -1; // There is no status code if we could not connect
+ $this->logger->info('Could not connect to ' . $target);
+ } catch (\Throwable $e) {
+ $status = Http::STATUS_INTERNAL_SERVER_ERROR;
+ $this->logger->error($e->getMessage(), ['exception' => $e]);
+ }
+
+ // if we received a unexpected response we try again later
+ if (
+ $status !== Http::STATUS_OK
+ && ($status !== Http::STATUS_FORBIDDEN || $this->getAttempt($argument) < 5)
+ ) {
+ $this->retainJob = true;
+ }
+ }
+
+ /**
+ * re-add background job
+ */
+ protected function reAddJob(array $argument): void {
+ $url = $argument['url'];
+ $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime();
+ $token = $argument['token'];
+ $attempt = $this->getAttempt($argument) + 1;
+
+ $this->jobList->add(
+ RequestSharedSecret::class,
+ [
+ 'url' => $url,
+ 'token' => $token,
+ 'created' => $created,
+ 'attempt' => $attempt
+ ]
+ );
+ }
+
+ protected function getAttempt(array $argument): int {
+ return $argument['attempt'] ?? 0;
+ }
+}
diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php
new file mode 100644
index 00000000000..36cb99473f7
--- /dev/null
+++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Command;
+
+use OCA\Federation\SyncFederationAddressBooks as SyncService;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Helper\ProgressBar;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class SyncFederationAddressBooks extends Command {
+ public function __construct(
+ private SyncService $syncService,
+ ) {
+ parent::__construct();
+ }
+
+ protected function configure() {
+ $this
+ ->setName('federation:sync-addressbooks')
+ ->setDescription('Synchronizes addressbooks of all federated clouds');
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int {
+ $progress = new ProgressBar($output);
+ $progress->start();
+ $this->syncService->syncThemAll(function ($url, $ex) use ($progress, $output): void {
+ if ($ex instanceof \Exception) {
+ $output->writeln("Error while syncing $url : " . $ex->getMessage());
+ } else {
+ $progress->advance();
+ }
+ });
+
+ $progress->finish();
+ $output->writeln('');
+
+ return 0;
+ }
+}
diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php
new file mode 100644
index 00000000000..16b401be251
--- /dev/null
+++ b/apps/federation/lib/Controller/OCSAuthAPIController.php
@@ -0,0 +1,169 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Controller;
+
+use OCA\Federation\DbHandler;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\BruteForceProtection;
+use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
+use OCP\AppFramework\Http\Attribute\PublicPage;
+use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\OCS\OCSForbiddenException;
+use OCP\AppFramework\OCSController;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\IRequest;
+use OCP\Security\Bruteforce\IThrottler;
+use OCP\Security\ISecureRandom;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class OCSAuthAPI
+ *
+ * OCS API end-points to exchange shared secret between two connected Nextclouds
+ *
+ * @package OCA\Federation\Controller
+ */
+#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)]
+class OCSAuthAPIController extends OCSController {
+ public function __construct(
+ string $appName,
+ IRequest $request,
+ private ISecureRandom $secureRandom,
+ private IJobList $jobList,
+ private TrustedServers $trustedServers,
+ private DbHandler $dbHandler,
+ private LoggerInterface $logger,
+ private ITimeFactory $timeFactory,
+ private IThrottler $throttler,
+ ) {
+ parent::__construct($appName, $request);
+ }
+
+ /**
+ * Request received to ask remote server for a shared secret, for legacy end-points
+ *
+ * @param string $url URL of the server
+ * @param string $token Token of the server
+ * @return DataResponse<Http::STATUS_OK, list<empty>, array{}>
+ * @throws OCSForbiddenException Requesting shared secret is not allowed
+ *
+ * 200: Shared secret requested successfully
+ */
+ #[NoCSRFRequired]
+ #[PublicPage]
+ #[BruteForceProtection(action: 'federationSharedSecret')]
+ public function requestSharedSecretLegacy(string $url, string $token): DataResponse {
+ return $this->requestSharedSecret($url, $token);
+ }
+
+
+ /**
+ * Create shared secret and return it, for legacy end-points
+ *
+ * @param string $url URL of the server
+ * @param string $token Token of the server
+ * @return DataResponse<Http::STATUS_OK, array{sharedSecret: string}, array{}>
+ * @throws OCSForbiddenException Getting shared secret is not allowed
+ *
+ * 200: Shared secret returned
+ */
+ #[NoCSRFRequired]
+ #[PublicPage]
+ #[BruteForceProtection(action: 'federationSharedSecret')]
+ public function getSharedSecretLegacy(string $url, string $token): DataResponse {
+ return $this->getSharedSecret($url, $token);
+ }
+
+ /**
+ * Request received to ask remote server for a shared secret
+ *
+ * @param string $url URL of the server
+ * @param string $token Token of the server
+ * @return DataResponse<Http::STATUS_OK, list<empty>, array{}>
+ * @throws OCSForbiddenException Requesting shared secret is not allowed
+ *
+ * 200: Shared secret requested successfully
+ */
+ #[NoCSRFRequired]
+ #[PublicPage]
+ #[BruteForceProtection(action: 'federationSharedSecret')]
+ public function requestSharedSecret(string $url, string $token): DataResponse {
+ if ($this->trustedServers->isTrustedServer($url) === false) {
+ $this->throttler->registerAttempt('federationSharedSecret', $this->request->getRemoteAddress());
+ $this->logger->error('remote server not trusted (' . $url . ') while requesting shared secret');
+ throw new OCSForbiddenException();
+ }
+
+ // if both server initiated the exchange of the shared secret the greater
+ // token wins
+ $localToken = $this->dbHandler->getToken($url);
+ if (strcmp($localToken, $token) > 0) {
+ $this->logger->info(
+ 'remote server (' . $url . ') presented lower token. We will initiate the exchange of the shared secret.'
+ );
+ throw new OCSForbiddenException();
+ }
+
+ $this->jobList->add(
+ 'OCA\Federation\BackgroundJob\GetSharedSecret',
+ [
+ 'url' => $url,
+ 'token' => $token,
+ 'created' => $this->timeFactory->getTime()
+ ]
+ );
+
+ return new DataResponse();
+ }
+
+ /**
+ * Create shared secret and return it
+ *
+ * @param string $url URL of the server
+ * @param string $token Token of the server
+ * @return DataResponse<Http::STATUS_OK, array{sharedSecret: string}, array{}>
+ * @throws OCSForbiddenException Getting shared secret is not allowed
+ *
+ * 200: Shared secret returned
+ */
+ #[NoCSRFRequired]
+ #[PublicPage]
+ #[BruteForceProtection(action: 'federationSharedSecret')]
+ public function getSharedSecret(string $url, string $token): DataResponse {
+ if ($this->trustedServers->isTrustedServer($url) === false) {
+ $this->throttler->registerAttempt('federationSharedSecret', $this->request->getRemoteAddress());
+ $this->logger->error('remote server not trusted (' . $url . ') while getting shared secret');
+ throw new OCSForbiddenException();
+ }
+
+ if ($this->isValidToken($url, $token) === false) {
+ $this->throttler->registerAttempt('federationSharedSecret', $this->request->getRemoteAddress());
+ $expectedToken = $this->dbHandler->getToken($url);
+ $this->logger->error(
+ 'remote server (' . $url . ') didn\'t send a valid token (got "' . $token . '" but expected "' . $expectedToken . '") while getting shared secret'
+ );
+ throw new OCSForbiddenException();
+ }
+
+ $sharedSecret = $this->secureRandom->generate(32);
+
+ $this->trustedServers->addSharedSecret($url, $sharedSecret);
+
+ return new DataResponse([
+ 'sharedSecret' => $sharedSecret
+ ]);
+ }
+
+ protected function isValidToken(string $url, string $token): bool {
+ $storedToken = $this->dbHandler->getToken($url);
+ return hash_equals($storedToken, $token);
+ }
+}
diff --git a/apps/federation/lib/Controller/SettingsController.php b/apps/federation/lib/Controller/SettingsController.php
new file mode 100644
index 00000000000..27341eba815
--- /dev/null
+++ b/apps/federation/lib/Controller/SettingsController.php
@@ -0,0 +1,125 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Controller;
+
+use OCA\Federation\Settings\Admin;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\ApiRoute;
+use OCP\AppFramework\Http\Attribute\AuthorizedAdminSetting;
+use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\OCS\OCSException;
+use OCP\AppFramework\OCS\OCSNotFoundException;
+use OCP\AppFramework\OCSController;
+use OCP\IL10N;
+use OCP\IRequest;
+use Psr\Log\LoggerInterface;
+
+class SettingsController extends OCSController {
+ public function __construct(
+ string $AppName,
+ IRequest $request,
+ private IL10N $l,
+ private TrustedServers $trustedServers,
+ private LoggerInterface $logger,
+ ) {
+ parent::__construct($AppName, $request);
+ }
+
+
+ /**
+ * Add server to the list of trusted Nextcloud servers
+ *
+ * @param string $url The URL of the server to add
+ * @return DataResponse<Http::STATUS_OK, array{id: int, message: string, url: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND|Http::STATUS_CONFLICT, array{message: string}, array{}>
+ *
+ * 200: Server added successfully
+ * 404: Server not found at the given URL
+ * 409: Server is already in the list of trusted servers
+ */
+ #[AuthorizedAdminSetting(settings: Admin::class)]
+ #[ApiRoute(verb: 'POST', url: '/trusted-servers')]
+ public function addServer(string $url): DataResponse {
+ $this->checkServer(trim($url));
+
+ // Add the server to the list of trusted servers, all is well
+ $id = $this->trustedServers->addServer(trim($url));
+ return new DataResponse([
+ 'url' => $url,
+ 'id' => $id,
+ 'message' => $this->l->t('Added to the list of trusted servers')
+ ]);
+ }
+
+ /**
+ * Add server to the list of trusted Nextcloud servers
+ *
+ * @param int $id The ID of the trusted server to remove
+ * @return DataResponse<Http::STATUS_OK, array{id: int}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array{message: string}, array{}>
+ *
+ * 200: Server removed successfully
+ * 404: Server not found at the given ID
+ */
+ #[AuthorizedAdminSetting(settings: Admin::class)]
+ #[ApiRoute(verb: 'DELETE', url: '/trusted-servers/{id}', requirements: ['id' => '\d+'])]
+ public function removeServer(int $id): DataResponse {
+ try {
+ $this->trustedServers->getServer($id);
+ } catch (\Exception $e) {
+ throw new OCSNotFoundException($this->l->t('No server found with ID: %s', [$id]));
+ }
+
+ try {
+ $this->trustedServers->removeServer($id);
+ return new DataResponse(['id' => $id]);
+ } catch (\Exception $e) {
+ $this->logger->error($e->getMessage(), ['e' => $e]);
+ throw new OCSException($this->l->t('Could not remove server'), Http::STATUS_INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ /**
+ * List all trusted servers
+ *
+ * @return DataResponse<Http::STATUS_OK, list<array{id: int, status: int, url: string}>, array{}>
+ *
+ * 200: List of trusted servers
+ */
+ #[AuthorizedAdminSetting(settings: Admin::class)]
+ #[ApiRoute(verb: 'GET', url: '/trusted-servers')]
+ public function getServers(): DataResponse {
+ $servers = $this->trustedServers->getServers();
+
+ // obfuscate the shared secret
+ $servers = array_map(function ($server) {
+ return [
+ 'url' => $server['url'],
+ 'id' => $server['id'],
+ 'status' => $server['status'],
+ ];
+ }, $servers);
+
+ // return the list of trusted servers
+ return new DataResponse($servers);
+ }
+
+
+ /**
+ * Check if the server should be added to the list of trusted servers or not.
+ */
+ #[AuthorizedAdminSetting(settings: Admin::class)]
+ protected function checkServer(string $url): void {
+ if ($this->trustedServers->isTrustedServer($url) === true) {
+ throw new OCSException($this->l->t('Server is already in the list of trusted servers.'), Http::STATUS_CONFLICT);
+ }
+
+ if ($this->trustedServers->isNextcloudServer($url) === false) {
+ throw new OCSNotFoundException($this->l->t('No server to federate with found'));
+ }
+ }
+}
diff --git a/apps/federation/lib/DAV/FedAuth.php b/apps/federation/lib/DAV/FedAuth.php
new file mode 100644
index 00000000000..45bf422c104
--- /dev/null
+++ b/apps/federation/lib/DAV/FedAuth.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\DAV;
+
+use OCA\Federation\DbHandler;
+use OCP\Defaults;
+use Sabre\DAV\Auth\Backend\AbstractBasic;
+use Sabre\HTTP\RequestInterface;
+use Sabre\HTTP\ResponseInterface;
+
+class FedAuth extends AbstractBasic {
+
+ /**
+ * FedAuth constructor.
+ *
+ * @param DbHandler $db
+ */
+ public function __construct(
+ private DbHandler $db,
+ ) {
+ $this->principalPrefix = 'principals/system/';
+
+ // setup realm
+ $defaults = new Defaults();
+ $this->realm = $defaults->getName();
+ }
+
+ /**
+ * Validates a username and password
+ *
+ * This method should return true or false depending on if login
+ * succeeded.
+ *
+ * @param string $username
+ * @param string $password
+ * @return bool
+ */
+ protected function validateUserPass($username, $password) {
+ return $this->db->auth($username, $password);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function challenge(RequestInterface $request, ResponseInterface $response) {
+ }
+}
diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php
new file mode 100644
index 00000000000..877663b058a
--- /dev/null
+++ b/apps/federation/lib/DbHandler.php
@@ -0,0 +1,268 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors*
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation;
+
+use OC\Files\Filesystem;
+use OCP\DB\Exception as DBException;
+use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\HintException;
+use OCP\IDBConnection;
+use OCP\IL10N;
+
+/**
+ * Class DbHandler
+ *
+ * Handles all database calls for the federation app
+ *
+ * @todo Port to QBMapper
+ *
+ * @group DB
+ * @package OCA\Federation
+ */
+class DbHandler {
+ private string $dbTable = 'trusted_servers';
+
+ public function __construct(
+ private IDBConnection $connection,
+ private IL10N $IL10N,
+ ) {
+ }
+
+ /**
+ * Add server to the list of trusted servers
+ *
+ * @throws HintException
+ */
+ public function addServer(string $url): int {
+ $hash = $this->hash($url);
+ $url = rtrim($url, '/');
+ $query = $this->connection->getQueryBuilder();
+ $query->insert($this->dbTable)
+ ->values([
+ 'url' => $query->createParameter('url'),
+ 'url_hash' => $query->createParameter('url_hash'),
+ ])
+ ->setParameter('url', $url)
+ ->setParameter('url_hash', $hash);
+
+ $result = $query->executeStatement();
+
+ if ($result) {
+ return $query->getLastInsertId();
+ }
+
+ $message = 'Internal failure, Could not add trusted server: ' . $url;
+ $message_t = $this->IL10N->t('Could not add server');
+ throw new HintException($message, $message_t);
+ return -1;
+ }
+
+ /**
+ * Remove server from the list of trusted servers
+ */
+ public function removeServer(int $id): void {
+ $query = $this->connection->getQueryBuilder();
+ $query->delete($this->dbTable)
+ ->where($query->expr()->eq('id', $query->createParameter('id')))
+ ->setParameter('id', $id);
+ $query->executeStatement();
+ }
+
+ /**
+ * Get trusted server with given ID
+ *
+ * @return array{id: int, url: string, url_hash: string, token: ?string, shared_secret: ?string, status: int, sync_token: ?string}
+ * @throws \Exception
+ */
+ public function getServerById(int $id): array {
+ $query = $this->connection->getQueryBuilder();
+ $query->select('*')->from($this->dbTable)
+ ->where($query->expr()->eq('id', $query->createParameter('id')))
+ ->setParameter('id', $id, IQueryBuilder::PARAM_INT);
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+
+ if (empty($result)) {
+ throw new \Exception('No Server found with ID: ' . $id);
+ }
+
+ return $result[0];
+ }
+
+ /**
+ * Get all trusted servers
+ *
+ * @return list<array{id: int, url: string, url_hash: string, shared_secret: ?string, status: int, sync_token: ?string}>
+ * @throws DBException
+ */
+ public function getAllServer(): array {
+ $query = $this->connection->getQueryBuilder();
+ $query->select(['url', 'url_hash', 'id', 'status', 'shared_secret', 'sync_token'])
+ ->from($this->dbTable);
+ $statement = $query->executeQuery();
+ $result = $statement->fetchAll();
+ $statement->closeCursor();
+ return $result;
+ }
+
+ /**
+ * Check if server already exists in the database table
+ */
+ public function serverExists(string $url): bool {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->select('url')
+ ->from($this->dbTable)
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash);
+ $statement = $query->executeQuery();
+ $result = $statement->fetchAll();
+ $statement->closeCursor();
+
+ return !empty($result);
+ }
+
+ /**
+ * Write token to database. Token is used to exchange the secret
+ */
+ public function addToken(string $url, string $token): void {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->update($this->dbTable)
+ ->set('token', $query->createParameter('token'))
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash)
+ ->setParameter('token', $token);
+ $query->executeStatement();
+ }
+
+ /**
+ * Get token stored in database
+ * @throws \Exception
+ */
+ public function getToken(string $url): string {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->select('token')->from($this->dbTable)
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash);
+
+ $statement = $query->executeQuery();
+ $result = $statement->fetch();
+ $statement->closeCursor();
+
+ if (!isset($result['token'])) {
+ throw new \Exception('No token found for: ' . $url);
+ }
+
+ return $result['token'];
+ }
+
+ /**
+ * Add shared Secret to database
+ */
+ public function addSharedSecret(string $url, string $sharedSecret): void {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->update($this->dbTable)
+ ->set('shared_secret', $query->createParameter('sharedSecret'))
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash)
+ ->setParameter('sharedSecret', $sharedSecret);
+ $query->executeStatement();
+ }
+
+ /**
+ * Get shared secret from database
+ */
+ public function getSharedSecret(string $url): string {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->select('shared_secret')->from($this->dbTable)
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash);
+
+ $statement = $query->executeQuery();
+ $result = $statement->fetch();
+ $statement->closeCursor();
+ return (string)$result['shared_secret'];
+ }
+
+ /**
+ * Set server status
+ */
+ public function setServerStatus(string $url, int $status, ?string $token = null): void {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->update($this->dbTable)
+ ->set('status', $query->createNamedParameter($status))
+ ->where($query->expr()->eq('url_hash', $query->createNamedParameter($hash)));
+ if (!is_null($token)) {
+ $query->set('sync_token', $query->createNamedParameter($token));
+ }
+ $query->executeStatement();
+ }
+
+ /**
+ * Get server status
+ */
+ public function getServerStatus(string $url): int {
+ $hash = $this->hash($url);
+ $query = $this->connection->getQueryBuilder();
+ $query->select('status')->from($this->dbTable)
+ ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
+ ->setParameter('url_hash', $hash);
+
+ $statement = $query->executeQuery();
+ $result = $statement->fetch();
+ $statement->closeCursor();
+ return (int)$result['status'];
+ }
+
+ /**
+ * Create hash from URL
+ */
+ protected function hash(string $url): string {
+ $normalized = $this->normalizeUrl($url);
+ return sha1($normalized);
+ }
+
+ /**
+ * Normalize URL, used to create the sha1 hash
+ */
+ protected function normalizeUrl(string $url): string {
+ $normalized = $url;
+
+ if (strpos($url, 'https://') === 0) {
+ $normalized = substr($url, strlen('https://'));
+ } elseif (strpos($url, 'http://') === 0) {
+ $normalized = substr($url, strlen('http://'));
+ }
+
+ $normalized = Filesystem::normalizePath($normalized);
+ $normalized = trim($normalized, '/');
+
+ return $normalized;
+ }
+
+ public function auth(string $username, string $password): bool {
+ if ($username !== 'system') {
+ return false;
+ }
+ $query = $this->connection->getQueryBuilder();
+ $query->select('url')->from($this->dbTable)
+ ->where($query->expr()->eq('shared_secret', $query->createNamedParameter($password)));
+
+ $statement = $query->executeQuery();
+ $result = $statement->fetch();
+ $statement->closeCursor();
+ return !empty($result);
+ }
+}
diff --git a/apps/federation/lib/Listener/SabrePluginAuthInitListener.php b/apps/federation/lib/Listener/SabrePluginAuthInitListener.php
new file mode 100644
index 00000000000..514a893fb39
--- /dev/null
+++ b/apps/federation/lib/Listener/SabrePluginAuthInitListener.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\Federation\Listener;
+
+use OCA\DAV\Events\SabrePluginAuthInitEvent;
+use OCA\Federation\DAV\FedAuth;
+use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\IEventListener;
+use Sabre\DAV\Auth\Plugin;
+
+/**
+ * @since 20.0.0
+ * @template-implements IEventListener<SabrePluginAuthInitEvent>
+ */
+class SabrePluginAuthInitListener implements IEventListener {
+ public function __construct(
+ private FedAuth $fedAuth,
+ ) {
+ }
+
+ public function handle(Event $event): void {
+ if (!($event instanceof SabrePluginAuthInitEvent)) {
+ return;
+ }
+
+ $server = $event->getServer();
+ $authPlugin = $server->getPlugin('auth');
+ if ($authPlugin instanceof Plugin) {
+ $authPlugin->addBackend($this->fedAuth);
+ }
+ }
+}
diff --git a/apps/federation/lib/Migration/Version1010Date20200630191302.php b/apps/federation/lib/Migration/Version1010Date20200630191302.php
new file mode 100644
index 00000000000..c1a7c38cfc7
--- /dev/null
+++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php
@@ -0,0 +1,66 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\Federation\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1010Date20200630191302 extends SimpleMigrationStep {
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ if (!$schema->hasTable('trusted_servers')) {
+ $table = $schema->createTable('trusted_servers');
+ $table->addColumn('id', Types::INTEGER, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'length' => 4,
+ ]);
+ $table->addColumn('url', Types::STRING, [
+ 'notnull' => true,
+ 'length' => 512,
+ ]);
+ $table->addColumn('url_hash', Types::STRING, [
+ 'notnull' => true,
+ 'default' => '',
+ ]);
+ $table->addColumn('token', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 128,
+ ]);
+ $table->addColumn('shared_secret', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 256,
+ ]);
+ $table->addColumn('status', Types::INTEGER, [
+ 'notnull' => true,
+ 'length' => 4,
+ 'default' => 2,
+ ]);
+ $table->addColumn('sync_token', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 512,
+ ]);
+ $table->setPrimaryKey(['id']);
+ $table->addUniqueIndex(['url_hash'], 'url_hash');
+ }
+ return $schema;
+ }
+}
diff --git a/apps/federation/lib/Settings/Admin.php b/apps/federation/lib/Settings/Admin.php
new file mode 100644
index 00000000000..5cf5346bb85
--- /dev/null
+++ b/apps/federation/lib/Settings/Admin.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\Federation\Settings;
+
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IL10N;
+use OCP\Settings\IDelegatedSettings;
+
+class Admin implements IDelegatedSettings {
+ public function __construct(
+ private TrustedServers $trustedServers,
+ private IL10N $l,
+ ) {
+ }
+
+ /**
+ * @return TemplateResponse
+ */
+ public function getForm() {
+ $parameters = [
+ 'trustedServers' => $this->trustedServers->getServers(),
+ ];
+
+ return new TemplateResponse('federation', 'settings-admin', $parameters, '');
+ }
+
+ /**
+ * @return string the section ID, e.g. 'sharing'
+ */
+ public function getSection() {
+ return 'sharing';
+ }
+
+ /**
+ * @return int whether the form should be rather on the top or bottom of
+ * the admin section. The forms are arranged in ascending order of the
+ * priority values. It is required to return a value between 0 and 100.
+ *
+ * E.g.: 70
+ */
+ public function getPriority() {
+ return 30;
+ }
+
+ public function getName(): ?string {
+ return $this->l->t('Trusted servers');
+ }
+
+ public function getAuthorizedAppConfig(): array {
+ return []; // Handled by custom controller
+ }
+}
diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php
new file mode 100644
index 00000000000..d11f92b76ef
--- /dev/null
+++ b/apps/federation/lib/SyncFederationAddressBooks.php
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation;
+
+use OC\OCS\DiscoveryService;
+use OCA\DAV\CardDAV\SyncService;
+use OCP\AppFramework\Http;
+use OCP\OCS\IDiscoveryService;
+use Psr\Log\LoggerInterface;
+
+class SyncFederationAddressBooks {
+ private DiscoveryService $ocsDiscoveryService;
+
+ public function __construct(
+ protected DbHandler $dbHandler,
+ private SyncService $syncService,
+ IDiscoveryService $ocsDiscoveryService,
+ private LoggerInterface $logger,
+ ) {
+ $this->ocsDiscoveryService = $ocsDiscoveryService;
+ }
+
+ /**
+ * @param \Closure $callback
+ */
+ public function syncThemAll(\Closure $callback) {
+ $trustedServers = $this->dbHandler->getAllServer();
+ foreach ($trustedServers as $trustedServer) {
+ $url = $trustedServer['url'];
+ $callback($url, null);
+ $sharedSecret = $trustedServer['shared_secret'];
+ $oldSyncToken = $trustedServer['sync_token'];
+
+ $endPoints = $this->ocsDiscoveryService->discover($url, 'FEDERATED_SHARING');
+ $cardDavUser = $endPoints['carddav-user'] ?? 'system';
+ $addressBookUrl = isset($endPoints['system-address-book']) ? trim($endPoints['system-address-book'], '/') : 'remote.php/dav/addressbooks/system/system/system';
+
+ if (is_null($sharedSecret)) {
+ $this->logger->debug("Shared secret for $url is null");
+ continue;
+ }
+ $targetBookId = $trustedServer['url_hash'];
+ $targetPrincipal = 'principals/system/system';
+ $targetBookProperties = [
+ '{DAV:}displayname' => $url
+ ];
+
+ try {
+ $syncToken = $oldSyncToken;
+
+ do {
+ [$syncToken, $truncated] = $this->syncService->syncRemoteAddressBook(
+ $url,
+ $cardDavUser,
+ $addressBookUrl,
+ $sharedSecret,
+ $syncToken,
+ $targetBookId,
+ $targetPrincipal,
+ $targetBookProperties
+ );
+ } while ($truncated);
+
+ if ($syncToken !== $oldSyncToken) {
+ $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_OK, $syncToken);
+ } else {
+ $this->logger->debug("Sync Token for $url unchanged from previous sync");
+ // The server status might have been changed to a failure status in previous runs.
+ if ($this->dbHandler->getServerStatus($url) !== TrustedServers::STATUS_OK) {
+ $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_OK);
+ }
+ }
+ } catch (\Exception $ex) {
+ if ($ex->getCode() === Http::STATUS_UNAUTHORIZED) {
+ $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_ACCESS_REVOKED);
+ $this->logger->error("Server sync for $url failed because of revoked access.", [
+ 'exception' => $ex,
+ ]);
+ } else {
+ $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_FAILURE);
+ $this->logger->error("Server sync for $url failed.", [
+ 'exception' => $ex,
+ ]);
+ }
+ $callback($url, $ex);
+ }
+ }
+ }
+}
diff --git a/apps/federation/lib/SyncJob.php b/apps/federation/lib/SyncJob.php
new file mode 100644
index 00000000000..b802dfa9308
--- /dev/null
+++ b/apps/federation/lib/SyncJob.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation;
+
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
+use Psr\Log\LoggerInterface;
+
+class SyncJob extends TimedJob {
+ public function __construct(
+ protected SyncFederationAddressBooks $syncService,
+ protected LoggerInterface $logger,
+ ITimeFactory $timeFactory,
+ ) {
+ parent::__construct($timeFactory);
+ // Run once a day
+ $this->setInterval(24 * 60 * 60);
+ $this->setTimeSensitivity(self::TIME_INSENSITIVE);
+ }
+
+ protected function run($argument) {
+ $this->syncService->syncThemAll(function ($url, $ex): void {
+ if ($ex instanceof \Exception) {
+ $this->logger->error("Error while syncing $url.", [
+ 'exception' => $ex,
+ ]);
+ }
+ });
+ }
+}
diff --git a/apps/federation/lib/TrustedServers.php b/apps/federation/lib/TrustedServers.php
new file mode 100644
index 00000000000..3d15cfac448
--- /dev/null
+++ b/apps/federation/lib/TrustedServers.php
@@ -0,0 +1,209 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation;
+
+use OCA\Federation\BackgroundJob\RequestSharedSecret;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\DB\Exception;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\Events\TrustedServerRemovedEvent;
+use OCP\HintException;
+use OCP\Http\Client\IClientService;
+use OCP\IConfig;
+use OCP\Security\ISecureRandom;
+use Psr\Log\LoggerInterface;
+
+class TrustedServers {
+
+ /** after a user list was exchanged at least once successfully */
+ public const STATUS_OK = 1;
+ /** waiting for shared secret or initial user list exchange */
+ public const STATUS_PENDING = 2;
+ /** something went wrong, misconfigured server, software bug,... user interaction needed */
+ public const STATUS_FAILURE = 3;
+ /** remote server revoked access */
+ public const STATUS_ACCESS_REVOKED = 4;
+
+ /** @var list<array{id: int, url: string, url_hash: string, shared_secret: ?string, status: int, sync_token: ?string}>|null */
+ private ?array $trustedServersCache = null;
+
+ public function __construct(
+ private DbHandler $dbHandler,
+ private IClientService $httpClientService,
+ private LoggerInterface $logger,
+ private IJobList $jobList,
+ private ISecureRandom $secureRandom,
+ private IConfig $config,
+ private IEventDispatcher $dispatcher,
+ private ITimeFactory $timeFactory,
+ ) {
+ }
+
+ /**
+ * Add server to the list of trusted servers
+ */
+ public function addServer(string $url): int {
+ $url = $this->updateProtocol($url);
+ $result = $this->dbHandler->addServer($url);
+ if ($result) {
+ $token = $this->secureRandom->generate(16);
+ $this->dbHandler->addToken($url, $token);
+ $this->jobList->add(
+ RequestSharedSecret::class,
+ [
+ 'url' => $url,
+ 'token' => $token,
+ 'created' => $this->timeFactory->getTime()
+ ]
+ );
+ }
+
+ return $result;
+ }
+
+ /**
+ * Get shared secret for the given server
+ */
+ public function getSharedSecret(string $url): string {
+ return $this->dbHandler->getSharedSecret($url);
+ }
+
+ /**
+ * Add shared secret for the given server
+ */
+ public function addSharedSecret(string $url, string $sharedSecret): void {
+ $this->dbHandler->addSharedSecret($url, $sharedSecret);
+ }
+
+ /**
+ * Remove server from the list of trusted servers
+ */
+ public function removeServer(int $id): void {
+ $server = $this->dbHandler->getServerById($id);
+ $this->dbHandler->removeServer($id);
+ $this->dispatcher->dispatchTyped(new TrustedServerRemovedEvent($server['url_hash']));
+
+ }
+
+ /**
+ * Get all trusted servers
+ *
+ * @return list<array{id: int, url: string, url_hash: string, shared_secret: ?string, status: int, sync_token: ?string}>
+ * @throws \Exception
+ */
+ public function getServers(): ?array {
+ if ($this->trustedServersCache === null) {
+ $this->trustedServersCache = $this->dbHandler->getAllServer();
+ }
+ return $this->trustedServersCache;
+ }
+
+ /**
+ * Get a trusted server
+ *
+ * @return array{id: int, url: string, url_hash: string, shared_secret: ?string, status: int, sync_token: ?string}
+ * @throws Exception
+ */
+ public function getServer(int $id): ?array {
+ if ($this->trustedServersCache === null) {
+ $this->trustedServersCache = $this->dbHandler->getAllServer();
+ }
+
+ foreach ($this->trustedServersCache as $server) {
+ if ($server['id'] === $id) {
+ return $server;
+ }
+ }
+
+ throw new \Exception('No server found with ID: ' . $id);
+ }
+
+ /**
+ * Check if given server is a trusted Nextcloud server
+ */
+ public function isTrustedServer(string $url): bool {
+ return $this->dbHandler->serverExists($url);
+ }
+
+ /**
+ * Set server status
+ */
+ public function setServerStatus(string $url, int $status): void {
+ $this->dbHandler->setServerStatus($url, $status);
+ }
+
+ /**
+ * Get server status
+ */
+ public function getServerStatus(string $url): int {
+ return $this->dbHandler->getServerStatus($url);
+ }
+
+ /**
+ * Check if URL point to a ownCloud/Nextcloud server
+ */
+ public function isNextcloudServer(string $url): bool {
+ $isValidNextcloud = false;
+ $client = $this->httpClientService->newClient();
+ try {
+ $result = $client->get(
+ $url . '/status.php',
+ [
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => !$this->config->getSystemValue('sharing.federation.allowSelfSignedCertificates', false),
+ ]
+ );
+ if ($result->getStatusCode() === Http::STATUS_OK) {
+ $body = $result->getBody();
+ if (is_resource($body)) {
+ $body = stream_get_contents($body) ?: '';
+ }
+ $isValidNextcloud = $this->checkNextcloudVersion($body);
+ }
+ } catch (\Exception $e) {
+ $this->logger->error('No Nextcloud server.', [
+ 'exception' => $e,
+ ]);
+ return false;
+ }
+
+ return $isValidNextcloud;
+ }
+
+ /**
+ * Check if ownCloud/Nextcloud version is >= 9.0
+ * @throws HintException
+ */
+ protected function checkNextcloudVersion(string $status): bool {
+ $decoded = json_decode($status, true);
+ if (!empty($decoded) && isset($decoded['version'])) {
+ if (!version_compare($decoded['version'], '9.0.0', '>=')) {
+ throw new HintException('Remote server version is too low. 9.0 is required.');
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check if the URL contain a protocol, if not add https
+ */
+ protected function updateProtocol(string $url): string {
+ if (
+ strpos($url, 'https://') === 0
+ || strpos($url, 'http://') === 0
+ ) {
+ return $url;
+ }
+
+ return 'https://' . $url;
+ }
+}
diff --git a/apps/federation/lib/dbhandler.php b/apps/federation/lib/dbhandler.php
deleted file mode 100644
index 8720560efc6..00000000000
--- a/apps/federation/lib/dbhandler.php
+++ /dev/null
@@ -1,318 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation;
-
-
-use OC\Files\Filesystem;
-use OC\HintException;
-use OCP\IDBConnection;
-use OCP\IL10N;
-
-/**
- * Class DbHandler
- *
- * handles all database calls for the federation app
- *
- * @group DB
- * @package OCA\Federation
- */
-class DbHandler {
-
- /** @var IDBConnection */
- private $connection;
-
- /** @var IL10N */
- private $l;
-
- /** @var string */
- private $dbTable = 'trusted_servers';
-
- /**
- * @param IDBConnection $connection
- * @param IL10N $il10n
- */
- public function __construct(
- IDBConnection $connection,
- IL10N $il10n
- ) {
- $this->connection = $connection;
- $this->IL10N = $il10n;
- }
-
- /**
- * add server to the list of trusted ownCloud servers
- *
- * @param string $url
- * @return int
- * @throws HintException
- */
- public function addServer($url) {
- $hash = $this->hash($url);
- $url = rtrim($url, '/');
- $query = $this->connection->getQueryBuilder();
- $query->insert($this->dbTable)
- ->values(
- [
- 'url' => $query->createParameter('url'),
- 'url_hash' => $query->createParameter('url_hash'),
- ]
- )
- ->setParameter('url', $url)
- ->setParameter('url_hash', $hash);
-
- $result = $query->execute();
-
- if ($result) {
- return (int)$this->connection->lastInsertId('*PREFIX*'.$this->dbTable);
- } else {
- $message = 'Internal failure, Could not add ownCloud as trusted server: ' . $url;
- $message_t = $this->l->t('Could not add server');
- throw new HintException($message, $message_t);
- }
- }
-
- /**
- * remove server from the list of trusted ownCloud servers
- *
- * @param int $id
- */
- public function removeServer($id) {
- $query = $this->connection->getQueryBuilder();
- $query->delete($this->dbTable)
- ->where($query->expr()->eq('id', $query->createParameter('id')))
- ->setParameter('id', $id);
- $query->execute();
- }
-
- /**
- * get trusted server with given ID
- *
- * @param int $id
- * @return array
- * @throws \Exception
- */
- public function getServerById($id) {
- $query = $this->connection->getQueryBuilder();
- $query->select('*')->from($this->dbTable)
- ->where($query->expr()->eq('id', $query->createParameter('id')))
- ->setParameter('id', $id);
- $query->execute();
- $result = $query->execute()->fetchAll();
-
- if (empty($result)) {
- throw new \Exception('No Server found with ID: ' . $id);
- }
-
- return $result[0];
- }
-
- /**
- * get all trusted servers
- *
- * @return array
- */
- public function getAllServer() {
- $query = $this->connection->getQueryBuilder();
- $query->select(['url', 'url_hash', 'id', 'status', 'shared_secret', 'sync_token'])->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- return $result;
- }
-
- /**
- * check if server already exists in the database table
- *
- * @param string $url
- * @return bool
- */
- public function serverExists($url) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->select('url')->from($this->dbTable)
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash);
- $result = $query->execute()->fetchAll();
-
- return !empty($result);
- }
-
- /**
- * write token to database. Token is used to exchange the secret
- *
- * @param string $url
- * @param string $token
- */
- public function addToken($url, $token) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->update($this->dbTable)
- ->set('token', $query->createParameter('token'))
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash)
- ->setParameter('token', $token);
- $query->execute();
- }
-
- /**
- * get token stored in database
- *
- * @param string $url
- * @return string
- * @throws \Exception
- */
- public function getToken($url) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->select('token')->from($this->dbTable)
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash);
-
- $result = $query->execute()->fetch();
-
- if (!isset($result['token'])) {
- throw new \Exception('No token found for: ' . $url);
- }
-
- return $result['token'];
- }
-
- /**
- * add shared Secret to database
- *
- * @param string $url
- * @param string $sharedSecret
- */
- public function addSharedSecret($url, $sharedSecret) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->update($this->dbTable)
- ->set('shared_secret', $query->createParameter('sharedSecret'))
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash)
- ->setParameter('sharedSecret', $sharedSecret);
- $query->execute();
- }
-
- /**
- * get shared secret from database
- *
- * @param string $url
- * @return string
- */
- public function getSharedSecret($url) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->select('shared_secret')->from($this->dbTable)
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash);
-
- $result = $query->execute()->fetch();
- return $result['shared_secret'];
- }
-
- /**
- * set server status
- *
- * @param string $url
- * @param int $status
- * @param string|null $token
- */
- public function setServerStatus($url, $status, $token = null) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->update($this->dbTable)
- ->set('status', $query->createNamedParameter($status))
- ->where($query->expr()->eq('url_hash', $query->createNamedParameter($hash)));
- if (!is_null($token)) {
- $query->set('sync_token', $query->createNamedParameter($token));
- }
- $query->execute();
- }
-
- /**
- * get server status
- *
- * @param string $url
- * @return int
- */
- public function getServerStatus($url) {
- $hash = $this->hash($url);
- $query = $this->connection->getQueryBuilder();
- $query->select('status')->from($this->dbTable)
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash);
-
- $result = $query->execute()->fetch();
- return (int)$result['status'];
- }
-
- /**
- * create hash from URL
- *
- * @param string $url
- * @return string
- */
- protected function hash($url) {
- $normalized = $this->normalizeUrl($url);
- return sha1($normalized);
- }
-
- /**
- * normalize URL, used to create the sha1 hash
- *
- * @param string $url
- * @return string
- */
- protected function normalizeUrl($url) {
- $normalized = $url;
-
- if (strpos($url, 'https://') === 0) {
- $normalized = substr($url, strlen('https://'));
- } else if (strpos($url, 'http://') === 0) {
- $normalized = substr($url, strlen('http://'));
- }
-
- $normalized = Filesystem::normalizePath($normalized);
- $normalized = trim($normalized, '/');
-
- return $normalized;
- }
-
- /**
- * @param $username
- * @param $password
- * @return bool
- */
- public function auth($username, $password) {
- if ($username !== 'system') {
- return false;
- }
- $query = $this->connection->getQueryBuilder();
- $query->select('url')->from($this->dbTable)
- ->where($query->expr()->eq('shared_secret', $query->createNamedParameter($password)));
-
- $result = $query->execute()->fetch();
- return !empty($result);
- }
-
-}
diff --git a/apps/federation/lib/hooks.php b/apps/federation/lib/hooks.php
deleted file mode 100644
index b7f63d27f55..00000000000
--- a/apps/federation/lib/hooks.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation;
-
-
-
-class Hooks {
-
- /** @var TrustedServers */
- private $trustedServers;
-
- public function __construct(TrustedServers $trustedServers) {
- $this->trustedServers = $trustedServers;
- }
-
- /**
- * add servers to the list of trusted servers once a federated share was established
- *
- * @param array $params
- */
- public function addServerHook($params) {
- if (
- $this->trustedServers->getAutoAddServers() === true &&
- $this->trustedServers->isTrustedServer($params['server']) === false
- ) {
- $this->trustedServers->addServer($params['server']);
- }
- }
-
-}
diff --git a/apps/federation/lib/syncfederationaddressbooks.php b/apps/federation/lib/syncfederationaddressbooks.php
deleted file mode 100644
index 209094266ca..00000000000
--- a/apps/federation/lib/syncfederationaddressbooks.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OCA\Federation;
-
-use OCA\DAV\CardDAV\SyncService;
-use OCP\AppFramework\Http;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Helper\ProgressBar;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-class SyncFederationAddressBooks {
-
- /** @var DbHandler */
- protected $dbHandler;
-
- /** @var SyncService */
- private $syncService;
-
- /**
- * @param DbHandler $dbHandler
- * @param SyncService $syncService
- */
- function __construct(DbHandler $dbHandler, SyncService $syncService) {
- $this->syncService = $syncService;
- $this->dbHandler = $dbHandler;
- }
-
- /**
- * @param \Closure $callback
- */
- public function syncThemAll(\Closure $callback) {
-
- $trustedServers = $this->dbHandler->getAllServer();
- foreach ($trustedServers as $trustedServer) {
- $url = $trustedServer['url'];
- $callback($url, null);
- $sharedSecret = $trustedServer['shared_secret'];
- $syncToken = $trustedServer['sync_token'];
-
- if (is_null($sharedSecret)) {
- continue;
- }
- $targetBookId = $trustedServer['url_hash'];
- $targetPrincipal = "principals/system/system";
- $targetBookProperties = [
- '{DAV:}displayname' => $url
- ];
- try {
- $newToken = $this->syncService->syncRemoteAddressBook($url, 'system', $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetBookProperties);
- if ($newToken !== $syncToken) {
- $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_OK, $newToken);
- }
- } catch (\Exception $ex) {
- if ($ex->getCode() === Http::STATUS_UNAUTHORIZED) {
- $this->dbHandler->setServerStatus($url, TrustedServers::STATUS_ACCESS_REVOKED);
- }
- $callback($url, $ex);
- }
- }
- }
-}
diff --git a/apps/federation/lib/syncjob.php b/apps/federation/lib/syncjob.php
deleted file mode 100644
index 2b904813b92..00000000000
--- a/apps/federation/lib/syncjob.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Federation;
-
-use OC\BackgroundJob\TimedJob;
-use OCA\Federation\AppInfo\Application;
-
-class SyncJob extends TimedJob {
-
- public function __construct() {
- // Run once a day
- $this->setInterval(24 * 60 * 60);
- }
-
- protected function run($argument) {
- $app = new Application();
- $ss = $app->getSyncService();
- $ss->syncThemAll(function($url, $ex) {
- if ($ex instanceof \Exception) {
- \OC::$server->getLogger()->error("Error while syncing $url : " . $ex->getMessage(), ['app' => 'fed-sync']);
- }
- });
- }
-}
diff --git a/apps/federation/lib/trustedservers.php b/apps/federation/lib/trustedservers.php
deleted file mode 100644
index 3b356ea2a49..00000000000
--- a/apps/federation/lib/trustedservers.php
+++ /dev/null
@@ -1,270 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Roeland Jago Douma <rullzer@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation;
-
-use OC\HintException;
-use OCP\AppFramework\Http;
-use OCP\BackgroundJob\IJobList;
-use OCP\Http\Client\IClientService;
-use OCP\IConfig;
-use OCP\ILogger;
-use OCP\Security\ISecureRandom;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Symfony\Component\EventDispatcher\GenericEvent;
-
-class TrustedServers {
-
- /** after a user list was exchanged at least once successfully */
- const STATUS_OK = 1;
- /** waiting for shared secret or initial user list exchange */
- const STATUS_PENDING = 2;
- /** something went wrong, misconfigured server, software bug,... user interaction needed */
- const STATUS_FAILURE = 3;
- /** remote server revoked access */
- const STATUS_ACCESS_REVOKED = 4;
-
- /** @var dbHandler */
- private $dbHandler;
-
- /** @var IClientService */
- private $httpClientService;
-
- /** @var ILogger */
- private $logger;
-
- /** @var IJobList */
- private $jobList;
-
- /** @var ISecureRandom */
- private $secureRandom;
-
- /** @var IConfig */
- private $config;
-
- /** @var EventDispatcherInterface */
- private $dispatcher;
-
- /**
- * @param DbHandler $dbHandler
- * @param IClientService $httpClientService
- * @param ILogger $logger
- * @param IJobList $jobList
- * @param ISecureRandom $secureRandom
- * @param IConfig $config
- * @param EventDispatcherInterface $dispatcher
- */
- public function __construct(
- DbHandler $dbHandler,
- IClientService $httpClientService,
- ILogger $logger,
- IJobList $jobList,
- ISecureRandom $secureRandom,
- IConfig $config,
- EventDispatcherInterface $dispatcher
- ) {
- $this->dbHandler = $dbHandler;
- $this->httpClientService = $httpClientService;
- $this->logger = $logger;
- $this->jobList = $jobList;
- $this->secureRandom = $secureRandom;
- $this->config = $config;
- $this->dispatcher = $dispatcher;
- }
-
- /**
- * add server to the list of trusted ownCloud servers
- *
- * @param $url
- * @return int server id
- */
- public function addServer($url) {
- $url = $this->updateProtocol($url);
- $result = $this->dbHandler->addServer($url);
- if ($result) {
- $token = $this->secureRandom->generate(16);
- $this->dbHandler->addToken($url, $token);
- $this->jobList->add(
- 'OCA\Federation\BackgroundJob\RequestSharedSecret',
- [
- 'url' => $url,
- 'token' => $token
- ]
- );
- }
-
- return $result;
- }
-
- /**
- * enable/disable to automatically add servers to the list of trusted servers
- * once a federated share was created and accepted successfully
- *
- * @param bool $status
- */
- public function setAutoAddServers($status) {
- $value = $status ? '1' : '0';
- $this->config->setAppValue('federation', 'autoAddServers', $value);
- }
-
- /**
- * return if we automatically add servers to the list of trusted servers
- * once a federated share was created and accepted successfully
- *
- * @return bool
- */
- public function getAutoAddServers() {
- $value = $this->config->getAppValue('federation', 'autoAddServers', '1');
- return $value === '1';
- }
-
- /**
- * get shared secret for the given server
- *
- * @param string $url
- * @return string
- */
- public function getSharedSecret($url) {
- return $this->dbHandler->getSharedSecret($url);
- }
-
- /**
- * add shared secret for the given server
- *
- * @param string $url
- * @param $sharedSecret
- */
- public function addSharedSecret($url, $sharedSecret) {
- $this->dbHandler->addSharedSecret($url, $sharedSecret);
- }
-
- /**
- * remove server from the list of trusted ownCloud servers
- *
- * @param int $id
- */
- public function removeServer($id) {
- $server = $this->dbHandler->getServerById($id);
- $this->dbHandler->removeServer($id);
- $event = new GenericEvent($server['url_hash']);
- $this->dispatcher->dispatch('OCP\Federation\TrustedServerEvent::remove', $event);
- }
-
- /**
- * get all trusted servers
- *
- * @return array
- */
- public function getServers() {
- return $this->dbHandler->getAllServer();
- }
-
- /**
- * check if given server is a trusted ownCloud server
- *
- * @param string $url
- * @return bool
- */
- public function isTrustedServer($url) {
- return $this->dbHandler->serverExists($url);
- }
-
- /**
- * set server status
- *
- * @param string $url
- * @param int $status
- */
- public function setServerStatus($url, $status) {
- $this->dbHandler->setServerStatus($url, $status);
- }
-
- /**
- * @param string $url
- * @return int
- */
- public function getServerStatus($url) {
- return $this->dbHandler->getServerStatus($url);
- }
-
- /**
- * check if URL point to a ownCloud server
- *
- * @param string $url
- * @return bool
- */
- public function isOwnCloudServer($url) {
- $isValidOwnCloud = false;
- $client = $this->httpClientService->newClient();
- $result = $client->get(
- $url . '/status.php',
- [
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- );
- if ($result->getStatusCode() === Http::STATUS_OK) {
- $isValidOwnCloud = $this->checkOwnCloudVersion($result->getBody());
- }
-
- return $isValidOwnCloud;
- }
-
- /**
- * check if ownCloud version is >= 9.0
- *
- * @param $status
- * @return bool
- * @throws HintException
- */
- protected function checkOwnCloudVersion($status) {
- $decoded = json_decode($status, true);
- if (!empty($decoded) && isset($decoded['version'])) {
- if (!version_compare($decoded['version'], '9.0.0', '>=')) {
- throw new HintException('Remote server version is too low. ownCloud 9.0 is required.');
- }
- return true;
- }
- return false;
- }
-
- /**
- * check if the URL contain a protocol, if not add https
- *
- * @param string $url
- * @return string
- */
- protected function updateProtocol($url) {
- if (
- strpos($url, 'https://') === 0
- || strpos($url, 'http://') === 0
- ) {
-
- return $url;
-
- }
-
- return 'https://' . $url;
- }
-}
diff --git a/apps/federation/middleware/addservermiddleware.php b/apps/federation/middleware/addservermiddleware.php
deleted file mode 100644
index 15781251349..00000000000
--- a/apps/federation/middleware/addservermiddleware.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCA\Federation\Middleware ;
-
-use OC\HintException;
-use OCP\AppFramework\Http;
-use OCP\AppFramework\Http\JSONResponse;
-use OCP\AppFramework\Middleware;
-use OCP\IL10N;
-use OCP\ILogger;
-
-class AddServerMiddleware extends Middleware {
-
- /** @var string */
- protected $appName;
-
- /** @var IL10N */
- protected $l;
-
- /** @var ILogger */
- protected $logger;
-
- public function __construct($appName, IL10N $l, ILogger $logger) {
- $this->appName = $appName;
- $this->l = $l;
- $this->logger = $logger;
- }
-
- /**
- * Log error message and return a response which can be displayed to the user
- *
- * @param \OCP\AppFramework\Controller $controller
- * @param string $methodName
- * @param \Exception $exception
- * @return JSONResponse
- */
- public function afterException($controller, $methodName, \Exception $exception) {
- $this->logger->error($exception->getMessage(), ['app' => $this->appName]);
- if ($exception instanceof HintException) {
- $message = $exception->getHint();
- } else {
- $message = $exception->getMessage();
- }
-
- return new JSONResponse(
- ['message' => $message],
- Http::STATUS_BAD_REQUEST
- );
-
- }
-
-}
diff --git a/apps/federation/openapi-administration.json b/apps/federation/openapi-administration.json
new file mode 100644
index 00000000000..060e0826593
--- /dev/null
+++ b/apps/federation/openapi-administration.json
@@ -0,0 +1,431 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "federation-administration",
+ "version": "0.0.1",
+ "description": "Federation allows you to connect with other trusted servers to exchange the account directory.",
+ "license": {
+ "name": "agpl"
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "basic_auth": {
+ "type": "http",
+ "scheme": "basic"
+ },
+ "bearer_auth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ },
+ "schemas": {
+ "OCSMeta": {
+ "type": "object",
+ "required": [
+ "status",
+ "statuscode"
+ ],
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "statuscode": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ },
+ "totalitems": {
+ "type": "string"
+ },
+ "itemsperpage": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "paths": {
+ "/ocs/v2.php/apps/federation/trusted-servers": {
+ "post": {
+ "operationId": "settings-add-server",
+ "summary": "Add server to the list of trusted Nextcloud servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "The URL of the server to add"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Server added successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "id",
+ "message",
+ "url"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "message": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Server not found at the given URL",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "Server is already in the list of trusted servers",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "get": {
+ "operationId": "settings-get-servers",
+ "summary": "List all trusted servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of trusted servers",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "status",
+ "url"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "status": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/federation/trusted-servers/{id}": {
+ "delete": {
+ "operationId": "settings-remove-server",
+ "summary": "Add server to the list of trusted Nextcloud servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "The ID of the trusted server to remove",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Server removed successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Server not found at the given ID",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "ocs_authapi",
+ "description": "Class OCSAuthAPI OCS API end-points to exchange shared secret between two connected Nextclouds"
+ }
+ ]
+}
diff --git a/apps/federation/openapi-administration.json.license b/apps/federation/openapi-administration.json.license
new file mode 100644
index 00000000000..5dcb9c9e84b
--- /dev/null
+++ b/apps/federation/openapi-administration.json.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later \ No newline at end of file
diff --git a/apps/federation/openapi-federation.json b/apps/federation/openapi-federation.json
new file mode 100644
index 00000000000..beb66fcfcd6
--- /dev/null
+++ b/apps/federation/openapi-federation.json
@@ -0,0 +1,511 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "federation-federation",
+ "version": "0.0.1",
+ "description": "Federation allows you to connect with other trusted servers to exchange the account directory.",
+ "license": {
+ "name": "agpl"
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "basic_auth": {
+ "type": "http",
+ "scheme": "basic"
+ },
+ "bearer_auth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ },
+ "schemas": {
+ "OCSMeta": {
+ "type": "object",
+ "required": [
+ "status",
+ "statuscode"
+ ],
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "statuscode": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ },
+ "totalitems": {
+ "type": "string"
+ },
+ "itemsperpage": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "paths": {
+ "/ocs/v2.php/apps/federation/api/v1/shared-secret": {
+ "get": {
+ "operationId": "ocs_authapi-get-shared-secret-legacy",
+ "summary": "Create shared secret and return it, for legacy end-points",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "url",
+ "in": "query",
+ "description": "URL of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "token",
+ "in": "query",
+ "description": "Token of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret returned",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "sharedSecret"
+ ],
+ "properties": {
+ "sharedSecret": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Getting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/federation/api/v1/request-shared-secret": {
+ "post": {
+ "operationId": "ocs_authapi-request-shared-secret-legacy",
+ "summary": "Request received to ask remote server for a shared secret, for legacy end-points",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url",
+ "token"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "URL of the server"
+ },
+ "token": {
+ "type": "string",
+ "description": "Token of the server"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret requested successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Requesting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/cloud/shared-secret": {
+ "get": {
+ "operationId": "ocs_authapi-get-shared-secret",
+ "summary": "Create shared secret and return it",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "url",
+ "in": "query",
+ "description": "URL of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "token",
+ "in": "query",
+ "description": "Token of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret returned",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "sharedSecret"
+ ],
+ "properties": {
+ "sharedSecret": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Getting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "operationId": "ocs_authapi-request-shared-secret",
+ "summary": "Request received to ask remote server for a shared secret",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url",
+ "token"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "URL of the server"
+ },
+ "token": {
+ "type": "string",
+ "description": "Token of the server"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret requested successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Requesting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "ocs_authapi",
+ "description": "Class OCSAuthAPI OCS API end-points to exchange shared secret between two connected Nextclouds"
+ }
+ ]
+}
diff --git a/apps/federation/openapi-federation.json.license b/apps/federation/openapi-federation.json.license
new file mode 100644
index 00000000000..5dcb9c9e84b
--- /dev/null
+++ b/apps/federation/openapi-federation.json.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later \ No newline at end of file
diff --git a/apps/federation/openapi-full.json b/apps/federation/openapi-full.json
new file mode 100644
index 00000000000..c9a9e3ccf81
--- /dev/null
+++ b/apps/federation/openapi-full.json
@@ -0,0 +1,885 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "federation-full",
+ "version": "0.0.1",
+ "description": "Federation allows you to connect with other trusted servers to exchange the account directory.",
+ "license": {
+ "name": "agpl"
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "basic_auth": {
+ "type": "http",
+ "scheme": "basic"
+ },
+ "bearer_auth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ },
+ "schemas": {
+ "OCSMeta": {
+ "type": "object",
+ "required": [
+ "status",
+ "statuscode"
+ ],
+ "properties": {
+ "status": {
+ "type": "string"
+ },
+ "statuscode": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ },
+ "totalitems": {
+ "type": "string"
+ },
+ "itemsperpage": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "paths": {
+ "/ocs/v2.php/apps/federation/api/v1/shared-secret": {
+ "get": {
+ "operationId": "ocs_authapi-get-shared-secret-legacy",
+ "summary": "Create shared secret and return it, for legacy end-points",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "url",
+ "in": "query",
+ "description": "URL of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "token",
+ "in": "query",
+ "description": "Token of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret returned",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "sharedSecret"
+ ],
+ "properties": {
+ "sharedSecret": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Getting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/federation/api/v1/request-shared-secret": {
+ "post": {
+ "operationId": "ocs_authapi-request-shared-secret-legacy",
+ "summary": "Request received to ask remote server for a shared secret, for legacy end-points",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url",
+ "token"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "URL of the server"
+ },
+ "token": {
+ "type": "string",
+ "description": "Token of the server"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret requested successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Requesting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/cloud/shared-secret": {
+ "get": {
+ "operationId": "ocs_authapi-get-shared-secret",
+ "summary": "Create shared secret and return it",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "url",
+ "in": "query",
+ "description": "URL of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "token",
+ "in": "query",
+ "description": "Token of the server",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret returned",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "sharedSecret"
+ ],
+ "properties": {
+ "sharedSecret": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Getting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "operationId": "ocs_authapi-request-shared-secret",
+ "summary": "Request received to ask remote server for a shared secret",
+ "tags": [
+ "ocs_authapi"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url",
+ "token"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "URL of the server"
+ },
+ "token": {
+ "type": "string",
+ "description": "Token of the server"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Shared secret requested successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Requesting shared secret is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/federation/trusted-servers": {
+ "post": {
+ "operationId": "settings-add-server",
+ "summary": "Add server to the list of trusted Nextcloud servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "url"
+ ],
+ "properties": {
+ "url": {
+ "type": "string",
+ "description": "The URL of the server to add"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Server added successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "id",
+ "message",
+ "url"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "message": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Server not found at the given URL",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "Server is already in the list of trusted servers",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "get": {
+ "operationId": "settings-get-servers",
+ "summary": "List all trusted servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of trusted servers",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "status",
+ "url"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "status": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/federation/trusted-servers/{id}": {
+ "delete": {
+ "operationId": "settings-remove-server",
+ "summary": "Add server to the list of trusted Nextcloud servers",
+ "description": "This endpoint requires admin access",
+ "tags": [
+ "settings"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "The ID of the trusted server to remove",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Server removed successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Server not found at the given ID",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "ocs_authapi",
+ "description": "Class OCSAuthAPI OCS API end-points to exchange shared secret between two connected Nextclouds"
+ }
+ ]
+}
diff --git a/apps/federation/openapi-full.json.license b/apps/federation/openapi-full.json.license
new file mode 100644
index 00000000000..5dcb9c9e84b
--- /dev/null
+++ b/apps/federation/openapi-full.json.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later \ No newline at end of file
diff --git a/apps/federation/settings/settings-admin.php b/apps/federation/settings/settings-admin.php
deleted file mode 100644
index a41d815feb8..00000000000
--- a/apps/federation/settings/settings-admin.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-\OC_Util::checkAdminUser();
-
-$template = new OCP\Template('federation', 'settings-admin');
-
-$dbHandler = new \OCA\Federation\DbHandler(
- \OC::$server->getDatabaseConnection(),
- \OC::$server->getL10N('federation')
-);
-
-$trustedServers = new \OCA\Federation\TrustedServers(
- $dbHandler,
- \OC::$server->getHTTPClientService(),
- \OC::$server->getLogger(),
- \OC::$server->getJobList(),
- \OC::$server->getSecureRandom(),
- \OC::$server->getConfig(),
- \OC::$server->getEventDispatcher()
-);
-
-$template->assign('trustedServers', $trustedServers->getServers());
-$template->assign('autoAddServers', $trustedServers->getAutoAddServers());
-
-return $template->fetchPage();
diff --git a/apps/federation/templates/settings-admin.php b/apps/federation/templates/settings-admin.php
index 704fc9a9ace..857a8b23e37 100644
--- a/apps/federation/templates/settings-admin.php
+++ b/apps/federation/templates/settings-admin.php
@@ -1,44 +1,64 @@
<?php
-/** @var array $_ */
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
use OCA\Federation\TrustedServers;
+use OCP\IL10N;
+use OCP\IURLGenerator;
+use OCP\Server;
+use OCP\Util;
+
+/** @var IL10N $l */
+
+Util::addScript('federation', 'settings-admin');
+Util::addStyle('federation', 'settings-admin');
-/** @var OC_L10N $l */
-script('federation', 'settings-admin');
-style('federation', 'settings-admin')
+$urlGenerator = Server::get(IURLGenerator::class);
+$documentationLink = $urlGenerator->linkToDocs('admin-sharing-federated') . '#configuring-trusted-nextcloud-servers';
+$documentationLabel = $l->t('External documentation for Federated Cloud Sharing');
?>
<div id="ocFederationSettings" class="section">
- <h2><?php p($l->t('Federation')); ?></h2>
- <em><?php p($l->t('ownCloud Federation allows you to connect with other trusted ownClouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.')); ?></em>
+ <h2>
+ <?php p($l->t('Trusted servers')); ?>
+ <a target="_blank" rel="noreferrer noopener" class="icon-info"
+ title="<?php p($documentationLabel);?>"
+ href="<?php p($documentationLink); ?>"></a>
+ </h2>
+ <p class="settings-hint"><?php p($l->t('Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.')); ?></p>
+ <p class="settings-hint"><?php p($l->t('Each server must validate the other. This process may require a few cron cycles.')); ?></p>
- <p>
- <input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) p('checked'); ?> />
- <label for="autoAddServers"><?php p($l->t('Add server automatically once a federated share was created successfully')); ?></label>
- </p>
-
- <h3><?php p($l->t('Trusted ownCloud Servers')); ?></h3>
- <p id="ocFederationAddServer">
- <button id="ocFederationAddServerButton" class=""><?php p($l->t('+ Add ownCloud server')); ?></button>
- <input id="serverUrl" class="hidden" type="text" value="" placeholder="<?php p($l->t('ownCloud Server')); ?>" name="server_url"/>
- <span class="msg"></span>
- </p>
<ul id="listOfTrustedServers">
- <?php foreach($_['trustedServers'] as $trustedServer) { ?>
- <li id="<?php p($trustedServer['id']); ?>" class="icon-delete">
- <?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
+ <?php foreach ($_['trustedServers'] as $trustedServer) { ?>
+ <li id="<?php p($trustedServer['id']); ?>">
+ <?php if ((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?>
<span class="status success"></span>
<?php
- } elseif(
- (int)$trustedServer['status'] === TrustedServers::STATUS_PENDING ||
- (int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
+ } elseif (
+ (int)$trustedServer['status'] === TrustedServers::STATUS_PENDING
+ || (int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED
) { ?>
<span class="status indeterminate"></span>
<?php } else {?>
<span class="status error"></span>
<?php } ?>
<?php p($trustedServer['url']); ?>
+ <span class="icon icon-delete"></span>
</li>
<?php } ?>
</ul>
+ <div id="ocFederationAddServer">
+ <button id="ocFederationAddServerButton"><?php p($l->t('+ Add trusted server')); ?></button>
+ <div class="serverUrl hidden">
+ <div class="serverUrl-block">
+ <label for="serverUrl"><?php p($l->t('Trusted server')); ?></label>
+ <input id="serverUrl" type="text" value="" placeholder="<?php p($l->t('Trusted server')); ?>" name="server_url"/>
+ <button id="ocFederationSubmit" class="hidden"><?php p($l->t('Add')); ?></button>
+ </div>
+ <span class="msg"></span>
+ </div>
+ </div>
</div>
-
diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
new file mode 100644
index 00000000000..943bdf352de
--- /dev/null
+++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
@@ -0,0 +1,262 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests\BackgroundJob;
+
+use GuzzleHttp\Exception\ConnectException;
+use OCA\Federation\BackgroundJob\GetSharedSecret;
+use OCA\Federation\TrustedServers;
+use OCA\Files_Sharing\Tests\TestCase;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\Http\Client\IClient;
+use OCP\Http\Client\IClientService;
+use OCP\Http\Client\IResponse;
+use OCP\IConfig;
+use OCP\IURLGenerator;
+use OCP\OCS\IDiscoveryService;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class GetSharedSecretTest
+ *
+ * @group DB
+ *
+ * @package OCA\Federation\Tests\BackgroundJob
+ */
+class GetSharedSecretTest extends TestCase {
+
+ private MockObject&IClient $httpClient;
+ private MockObject&IClientService $httpClientService;
+ private MockObject&IJobList $jobList;
+ private MockObject&IURLGenerator $urlGenerator;
+ private MockObject&TrustedServers $trustedServers;
+ private MockObject&LoggerInterface $logger;
+ private MockObject&IResponse $response;
+ private MockObject&IDiscoveryService $discoverService;
+ private MockObject&ITimeFactory $timeFactory;
+ private MockObject&IConfig $config;
+
+ private GetSharedSecret $getSharedSecret;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->httpClientService = $this->createMock(IClientService::class);
+ $this->httpClient = $this->getMockBuilder(IClient::class)->getMock();
+ $this->jobList = $this->getMockBuilder(IJobList::class)->getMock();
+ $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock();
+ $this->trustedServers = $this->getMockBuilder(TrustedServers::class)
+ ->disableOriginalConstructor()->getMock();
+ $this->logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
+ $this->response = $this->getMockBuilder(IResponse::class)->getMock();
+ $this->discoverService = $this->getMockBuilder(IDiscoveryService::class)->getMock();
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->config = $this->createMock(IConfig::class);
+
+ $this->discoverService->expects($this->any())->method('discover')->willReturn([]);
+ $this->httpClientService->expects($this->any())->method('newClient')->willReturn($this->httpClient);
+
+ $this->getSharedSecret = new GetSharedSecret(
+ $this->httpClientService,
+ $this->urlGenerator,
+ $this->jobList,
+ $this->trustedServers,
+ $this->logger,
+ $this->discoverService,
+ $this->timeFactory,
+ $this->config,
+ );
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestExecute')]
+ public function testExecute(bool $isTrustedServer, bool $retainBackgroundJob): void {
+ /** @var GetSharedSecret&MockObject $getSharedSecret */
+ $getSharedSecret = $this->getMockBuilder(GetSharedSecret::class)
+ ->setConstructorArgs(
+ [
+ $this->httpClientService,
+ $this->urlGenerator,
+ $this->jobList,
+ $this->trustedServers,
+ $this->logger,
+ $this->discoverService,
+ $this->timeFactory,
+ $this->config,
+ ]
+ )
+ ->onlyMethods(['parentStart'])
+ ->getMock();
+ self::invokePrivate($getSharedSecret, 'argument', [['url' => 'url', 'token' => 'token']]);
+
+ $this->trustedServers->expects($this->once())->method('isTrustedServer')
+ ->with('url')->willReturn($isTrustedServer);
+ if ($isTrustedServer) {
+ $getSharedSecret->expects($this->once())->method('parentStart');
+ } else {
+ $getSharedSecret->expects($this->never())->method('parentStart');
+ }
+ self::invokePrivate($getSharedSecret, 'retainJob', [$retainBackgroundJob]);
+ $this->jobList->expects($this->once())->method('remove');
+
+ $this->timeFactory->method('getTime')->willReturn(42);
+
+ if ($retainBackgroundJob) {
+ $this->jobList->expects($this->once())
+ ->method('add')
+ ->with(
+ GetSharedSecret::class,
+ [
+ 'url' => 'url',
+ 'token' => 'token',
+ 'created' => 42,
+ ]
+ );
+ } else {
+ $this->jobList->expects($this->never())->method('add');
+ }
+
+ $getSharedSecret->start($this->jobList);
+ }
+
+ public static function dataTestExecute(): array {
+ return [
+ [true, true],
+ [true, false],
+ [false, false],
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestRun')]
+ public function testRun(int $statusCode): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+
+ $argument = ['url' => $target, 'token' => $token];
+
+ $this->timeFactory->method('getTime')
+ ->willReturn(42);
+
+ $this->urlGenerator->expects($this->once())->method('getAbsoluteURL')->with('/')
+ ->willReturn($source);
+ $this->httpClient->expects($this->once())->method('get')
+ ->with(
+ $target . '/ocs/v2.php/apps/federation/api/v1/shared-secret',
+ [
+ 'query' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => true,
+ ]
+ )->willReturn($this->response);
+
+ $this->response->expects($this->once())->method('getStatusCode')
+ ->willReturn($statusCode);
+
+ if ($statusCode === Http::STATUS_OK) {
+ $this->response->expects($this->once())->method('getBody')
+ ->willReturn('{"ocs":{"data":{"sharedSecret":"secret"}}}');
+ $this->trustedServers->expects($this->once())->method('addSharedSecret')
+ ->with($target, 'secret');
+ } else {
+ $this->trustedServers->expects($this->never())->method('addSharedSecret');
+ }
+
+ self::invokePrivate($this->getSharedSecret, 'run', [$argument]);
+ if (
+ $statusCode !== Http::STATUS_OK
+ && $statusCode !== Http::STATUS_FORBIDDEN
+ ) {
+ $this->assertTrue(self::invokePrivate($this->getSharedSecret, 'retainJob'));
+ } else {
+ $this->assertFalse(self::invokePrivate($this->getSharedSecret, 'retainJob'));
+ }
+ }
+
+ public static function dataTestRun(): array {
+ return [
+ [Http::STATUS_OK],
+ [Http::STATUS_FORBIDDEN],
+ [Http::STATUS_CONFLICT],
+ ];
+ }
+
+ public function testRunExpired(): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+ $created = 42;
+
+ $argument = [
+ 'url' => $target,
+ 'token' => $token,
+ 'created' => $created,
+ ];
+
+ $this->urlGenerator->expects($this->once())
+ ->method('getAbsoluteURL')
+ ->with('/')
+ ->willReturn($source);
+
+ $this->timeFactory->method('getTime')
+ ->willReturn($created + 2592000 + 1);
+
+ $this->trustedServers->expects($this->once())
+ ->method('setServerStatus')
+ ->with(
+ $target,
+ TrustedServers::STATUS_FAILURE
+ );
+
+ self::invokePrivate($this->getSharedSecret, 'run', [$argument]);
+ }
+
+ public function testRunConnectionError(): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+
+ $argument = ['url' => $target, 'token' => $token];
+
+ $this->timeFactory->method('getTime')
+ ->willReturn(42);
+
+ $this->urlGenerator
+ ->expects($this->once())
+ ->method('getAbsoluteURL')
+ ->with('/')
+ ->willReturn($source);
+ $this->httpClient->expects($this->once())->method('get')
+ ->with(
+ $target . '/ocs/v2.php/apps/federation/api/v1/shared-secret',
+ [
+ 'query' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => true,
+ ]
+ )->willThrowException($this->createMock(ConnectException::class));
+
+ $this->trustedServers->expects($this->never())->method('addSharedSecret');
+
+ self::invokePrivate($this->getSharedSecret, 'run', [$argument]);
+
+ $this->assertTrue(self::invokePrivate($this->getSharedSecret, 'retainJob'));
+ }
+}
diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
new file mode 100644
index 00000000000..6ef579c7483
--- /dev/null
+++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
@@ -0,0 +1,243 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests\BackgroundJob;
+
+use GuzzleHttp\Exception\ConnectException;
+use OCA\Federation\BackgroundJob\RequestSharedSecret;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\Http\Client\IClient;
+use OCP\Http\Client\IClientService;
+use OCP\Http\Client\IResponse;
+use OCP\IConfig;
+use OCP\IURLGenerator;
+use OCP\OCS\IDiscoveryService;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+use Test\TestCase;
+
+class RequestSharedSecretTest extends TestCase {
+ private IClientService&MockObject $httpClientService;
+ private IClient&MockObject $httpClient;
+ private IJobList&MockObject $jobList;
+ private IURLGenerator&MockObject $urlGenerator;
+ private TrustedServers&MockObject $trustedServers;
+ private IResponse&MockObject $response;
+ private IDiscoveryService&MockObject $discoveryService;
+ private LoggerInterface&MockObject $logger;
+ private ITimeFactory&MockObject $timeFactory;
+ private IConfig&MockObject $config;
+ private RequestSharedSecret $requestSharedSecret;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->httpClientService = $this->createMock(IClientService::class);
+ $this->httpClient = $this->createMock(IClient::class);
+ $this->jobList = $this->createMock(IJobList::class);
+ $this->urlGenerator = $this->createMock(IURLGenerator::class);
+ $this->trustedServers = $this->createMock(TrustedServers::class);
+ $this->response = $this->createMock(IResponse::class);
+ $this->discoveryService = $this->createMock(IDiscoveryService::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->config = $this->createMock(IConfig::class);
+
+ $this->discoveryService->expects($this->any())->method('discover')->willReturn([]);
+ $this->httpClientService->expects($this->any())->method('newClient')->willReturn($this->httpClient);
+
+ $this->requestSharedSecret = new RequestSharedSecret(
+ $this->httpClientService,
+ $this->urlGenerator,
+ $this->jobList,
+ $this->trustedServers,
+ $this->discoveryService,
+ $this->logger,
+ $this->timeFactory,
+ $this->config,
+ );
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestStart')]
+ public function testStart(bool $isTrustedServer, bool $retainBackgroundJob): void {
+ /** @var RequestSharedSecret&MockObject $requestSharedSecret */
+ $requestSharedSecret = $this->getMockBuilder(RequestSharedSecret::class)
+ ->setConstructorArgs(
+ [
+ $this->httpClientService,
+ $this->urlGenerator,
+ $this->jobList,
+ $this->trustedServers,
+ $this->discoveryService,
+ $this->logger,
+ $this->timeFactory,
+ $this->config,
+ ]
+ )
+ ->onlyMethods(['parentStart'])
+ ->getMock();
+ self::invokePrivate($requestSharedSecret, 'argument', [['url' => 'url', 'token' => 'token']]);
+
+ $this->trustedServers->expects($this->once())->method('isTrustedServer')
+ ->with('url')->willReturn($isTrustedServer);
+ if ($isTrustedServer) {
+ $requestSharedSecret->expects($this->once())->method('parentStart');
+ } else {
+ $requestSharedSecret->expects($this->never())->method('parentStart');
+ }
+ self::invokePrivate($requestSharedSecret, 'retainJob', [$retainBackgroundJob]);
+ $this->jobList->expects($this->once())->method('remove');
+
+ $this->timeFactory->method('getTime')->willReturn(42);
+
+ if ($retainBackgroundJob) {
+ $this->jobList->expects($this->once())
+ ->method('add')
+ ->with(
+ RequestSharedSecret::class,
+ [
+ 'url' => 'url',
+ 'token' => 'token',
+ 'created' => 42,
+ 'attempt' => 1,
+ ]
+ );
+ } else {
+ $this->jobList->expects($this->never())->method('add');
+ }
+
+ $requestSharedSecret->start($this->jobList);
+ }
+
+ public static function dataTestStart(): array {
+ return [
+ [true, true],
+ [true, false],
+ [false, false],
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestRun')]
+ public function testRun(int $statusCode, int $attempt = 0): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+
+ $argument = ['url' => $target, 'token' => $token, 'attempt' => $attempt];
+
+ $this->timeFactory->method('getTime')->willReturn(42);
+
+ $this->urlGenerator->expects($this->once())->method('getAbsoluteURL')->with('/')
+ ->willReturn($source);
+ $this->httpClient->expects($this->once())->method('post')
+ ->with(
+ $target . '/ocs/v2.php/apps/federation/api/v1/request-shared-secret',
+ [
+ 'body' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => true,
+ ]
+ )->willReturn($this->response);
+
+ $this->response->expects($this->once())->method('getStatusCode')
+ ->willReturn($statusCode);
+
+ self::invokePrivate($this->requestSharedSecret, 'run', [$argument]);
+ if (
+ $statusCode !== Http::STATUS_OK
+ && ($statusCode !== Http::STATUS_FORBIDDEN || $attempt < 5)
+ ) {
+ $this->assertTrue(self::invokePrivate($this->requestSharedSecret, 'retainJob'));
+ } else {
+ $this->assertFalse(self::invokePrivate($this->requestSharedSecret, 'retainJob'));
+ }
+ }
+
+ public static function dataTestRun(): array {
+ return [
+ [Http::STATUS_OK],
+ [Http::STATUS_FORBIDDEN, 5],
+ [Http::STATUS_FORBIDDEN],
+ [Http::STATUS_CONFLICT],
+ ];
+ }
+
+ public function testRunExpired(): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+ $created = 42;
+
+ $argument = [
+ 'url' => $target,
+ 'token' => $token,
+ 'created' => $created,
+ ];
+
+ $this->urlGenerator->expects($this->once())
+ ->method('getAbsoluteURL')
+ ->with('/')
+ ->willReturn($source);
+
+ $this->timeFactory->method('getTime')
+ ->willReturn($created + 2592000 + 1);
+
+ $this->trustedServers->expects($this->once())
+ ->method('setServerStatus')
+ ->with(
+ $target,
+ TrustedServers::STATUS_FAILURE
+ );
+
+ self::invokePrivate($this->requestSharedSecret, 'run', [$argument]);
+ }
+
+ public function testRunConnectionError(): void {
+ $target = 'targetURL';
+ $source = 'sourceURL';
+ $token = 'token';
+
+ $argument = ['url' => $target, 'token' => $token];
+
+ $this->timeFactory->method('getTime')->willReturn(42);
+
+ $this->urlGenerator
+ ->expects($this->once())
+ ->method('getAbsoluteURL')
+ ->with('/')
+ ->willReturn($source);
+
+ $this->httpClient
+ ->expects($this->once())
+ ->method('post')
+ ->with(
+ $target . '/ocs/v2.php/apps/federation/api/v1/request-shared-secret',
+ [
+ 'body' => [
+ 'url' => $source,
+ 'token' => $token,
+ 'format' => 'json',
+ ],
+ 'timeout' => 3,
+ 'connect_timeout' => 3,
+ 'verify' => true,
+ ]
+ )->willThrowException($this->createMock(ConnectException::class));
+
+ self::invokePrivate($this->requestSharedSecret, 'run', [$argument]);
+ $this->assertTrue(self::invokePrivate($this->requestSharedSecret, 'retainJob'));
+ }
+}
diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
new file mode 100644
index 00000000000..a054277c5cd
--- /dev/null
+++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
@@ -0,0 +1,167 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests\Controller;
+
+use OC\BackgroundJob\JobList;
+use OCA\Federation\BackgroundJob\GetSharedSecret;
+use OCA\Federation\Controller\OCSAuthAPIController;
+use OCA\Federation\DbHandler;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\OCS\OCSForbiddenException;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\IRequest;
+use OCP\Security\Bruteforce\IThrottler;
+use OCP\Security\ISecureRandom;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+use Test\TestCase;
+
+class OCSAuthAPIControllerTest extends TestCase {
+ private IRequest&MockObject $request;
+ private ISecureRandom&MockObject $secureRandom;
+ private JobList&MockObject $jobList;
+ private TrustedServers&MockObject $trustedServers;
+ private DbHandler&MockObject $dbHandler;
+ private LoggerInterface&MockObject $logger;
+ private ITimeFactory&MockObject $timeFactory;
+ private IThrottler&MockObject $throttler;
+ private OCSAuthAPIController $ocsAuthApi;
+
+ /** @var int simulated timestamp */
+ private int $currentTime = 1234567;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->request = $this->createMock(IRequest::class);
+ $this->secureRandom = $this->createMock(ISecureRandom::class);
+ $this->trustedServers = $this->createMock(TrustedServers::class);
+ $this->dbHandler = $this->createMock(DbHandler::class);
+ $this->jobList = $this->createMock(JobList::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->throttler = $this->createMock(IThrottler::class);
+
+ $this->ocsAuthApi = new OCSAuthAPIController(
+ 'federation',
+ $this->request,
+ $this->secureRandom,
+ $this->jobList,
+ $this->trustedServers,
+ $this->dbHandler,
+ $this->logger,
+ $this->timeFactory,
+ $this->throttler
+ );
+
+ $this->timeFactory->method('getTime')
+ ->willReturn($this->currentTime);
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestRequestSharedSecret')]
+ public function testRequestSharedSecret(string $token, string $localToken, bool $isTrustedServer, bool $ok): void {
+ $url = 'url';
+
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('isTrustedServer')->with($url)->willReturn($isTrustedServer);
+ $this->dbHandler->expects($this->any())
+ ->method('getToken')->with($url)->willReturn($localToken);
+
+ if ($ok) {
+ $this->jobList->expects($this->once())->method('add')
+ ->with(GetSharedSecret::class, ['url' => $url, 'token' => $token, 'created' => $this->currentTime]);
+ } else {
+ $this->jobList->expects($this->never())->method('add');
+ $this->jobList->expects($this->never())->method('remove');
+ if (!$isTrustedServer) {
+ $this->throttler->expects($this->once())
+ ->method('registerAttempt')
+ ->with('federationSharedSecret');
+ }
+ }
+
+
+ try {
+ $this->ocsAuthApi->requestSharedSecret($url, $token);
+ $this->assertTrue($ok);
+ } catch (OCSForbiddenException $e) {
+ $this->assertFalse($ok);
+ }
+ }
+
+ public static function dataTestRequestSharedSecret(): array {
+ return [
+ ['token2', 'token1', true, true],
+ ['token1', 'token2', false, false],
+ ['token1', 'token2', true, false],
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetSharedSecret')]
+ public function testGetSharedSecret(bool $isTrustedServer, bool $isValidToken, bool $ok): void {
+ $url = 'url';
+ $token = 'token';
+
+ /** @var OCSAuthAPIController&MockObject $ocsAuthApi */
+ $ocsAuthApi = $this->getMockBuilder(OCSAuthAPIController::class)
+ ->setConstructorArgs(
+ [
+ 'federation',
+ $this->request,
+ $this->secureRandom,
+ $this->jobList,
+ $this->trustedServers,
+ $this->dbHandler,
+ $this->logger,
+ $this->timeFactory,
+ $this->throttler
+ ]
+ )
+ ->onlyMethods(['isValidToken'])
+ ->getMock();
+
+ $this->trustedServers
+ ->expects($this->any())
+ ->method('isTrustedServer')->with($url)->willReturn($isTrustedServer);
+ $ocsAuthApi->expects($this->any())
+ ->method('isValidToken')->with($url, $token)->willReturn($isValidToken);
+
+ if ($ok) {
+ $this->secureRandom->expects($this->once())->method('generate')->with(32)
+ ->willReturn('secret');
+ $this->trustedServers->expects($this->once())
+ ->method('addSharedSecret')->with($url, 'secret');
+ } else {
+ $this->secureRandom->expects($this->never())->method('generate');
+ $this->trustedServers->expects($this->never())->method('addSharedSecret');
+ $this->throttler->expects($this->once())
+ ->method('registerAttempt')
+ ->with('federationSharedSecret');
+ }
+
+ try {
+ $result = $ocsAuthApi->getSharedSecret($url, $token);
+ $this->assertTrue($ok);
+ $data = $result->getData();
+ $this->assertSame('secret', $data['sharedSecret']);
+ } catch (OCSForbiddenException $e) {
+ $this->assertFalse($ok);
+ }
+ }
+
+ public static function dataTestGetSharedSecret(): array {
+ return [
+ [true, true, true],
+ [false, true, false],
+ [true, false, false],
+ [false, false, false],
+ ];
+ }
+}
diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php
new file mode 100644
index 00000000000..b0a7a5e30c9
--- /dev/null
+++ b/apps/federation/tests/Controller/SettingsControllerTest.php
@@ -0,0 +1,146 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests\Controller;
+
+use OCA\Federation\Controller\SettingsController;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\OCS\OCSException;
+use OCP\AppFramework\OCS\OCSNotFoundException;
+use OCP\IL10N;
+use OCP\IRequest;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+use Test\TestCase;
+
+class SettingsControllerTest extends TestCase {
+ private SettingsController $controller;
+
+ private IRequest&MockObject $request;
+ private IL10N&MockObject $l10n;
+ private TrustedServers&MockObject $trustedServers;
+ private LoggerInterface&MockObject $logger;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->request = $this->createMock(IRequest::class);
+ $this->l10n = $this->createMock(IL10N::class);
+ $this->trustedServers = $this->createMock(TrustedServers::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+
+ $this->controller = new SettingsController(
+ 'SettingsControllerTest',
+ $this->request,
+ $this->l10n,
+ $this->trustedServers,
+ $this->logger,
+ );
+ }
+
+ public function testAddServer(): void {
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('isTrustedServer')
+ ->with('url')
+ ->willReturn(false);
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('isNextcloudServer')
+ ->with('url')
+ ->willReturn(true);
+
+ $result = $this->controller->addServer('url');
+ $this->assertInstanceOf(DataResponse::class, $result);
+
+ $data = $result->getData();
+ $this->assertSame(200, $result->getStatus());
+ $this->assertSame('url', $data['url']);
+ $this->assertArrayHasKey('id', $data);
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('checkServerFails')]
+ public function testAddServerFail(bool $isTrustedServer, bool $isNextcloud): void {
+ $this->trustedServers
+ ->expects($this->any())
+ ->method('isTrustedServer')
+ ->with('url')
+ ->willReturn($isTrustedServer);
+ $this->trustedServers
+ ->expects($this->any())
+ ->method('isNextcloudServer')
+ ->with('url')
+ ->willReturn($isNextcloud);
+
+ if ($isTrustedServer) {
+ $this->expectException(OCSException::class);
+ } else {
+ $this->expectException(OCSNotFoundException::class);
+ }
+
+ $this->controller->addServer('url');
+ }
+
+ public function testRemoveServer(): void {
+ $this->trustedServers->expects($this->once())
+ ->method('removeServer')
+ ->with(1);
+ $result = $this->controller->removeServer(1);
+ $this->assertTrue($result instanceof DataResponse);
+ $this->assertSame(200, $result->getStatus());
+ }
+
+ public function testCheckServer(): void {
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('isTrustedServer')
+ ->with('url')
+ ->willReturn(false);
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('isNextcloudServer')
+ ->with('url')
+ ->willReturn(true);
+
+ $this->assertNull(
+ self::invokePrivate($this->controller, 'checkServer', ['url'])
+ );
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('checkServerFails')]
+ public function testCheckServerFail(bool $isTrustedServer, bool $isNextcloud): void {
+ $this->trustedServers
+ ->expects($this->any())
+ ->method('isTrustedServer')
+ ->with('url')
+ ->willReturn($isTrustedServer);
+ $this->trustedServers
+ ->expects($this->any())
+ ->method('isNextcloudServer')
+ ->with('url')
+ ->willReturn($isNextcloud);
+
+ if ($isTrustedServer) {
+ $this->expectException(OCSException::class);
+ } else {
+ $this->expectException(OCSNotFoundException::class);
+ }
+
+ $this->assertTrue(
+ self::invokePrivate($this->controller, 'checkServer', ['url'])
+ );
+ }
+
+ public static function checkServerFails(): array {
+ return [
+ [true, true],
+ [false, false]
+ ];
+ }
+}
diff --git a/apps/federation/tests/DAV/FedAuthTest.php b/apps/federation/tests/DAV/FedAuthTest.php
new file mode 100644
index 00000000000..c95d3852b48
--- /dev/null
+++ b/apps/federation/tests/DAV/FedAuthTest.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests\DAV;
+
+use OCA\Federation\DAV\FedAuth;
+use OCA\Federation\DbHandler;
+use PHPUnit\Framework\MockObject\MockObject;
+use Test\TestCase;
+
+class FedAuthTest extends TestCase {
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('providesUser')]
+ public function testFedAuth(bool $expected, string $user, string $password): void {
+ /** @var DbHandler&MockObject $db */
+ $db = $this->createMock(DbHandler::class);
+ $db->method('auth')->willReturn(true);
+ $auth = new FedAuth($db);
+ $result = self::invokePrivate($auth, 'validateUserPass', [$user, $password]);
+ $this->assertEquals($expected, $result);
+ }
+
+ public static function providesUser(): array {
+ return [
+ [true, 'system', '123456']
+ ];
+ }
+}
diff --git a/apps/federation/tests/lib/dbhandlertest.php b/apps/federation/tests/DbHandlerTest.php
index 3ded486d36a..5452a48fc4a 100644
--- a/apps/federation/tests/lib/dbhandlertest.php
+++ b/apps/federation/tests/DbHandlerTest.php
@@ -1,57 +1,35 @@
<?php
+
+declare(strict_types=1);
/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
-
-namespace OCA\Federation\Tests\lib;
-
+namespace OCA\Federation\Tests;
use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\IDBConnection;
use OCP\IL10N;
+use OCP\Server;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
/**
* @group DB
*/
class DbHandlerTest extends TestCase {
+ private DbHandler $dbHandler;
+ private IL10N&MockObject $il10n;
+ private IDBConnection $connection;
+ private string $dbTable = 'trusted_servers';
- /** @var DbHandler */
- private $dbHandler;
-
- /** @var IL10N | \PHPUnit_Framework_MockObject_MockObject */
- private $il10n;
-
- /** @var IDBConnection */
- private $connection;
-
- /** @var string */
- private $dbTable = 'trusted_servers';
-
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
- $this->connection = \OC::$server->getDatabaseConnection();
- $this->il10n = $this->getMock('OCP\IL10N');
+ $this->connection = Server::get(IDBConnection::class);
+ $this->il10n = $this->createMock(IL10N::class);
$this->dbHandler = new DbHandler(
$this->connection,
@@ -59,50 +37,60 @@ class DbHandlerTest extends TestCase {
);
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
$this->assertEmpty($result, 'we need to start with a empty trusted_servers table');
}
- public function tearDown() {
- parent::tearDown();
+ protected function tearDown(): void {
$query = $this->connection->getQueryBuilder()->delete($this->dbTable);
- $query->execute();
+ $query->executeStatement()
+ ;
+ parent::tearDown();
}
/**
- * @dataProvider dataTestAddServer
*
* @param string $url passed to the method
* @param string $expectedUrl the url we expect to be written to the db
* @param string $expectedHash the hash value we expect to be written to the db
*/
- public function testAddServer($url, $expectedUrl, $expectedHash) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestAddServer')]
+ public function testAddServer(string $url, string $expectedUrl, string $expectedHash): void {
$id = $this->dbHandler->addServer($url);
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame($expectedUrl, $result[0]['url']);
$this->assertSame($id, (int)$result[0]['id']);
$this->assertSame($expectedHash, $result[0]['url_hash']);
$this->assertSame(TrustedServers::STATUS_PENDING, (int)$result[0]['status']);
}
- public function dataTestAddServer() {
+ public static function dataTestAddServer(): array {
return [
- ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')],
- ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')],
- ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')],
+ ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')],
+ ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')],
+ ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')],
];
}
- public function testRemove() {
+ public function testRemove(): void {
$id1 = $this->dbHandler->addServer('server1');
$id2 = $this->dbHandler->addServer('server2');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(2, count($result));
+
+ $qResult = $query->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(2, $result);
$this->assertSame('server1', $result[0]['url']);
$this->assertSame('server2', $result[1]['url']);
$this->assertSame($id1, (int)$result[0]['id']);
@@ -110,14 +98,17 @@ class DbHandlerTest extends TestCase {
$this->dbHandler->removeServer($id2);
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame('server1', $result[0]['url']);
$this->assertSame($id1, (int)$result[0]['id']);
}
- public function testGetServerById() {
+ public function testGetServerById(): void {
$this->dbHandler->addServer('server1');
$id = $this->dbHandler->addServer('server2');
@@ -125,7 +116,7 @@ class DbHandlerTest extends TestCase {
$this->assertSame('server2', $result['url']);
}
- public function testGetAll() {
+ public function testGetAll(): void {
$id1 = $this->dbHandler->addServer('server1');
$id2 = $this->dbHandler->addServer('server2');
@@ -137,21 +128,15 @@ class DbHandlerTest extends TestCase {
$this->assertSame($id2, (int)$result[1]['id']);
}
- /**
- * @dataProvider dataTestServerExists
- *
- * @param string $serverInTable
- * @param string $checkForServer
- * @param bool $expected
- */
- public function testServerExists($serverInTable, $checkForServer, $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestServerExists')]
+ public function testServerExists(string $serverInTable, string $checkForServer, bool $expected): void {
$this->dbHandler->addServer($serverInTable);
$this->assertSame($expected,
$this->dbHandler->serverExists($checkForServer)
);
}
- public function dataTestServerExists() {
+ public static function dataTestServerExists(): array {
return [
['server1', 'server1', true],
['server1', 'http://server1', true],
@@ -159,20 +144,26 @@ class DbHandlerTest extends TestCase {
];
}
- public function testAddToken() {
+ public function XtestAddToken() {
$this->dbHandler->addServer('server1');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame(null, $result[0]['token']);
$this->dbHandler->addToken('http://server1', 'token');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame('token', $result[0]['token']);
}
- public function testGetToken() {
+ public function testGetToken(): void {
$this->dbHandler->addServer('server1');
$this->dbHandler->addToken('http://server1', 'token');
$this->assertSame('token',
@@ -180,20 +171,26 @@ class DbHandlerTest extends TestCase {
);
}
- public function testAddSharedSecret() {
+ public function XtestAddSharedSecret() {
$this->dbHandler->addServer('server1');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame(null, $result[0]['shared_secret']);
$this->dbHandler->addSharedSecret('http://server1', 'secret');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame('secret', $result[0]['shared_secret']);
}
- public function testGetSharedSecret() {
+ public function testGetSharedSecret(): void {
$this->dbHandler->addServer('server1');
$this->dbHandler->addSharedSecret('http://server1', 'secret');
$this->assertSame('secret',
@@ -201,20 +198,26 @@ class DbHandlerTest extends TestCase {
);
}
- public function testSetServerStatus() {
+ public function testSetServerStatus(): void {
$this->dbHandler->addServer('server1');
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame(TrustedServers::STATUS_PENDING, (int)$result[0]['status']);
$this->dbHandler->setServerStatus('http://server1', TrustedServers::STATUS_OK);
$query = $this->connection->getQueryBuilder()->select('*')->from($this->dbTable);
- $result = $query->execute()->fetchAll();
- $this->assertSame(1, count($result));
+
+ $qResult = $query->executeQuery();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
+ $this->assertCount(1, $result);
$this->assertSame(TrustedServers::STATUS_OK, (int)$result[0]['status']);
}
- public function testGetServerStatus() {
+ public function testGetServerStatus(): void {
$this->dbHandler->addServer('server1');
$this->dbHandler->setServerStatus('http://server1', TrustedServers::STATUS_OK);
$this->assertSame(TrustedServers::STATUS_OK,
@@ -229,19 +232,15 @@ class DbHandlerTest extends TestCase {
/**
* hash should always be computed with the normalized URL
- *
- * @dataProvider dataTestHash
- *
- * @param string $url
- * @param string $expected
*/
- public function testHash($url, $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestHash')]
+ public function testHash(string $url, string $expected): void {
$this->assertSame($expected,
$this->invokePrivate($this->dbHandler, 'hash', [$url])
);
}
- public function dataTestHash() {
+ public static function dataTestHash(): array {
return [
['server1', sha1('server1')],
['http://server1', sha1('server1')],
@@ -250,19 +249,14 @@ class DbHandlerTest extends TestCase {
];
}
- /**
- * @dataProvider dataTestNormalizeUrl
- *
- * @param string $url
- * @param string $expected
- */
- public function testNormalizeUrl($url, $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestNormalizeUrl')]
+ public function testNormalizeUrl(string $url, string $expected): void {
$this->assertSame($expected,
$this->invokePrivate($this->dbHandler, 'normalizeUrl', [$url])
);
}
- public function dataTestNormalizeUrl() {
+ public static function dataTestNormalizeUrl(): array {
return [
['owncloud.org', 'owncloud.org'],
['http://owncloud.org', 'owncloud.org'],
@@ -272,10 +266,8 @@ class DbHandlerTest extends TestCase {
];
}
- /**
- * @dataProvider providesAuth
- */
- public function testAuth($expectedResult, $user, $password) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('providesAuth')]
+ public function testAuth(bool $expectedResult, string $user, string $password): void {
if ($expectedResult) {
$this->dbHandler->addServer('url1');
$this->dbHandler->addSharedSecret('url1', $password);
@@ -284,7 +276,7 @@ class DbHandlerTest extends TestCase {
$this->assertEquals($expectedResult, $result);
}
- public function providesAuth() {
+ public static function providesAuth(): array {
return [
[false, 'foo', ''],
[true, 'system', '123456789'],
diff --git a/apps/federation/tests/Settings/AdminTest.php b/apps/federation/tests/Settings/AdminTest.php
new file mode 100644
index 00000000000..b879547a8cd
--- /dev/null
+++ b/apps/federation/tests/Settings/AdminTest.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\Federation\Tests\Settings;
+
+use OCA\Federation\Settings\Admin;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IL10N;
+use PHPUnit\Framework\MockObject\MockObject;
+use Test\TestCase;
+
+class AdminTest extends TestCase {
+ private TrustedServers&MockObject $trustedServers;
+ private Admin $admin;
+
+ protected function setUp(): void {
+ parent::setUp();
+ $this->trustedServers = $this->createMock(TrustedServers::class);
+ $this->admin = new Admin(
+ $this->trustedServers,
+ $this->createMock(IL10N::class)
+ );
+ }
+
+ public function testGetForm(): void {
+ $this->trustedServers
+ ->expects($this->once())
+ ->method('getServers')
+ ->willReturn(['myserver', 'secondserver']);
+
+ $params = [
+ 'trustedServers' => ['myserver', 'secondserver'],
+ ];
+ $expected = new TemplateResponse('federation', 'settings-admin', $params, '');
+ $this->assertEquals($expected, $this->admin->getForm());
+ }
+
+ public function testGetSection(): void {
+ $this->assertSame('sharing', $this->admin->getSection());
+ }
+
+ public function testGetPriority(): void {
+ $this->assertSame(30, $this->admin->getPriority());
+ }
+}
diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php
new file mode 100644
index 00000000000..ff03f5cf442
--- /dev/null
+++ b/apps/federation/tests/SyncFederationAddressbooksTest.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests;
+
+use OC\OCS\DiscoveryService;
+use OCA\DAV\CardDAV\SyncService;
+use OCA\Federation\DbHandler;
+use OCA\Federation\SyncFederationAddressBooks;
+use OCA\Federation\TrustedServers;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+
+class SyncFederationAddressbooksTest extends \Test\TestCase {
+ private array $callBacks = [];
+ private DiscoveryService&MockObject $discoveryService;
+ private LoggerInterface&MockObject $logger;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->discoveryService = $this->createMock(DiscoveryService::class);
+ $this->discoveryService->expects($this->any())->method('discover')->willReturn([]);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ }
+
+ public function testSync(): void {
+ /** @var DbHandler&MockObject $dbHandler */
+ $dbHandler = $this->createMock(DbHandler::class);
+ $dbHandler->method('getAllServer')
+ ->willReturn([
+ [
+ 'url' => 'https://cloud.example.org',
+ 'url_hash' => 'sha1',
+ 'shared_secret' => 'ilovenextcloud',
+ 'sync_token' => '0'
+ ]
+ ]);
+ $dbHandler->expects($this->once())->method('setServerStatus')
+ ->with('https://cloud.example.org', 1, '1');
+ $syncService = $this->createMock(SyncService::class);
+ $syncService->expects($this->once())->method('syncRemoteAddressBook')
+ ->willReturn(['1', false]);
+
+ /** @var SyncService $syncService */
+ $s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService, $this->logger);
+ $s->syncThemAll(function ($url, $ex): void {
+ $this->callBacks[] = [$url, $ex];
+ });
+ $this->assertCount(1, $this->callBacks);
+ }
+
+ public function testException(): void {
+ /** @var DbHandler&MockObject $dbHandler */
+ $dbHandler = $this->createMock(DbHandler::class);
+ $dbHandler->method('getAllServer')
+ ->willReturn([
+ [
+ 'url' => 'https://cloud.example.org',
+ 'url_hash' => 'sha1',
+ 'shared_secret' => 'ilovenextcloud',
+ 'sync_token' => '0'
+ ]
+ ]);
+ $syncService = $this->createMock(SyncService::class);
+ $syncService->expects($this->once())->method('syncRemoteAddressBook')
+ ->willThrowException(new \Exception('something did not work out'));
+
+ /** @var SyncService $syncService */
+ $s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService, $this->logger);
+ $s->syncThemAll(function ($url, $ex): void {
+ $this->callBacks[] = [$url, $ex];
+ });
+ $this->assertCount(2, $this->callBacks);
+ }
+
+ public function testSuccessfulSyncWithoutChangesAfterFailure(): void {
+ /** @var DbHandler&MockObject $dbHandler */
+ $dbHandler = $this->createMock(DbHandler::class);
+ $dbHandler->method('getAllServer')
+ ->willReturn([
+ [
+ 'url' => 'https://cloud.example.org',
+ 'url_hash' => 'sha1',
+ 'shared_secret' => 'ilovenextcloud',
+ 'sync_token' => '0'
+ ]
+ ]);
+ $dbHandler->method('getServerStatus')->willReturn(TrustedServers::STATUS_FAILURE);
+ $dbHandler->expects($this->once())->method('setServerStatus')
+ ->with('https://cloud.example.org', 1);
+ $syncService = $this->createMock(SyncService::class);
+ $syncService->expects($this->once())->method('syncRemoteAddressBook')
+ ->willReturn(['0', false]);
+
+ /** @var SyncService $syncService */
+ $s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService, $this->logger);
+ $s->syncThemAll(function ($url, $ex): void {
+ $this->callBacks[] = [$url, $ex];
+ });
+ $this->assertCount(1, $this->callBacks);
+ }
+}
diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php
new file mode 100644
index 00000000000..0c900f6edf7
--- /dev/null
+++ b/apps/federation/tests/TrustedServersTest.php
@@ -0,0 +1,339 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+namespace OCA\Federation\Tests;
+
+use OCA\Federation\BackgroundJob\RequestSharedSecret;
+use OCA\Federation\DbHandler;
+use OCA\Federation\TrustedServers;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJobList;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\Events\TrustedServerRemovedEvent;
+use OCP\HintException;
+use OCP\Http\Client\IClient;
+use OCP\Http\Client\IClientService;
+use OCP\Http\Client\IResponse;
+use OCP\IConfig;
+use OCP\Security\ISecureRandom;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+use Test\TestCase;
+
+class TrustedServersTest extends TestCase {
+ private TrustedServers $trustedServers;
+ private DbHandler&MockObject $dbHandler;
+ private IClientService&MockObject $httpClientService;
+ private IClient&MockObject $httpClient;
+ private IResponse&MockObject $response;
+ private LoggerInterface&MockObject $logger;
+ private IJobList&MockObject $jobList;
+ private ISecureRandom&MockObject $secureRandom;
+ private IConfig&MockObject $config;
+ private IEventDispatcher&MockObject $dispatcher;
+ private ITimeFactory&MockObject $timeFactory;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->dbHandler = $this->createMock(DbHandler::class);
+ $this->dispatcher = $this->createMock(IEventDispatcher::class);
+ $this->httpClientService = $this->createMock(IClientService::class);
+ $this->httpClient = $this->createMock(IClient::class);
+ $this->response = $this->createMock(IResponse::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ $this->jobList = $this->createMock(IJobList::class);
+ $this->secureRandom = $this->createMock(ISecureRandom::class);
+ $this->config = $this->createMock(IConfig::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+
+ $this->trustedServers = new TrustedServers(
+ $this->dbHandler,
+ $this->httpClientService,
+ $this->logger,
+ $this->jobList,
+ $this->secureRandom,
+ $this->config,
+ $this->dispatcher,
+ $this->timeFactory
+ );
+ }
+
+ public function testAddServer(): void {
+ /** @var TrustedServers&MockObject $trustedServers */
+ $trustedServers = $this->getMockBuilder(TrustedServers::class)
+ ->setConstructorArgs(
+ [
+ $this->dbHandler,
+ $this->httpClientService,
+ $this->logger,
+ $this->jobList,
+ $this->secureRandom,
+ $this->config,
+ $this->dispatcher,
+ $this->timeFactory
+ ]
+ )
+ ->onlyMethods(['updateProtocol'])
+ ->getMock();
+ $trustedServers->expects($this->once())->method('updateProtocol')
+ ->with('url')->willReturn('https://url');
+ $this->timeFactory->method('getTime')
+ ->willReturn(1234567);
+ $this->dbHandler->expects($this->once())->method('addServer')->with('https://url')
+ ->willReturn(1);
+
+ $this->secureRandom->expects($this->once())->method('generate')
+ ->willReturn('token');
+ $this->dbHandler->expects($this->once())->method('addToken')->with('https://url', 'token');
+ $this->jobList->expects($this->once())->method('add')
+ ->with(RequestSharedSecret::class,
+ ['url' => 'https://url', 'token' => 'token', 'created' => 1234567]);
+
+ $this->assertSame(
+ 1,
+ $trustedServers->addServer('url')
+ );
+ }
+
+ public function testAddSharedSecret(): void {
+ $this->dbHandler->expects($this->once())->method('addSharedSecret')
+ ->with('url', 'secret');
+ $this->trustedServers->addSharedSecret('url', 'secret');
+ }
+
+ public function testGetSharedSecret(): void {
+ $this->dbHandler->expects($this->once())
+ ->method('getSharedSecret')
+ ->with('url')
+ ->willReturn('secret');
+ $this->assertSame(
+ $this->trustedServers->getSharedSecret('url'),
+ 'secret'
+ );
+ }
+
+ public function testRemoveServer(): void {
+ $id = 42;
+ $server = ['url_hash' => 'url_hash'];
+ $this->dbHandler->expects($this->once())->method('removeServer')->with($id);
+ $this->dbHandler->expects($this->once())->method('getServerById')->with($id)
+ ->willReturn($server);
+ $this->dispatcher->expects($this->once())->method('dispatchTyped')
+ ->willReturnCallback(
+ function ($event): void {
+ $this->assertSame(get_class($event), TrustedServerRemovedEvent::class);
+ /** @var \OCP\Federated\Events\TrustedServerRemovedEvent $event */
+ $this->assertSame('url_hash', $event->getUrlHash());
+ }
+ );
+ $this->trustedServers->removeServer($id);
+ }
+
+ public function testGetServers(): void {
+ $this->dbHandler->expects($this->once())->method('getAllServer')->willReturn(['servers']);
+
+ $this->assertEquals(
+ ['servers'],
+ $this->trustedServers->getServers()
+ );
+ }
+
+ public static function dataTestGetServer() {
+ return [
+ [
+ 15,
+ [
+ 'id' => 15,
+ 'otherData' => 'first server',
+ ]
+ ],
+ [
+ 16,
+ [
+ 'id' => 16,
+ 'otherData' => 'second server',
+ ]
+ ],
+ [
+ 42,
+ [
+ 'id' => 42,
+ 'otherData' => 'last server',
+ ]
+ ],
+ [
+ 108,
+ null
+ ],
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetServer')]
+ public function testGetServer(int $id, ?array $expectedServer): void {
+ $servers = [
+ [
+ 'id' => 15,
+ 'otherData' => 'first server',
+ ],
+ [
+ 'id' => 16,
+ 'otherData' => 'second server',
+ ],
+ [
+ 'id' => 42,
+ 'otherData' => 'last server',
+ ],
+ ];
+ $this->dbHandler->expects($this->once())->method('getAllServer')->willReturn($servers);
+
+ if ($expectedServer === null) {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('No server found with ID: ' . $id);
+ }
+
+ $this->assertEquals(
+ $expectedServer,
+ $this->trustedServers->getServer($id)
+ );
+ }
+
+ public function testIsTrustedServer(): void {
+ $this->dbHandler->expects($this->once())
+ ->method('serverExists')->with('url')
+ ->willReturn(true);
+
+ $this->assertTrue(
+ $this->trustedServers->isTrustedServer('url')
+ );
+ }
+
+ public function testSetServerStatus(): void {
+ $this->dbHandler->expects($this->once())->method('setServerStatus')
+ ->with('url', 1);
+ $this->trustedServers->setServerStatus('url', 1);
+ }
+
+ public function testGetServerStatus(): void {
+ $this->dbHandler->expects($this->once())->method('getServerStatus')
+ ->with('url')->willReturn(1);
+ $this->assertSame(
+ $this->trustedServers->getServerStatus('url'),
+ 1
+ );
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestIsNextcloudServer')]
+ public function testIsNextcloudServer(int $statusCode, bool $isValidNextcloudVersion, bool $expected): void {
+ $server = 'server1';
+
+ /** @var TrustedServers&MockObject $trustedServers */
+ $trustedServers = $this->getMockBuilder(TrustedServers::class)
+ ->setConstructorArgs(
+ [
+ $this->dbHandler,
+ $this->httpClientService,
+ $this->logger,
+ $this->jobList,
+ $this->secureRandom,
+ $this->config,
+ $this->dispatcher,
+ $this->timeFactory
+ ]
+ )
+ ->onlyMethods(['checkNextcloudVersion'])
+ ->getMock();
+
+ $this->httpClientService->expects($this->once())->method('newClient')
+ ->willReturn($this->httpClient);
+
+ $this->httpClient->expects($this->once())->method('get')->with($server . '/status.php')
+ ->willReturn($this->response);
+
+ $this->response->expects($this->once())->method('getStatusCode')
+ ->willReturn($statusCode);
+
+ if ($statusCode === 200) {
+ $this->response->expects($this->once())->method('getBody')
+ ->willReturn('');
+ $trustedServers->expects($this->once())->method('checkNextcloudVersion')
+ ->willReturn($isValidNextcloudVersion);
+ } else {
+ $trustedServers->expects($this->never())->method('checkNextcloudVersion');
+ }
+
+ $this->assertSame($expected,
+ $trustedServers->isNextcloudServer($server)
+ );
+ }
+
+ public static function dataTestIsNextcloudServer(): array {
+ return [
+ [200, true, true],
+ [200, false, false],
+ [404, true, false],
+ ];
+ }
+
+ public function testIsNextcloudServerFail(): void {
+ $server = 'server1';
+
+ $this->httpClientService->expects($this->once())
+ ->method('newClient')
+ ->willReturn($this->httpClient);
+
+ $this->httpClient->expects($this->once())
+ ->method('get')
+ ->with($server . '/status.php')
+ ->willThrowException(new \Exception('simulated exception'));
+
+ $this->assertFalse($this->trustedServers->isNextcloudServer($server));
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCheckNextcloudVersion')]
+ public function testCheckNextcloudVersion(string $status): void {
+ $this->assertTrue(self::invokePrivate($this->trustedServers, 'checkNextcloudVersion', [$status]));
+ }
+
+ public static function dataTestCheckNextcloudVersion(): array {
+ return [
+ ['{"version":"9.0.0"}'],
+ ['{"version":"9.1.0"}']
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCheckNextcloudVersionTooLow')]
+ public function testCheckNextcloudVersionTooLow(string $status): void {
+ $this->expectException(HintException::class);
+ $this->expectExceptionMessage('Remote server version is too low. 9.0 is required.');
+
+ self::invokePrivate($this->trustedServers, 'checkNextcloudVersion', [$status]);
+ }
+
+ public static function dataTestCheckNextcloudVersionTooLow(): array {
+ return [
+ ['{"version":"8.2.3"}'],
+ ];
+ }
+
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestUpdateProtocol')]
+ public function testUpdateProtocol(string $url, string $expected): void {
+ $this->assertSame($expected,
+ self::invokePrivate($this->trustedServers, 'updateProtocol', [$url])
+ );
+ }
+
+ public static function dataTestUpdateProtocol(): array {
+ return [
+ ['http://owncloud.org', 'http://owncloud.org'],
+ ['https://owncloud.org', 'https://owncloud.org'],
+ ['owncloud.org', 'https://owncloud.org'],
+ ['httpserver', 'https://httpserver'],
+ ];
+ }
+}
diff --git a/apps/federation/tests/api/ocsauthapitest.php b/apps/federation/tests/api/ocsauthapitest.php
deleted file mode 100644
index d3e61c0641a..00000000000
--- a/apps/federation/tests/api/ocsauthapitest.php
+++ /dev/null
@@ -1,194 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Robin Appelman <icewind@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\API;
-
-
-use OC\BackgroundJob\JobList;
-use OCA\Federation\API\OCSAuthAPI;
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Http;
-use OCP\ILogger;
-use OCP\IRequest;
-use OCP\Security\ISecureRandom;
-use Test\TestCase;
-
-class OCSAuthAPITest extends TestCase {
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IRequest */
- private $request;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ISecureRandom */
- private $secureRandom;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | JobList */
- private $jobList;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
- private $trustedServers;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */
- private $dbHandler;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
- private $logger;
-
- /** @var OCSAuthApi */
- private $ocsAuthApi;
-
- public function setUp() {
- parent::setUp();
-
- $this->request = $this->getMock('OCP\IRequest');
- $this->secureRandom = $this->getMock('OCP\Security\ISecureRandom');
- $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->disableOriginalConstructor()->getMock();
- $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')
- ->disableOriginalConstructor()->getMock();
- $this->jobList = $this->getMockBuilder('OC\BackgroundJob\JobList')
- ->disableOriginalConstructor()->getMock();
- $this->logger = $this->getMockBuilder('OCP\ILogger')
- ->disableOriginalConstructor()->getMock();
-
- $this->ocsAuthApi = new OCSAuthAPI(
- $this->request,
- $this->secureRandom,
- $this->jobList,
- $this->trustedServers,
- $this->dbHandler,
- $this->logger
- );
-
- }
-
- /**
- * @dataProvider dataTestRequestSharedSecret
- *
- * @param string $token
- * @param string $localToken
- * @param bool $isTrustedServer
- * @param int $expected
- */
- public function testRequestSharedSecret($token, $localToken, $isTrustedServer, $expected) {
-
- $url = 'url';
-
- $this->request->expects($this->at(0))->method('getParam')->with('url')->willReturn($url);
- $this->request->expects($this->at(1))->method('getParam')->with('token')->willReturn($token);
- $this->trustedServers
- ->expects($this->once())
- ->method('isTrustedServer')->with($url)->willReturn($isTrustedServer);
- $this->dbHandler->expects($this->any())
- ->method('getToken')->with($url)->willReturn($localToken);
-
- if ($expected === Http::STATUS_OK) {
- $this->jobList->expects($this->once())->method('add')
- ->with('OCA\Federation\BackgroundJob\GetSharedSecret', ['url' => $url, 'token' => $token]);
- $this->jobList->expects($this->once())->method('remove')
- ->with('OCA\Federation\BackgroundJob\RequestSharedSecret', ['url' => $url, 'token' => $localToken]);
- } else {
- $this->jobList->expects($this->never())->method('add');
- $this->jobList->expects($this->never())->method('remove');
- }
-
- $result = $this->ocsAuthApi->requestSharedSecret();
- $this->assertSame($expected, $result->getStatusCode());
- }
-
- public function dataTestRequestSharedSecret() {
- return [
- ['token2', 'token1', true, Http::STATUS_OK],
- ['token1', 'token2', false, Http::STATUS_FORBIDDEN],
- ['token1', 'token2', true, Http::STATUS_FORBIDDEN],
- ];
- }
-
- /**
- * @dataProvider dataTestGetSharedSecret
- *
- * @param bool $isTrustedServer
- * @param bool $isValidToken
- * @param int $expected
- */
- public function testGetSharedSecret($isTrustedServer, $isValidToken, $expected) {
-
- $url = 'url';
- $token = 'token';
-
- $this->request->expects($this->at(0))->method('getParam')->with('url')->willReturn($url);
- $this->request->expects($this->at(1))->method('getParam')->with('token')->willReturn($token);
-
- /** @var OCSAuthAPI | \PHPUnit_Framework_MockObject_MockObject $ocsAuthApi */
- $ocsAuthApi = $this->getMockBuilder('OCA\Federation\API\OCSAuthAPI')
- ->setConstructorArgs(
- [
- $this->request,
- $this->secureRandom,
- $this->jobList,
- $this->trustedServers,
- $this->dbHandler,
- $this->logger
- ]
- )->setMethods(['isValidToken'])->getMock();
-
- $this->trustedServers
- ->expects($this->any())
- ->method('isTrustedServer')->with($url)->willReturn($isTrustedServer);
- $ocsAuthApi->expects($this->any())
- ->method('isValidToken')->with($url, $token)->willReturn($isValidToken);
-
- if($expected === Http::STATUS_OK) {
- $this->secureRandom->expects($this->once())->method('generate')->with(32)
- ->willReturn('secret');
- $this->trustedServers->expects($this->once())
- ->method('addSharedSecret')->willReturn($url, 'secret');
- $this->dbHandler->expects($this->once())
- ->method('addToken')->with($url, '');
- } else {
- $this->secureRandom->expects($this->never())->method('getMediumStrengthGenerator');
- $this->secureRandom->expects($this->never())->method('generate');
- $this->trustedServers->expects($this->never())->method('addSharedSecret');
- $this->dbHandler->expects($this->never())->method('addToken');
- }
-
- $result = $ocsAuthApi->getSharedSecret();
-
- $this->assertSame($expected, $result->getStatusCode());
-
- if ($expected === Http::STATUS_OK) {
- $data = $result->getData();
- $this->assertSame('secret', $data['sharedSecret']);
- }
- }
-
- public function dataTestGetSharedSecret() {
- return [
- [true, true, Http::STATUS_OK],
- [false, true, Http::STATUS_FORBIDDEN],
- [true, false, Http::STATUS_FORBIDDEN],
- [false, false, Http::STATUS_FORBIDDEN],
- ];
- }
-
-}
diff --git a/apps/federation/tests/backgroundjob/getsharedsecrettest.php b/apps/federation/tests/backgroundjob/getsharedsecrettest.php
deleted file mode 100644
index 25f7502741d..00000000000
--- a/apps/federation/tests/backgroundjob/getsharedsecrettest.php
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\BackgroundJob;
-
-
-use OCA\Federation\BackgroundJob\GetSharedSecret;
-use OCA\Files_Sharing\Tests\TestCase;
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\AppFramework\Http;
-use OCP\BackgroundJob\IJobList;
-use OCP\Http\Client\IClient;
-use OCP\Http\Client\IResponse;
-use OCP\ILogger;
-use OCP\IURLGenerator;
-
-/**
- * Class GetSharedSecretTest
- *
- * @group DB
- *
- * @package OCA\Federation\Tests\BackgroundJob
- */
-class GetSharedSecretTest extends TestCase {
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClient */
- private $httpClient;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IJobList */
- private $jobList;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IURLGenerator */
- private $urlGenerator;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
- private $trustedServers;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */
- private $dbHandler;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
- private $logger;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IResponse */
- private $response;
-
- /** @var GetSharedSecret */
- private $getSharedSecret;
-
- public function setUp() {
- parent::setUp();
-
- $this->httpClient = $this->getMock('OCP\Http\Client\IClient');
- $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList');
- $this->urlGenerator = $this->getMock('OCP\IURLGenerator');
- $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->disableOriginalConstructor()->getMock();
- $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')
- ->disableOriginalConstructor()->getMock();
- $this->logger = $this->getMock('OCP\ILogger');
- $this->response = $this->getMock('OCP\Http\Client\IResponse');
-
- $this->getSharedSecret = new GetSharedSecret(
- $this->httpClient,
- $this->urlGenerator,
- $this->jobList,
- $this->trustedServers,
- $this->logger,
- $this->dbHandler
- );
- }
-
- /**
- * @dataProvider dataTestExecute
- *
- * @param bool $isTrustedServer
- * @param bool $retainBackgroundJob
- */
- public function testExecute($isTrustedServer, $retainBackgroundJob) {
- /** @var GetSharedSecret |\PHPUnit_Framework_MockObject_MockObject $getSharedSecret */
- $getSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\GetSharedSecret')
- ->setConstructorArgs(
- [
- $this->httpClient,
- $this->urlGenerator,
- $this->jobList,
- $this->trustedServers,
- $this->logger,
- $this->dbHandler
- ]
- )->setMethods(['parentExecute'])->getMock();
- $this->invokePrivate($getSharedSecret, 'argument', [['url' => 'url']]);
-
- $this->trustedServers->expects($this->once())->method('isTrustedServer')
- ->with('url')->willReturn($isTrustedServer);
- if ($isTrustedServer) {
- $getSharedSecret->expects($this->once())->method('parentExecute');
- } else {
- $getSharedSecret->expects($this->never())->method('parentExecute');
- }
- $this->invokePrivate($getSharedSecret, 'retainJob', [$retainBackgroundJob]);
- if ($retainBackgroundJob) {
- $this->jobList->expects($this->never())->method('remove');
- } else {
- $this->jobList->expects($this->once())->method('remove');
- }
-
- $getSharedSecret->execute($this->jobList);
-
- }
-
- public function dataTestExecute() {
- return [
- [true, true],
- [true, false],
- [false, false],
- ];
- }
-
- /**
- * @dataProvider dataTestRun
- *
- * @param int $statusCode
- */
- public function testRun($statusCode) {
-
- $target = 'targetURL';
- $source = 'sourceURL';
- $token = 'token';
-
- $argument = ['url' => $target, 'token' => $token];
-
- $this->urlGenerator->expects($this->once())->method('getAbsoluteURL')->with('/')
- ->willReturn($source);
- $this->httpClient->expects($this->once())->method('get')
- ->with(
- $target . '/ocs/v2.php/apps/federation/api/v1/shared-secret?format=json',
- [
- 'query' =>
- [
- 'url' => $source,
- 'token' => $token
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- )->willReturn($this->response);
-
- $this->response->expects($this->once())->method('getStatusCode')
- ->willReturn($statusCode);
-
- if (
- $statusCode !== Http::STATUS_OK
- && $statusCode !== Http::STATUS_FORBIDDEN
- ) {
- $this->dbHandler->expects($this->never())->method('addToken');
- } else {
- $this->dbHandler->expects($this->once())->method('addToken')->with($target, '');
- }
-
- if ($statusCode === Http::STATUS_OK) {
- $this->response->expects($this->once())->method('getBody')
- ->willReturn('{"ocs":{"data":{"sharedSecret":"secret"}}}');
- $this->trustedServers->expects($this->once())->method('addSharedSecret')
- ->with($target, 'secret');
- } else {
- $this->trustedServers->expects($this->never())->method('addSharedSecret');
- }
-
- $this->invokePrivate($this->getSharedSecret, 'run', [$argument]);
- if (
- $statusCode !== Http::STATUS_OK
- && $statusCode !== Http::STATUS_FORBIDDEN
- ) {
- $this->assertTrue($this->invokePrivate($this->getSharedSecret, 'retainJob'));
- } else {
- $this->assertFalse($this->invokePrivate($this->getSharedSecret, 'retainJob'));
- }
-
- }
-
- public function dataTestRun() {
- return [
- [Http::STATUS_OK],
- [Http::STATUS_FORBIDDEN],
- [Http::STATUS_CONFLICT],
- ];
- }
-
-}
diff --git a/apps/federation/tests/backgroundjob/requestsharedsecrettest.php b/apps/federation/tests/backgroundjob/requestsharedsecrettest.php
deleted file mode 100644
index 5b4a1f87a5f..00000000000
--- a/apps/federation/tests/backgroundjob/requestsharedsecrettest.php
+++ /dev/null
@@ -1,181 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\BackgroundJob;
-
-
-use OCA\Federation\BackgroundJob\RequestSharedSecret;
-use OCP\AppFramework\Http;
-use Test\TestCase;
-
-class RequestSharedSecretTest extends TestCase {
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClient */
- private $httpClient;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IJobList */
- private $jobList;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IURLGenerator */
- private $urlGenerator;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */
- private $dbHandler;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
- private $trustedServers;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IResponse */
- private $response;
-
- /** @var RequestSharedSecret */
- private $requestSharedSecret;
-
- public function setUp() {
- parent::setUp();
-
- $this->httpClient = $this->getMock('OCP\Http\Client\IClient');
- $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList');
- $this->urlGenerator = $this->getMock('OCP\IURLGenerator');
- $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->disableOriginalConstructor()->getMock();
- $this->dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')
- ->disableOriginalConstructor()->getMock();
- $this->response = $this->getMock('OCP\Http\Client\IResponse');
-
- $this->requestSharedSecret = new RequestSharedSecret(
- $this->httpClient,
- $this->urlGenerator,
- $this->jobList,
- $this->trustedServers,
- $this->dbHandler
- );
- }
-
- /**
- * @dataProvider dataTestExecute
- *
- * @param bool $isTrustedServer
- * @param bool $retainBackgroundJob
- */
- public function testExecute($isTrustedServer, $retainBackgroundJob) {
- /** @var RequestSharedSecret |\PHPUnit_Framework_MockObject_MockObject $requestSharedSecret */
- $requestSharedSecret = $this->getMockBuilder('OCA\Federation\BackgroundJob\RequestSharedSecret')
- ->setConstructorArgs(
- [
- $this->httpClient,
- $this->urlGenerator,
- $this->jobList,
- $this->trustedServers,
- $this->dbHandler
- ]
- )->setMethods(['parentExecute'])->getMock();
- $this->invokePrivate($requestSharedSecret, 'argument', [['url' => 'url']]);
-
- $this->trustedServers->expects($this->once())->method('isTrustedServer')
- ->with('url')->willReturn($isTrustedServer);
- if ($isTrustedServer) {
- $requestSharedSecret->expects($this->once())->method('parentExecute');
- } else {
- $requestSharedSecret->expects($this->never())->method('parentExecute');
- }
- $this->invokePrivate($requestSharedSecret, 'retainJob', [$retainBackgroundJob]);
- if ($retainBackgroundJob) {
- $this->jobList->expects($this->never())->method('remove');
- } else {
- $this->jobList->expects($this->once())->method('remove');
- }
-
- $requestSharedSecret->execute($this->jobList);
-
- }
-
- public function dataTestExecute() {
- return [
- [true, true],
- [true, false],
- [false, false],
- ];
- }
-
- /**
- * @dataProvider dataTestRun
- *
- * @param int $statusCode
- */
- public function testRun($statusCode) {
-
- $target = 'targetURL';
- $source = 'sourceURL';
- $token = 'token';
-
- $argument = ['url' => $target, 'token' => $token];
-
- $this->urlGenerator->expects($this->once())->method('getAbsoluteURL')->with('/')
- ->willReturn($source);
- $this->httpClient->expects($this->once())->method('post')
- ->with(
- $target . '/ocs/v2.php/apps/federation/api/v1/request-shared-secret?format=json',
- [
- 'body' =>
- [
- 'url' => $source,
- 'token' => $token
- ],
- 'timeout' => 3,
- 'connect_timeout' => 3,
- ]
- )->willReturn($this->response);
-
- $this->response->expects($this->once())->method('getStatusCode')
- ->willReturn($statusCode);
-
- if (
- $statusCode !== Http::STATUS_OK
- && $statusCode !== Http::STATUS_FORBIDDEN
- ) {
- $this->dbHandler->expects($this->never())->method('addToken');
- }
-
- if ($statusCode === Http::STATUS_FORBIDDEN) {
- $this->dbHandler->expects($this->once())->method('addToken')->with($target, '');
- }
-
- $this->invokePrivate($this->requestSharedSecret, 'run', [$argument]);
- if (
- $statusCode !== Http::STATUS_OK
- && $statusCode !== Http::STATUS_FORBIDDEN
- ) {
- $this->assertTrue($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
- } else {
- $this->assertFalse($this->invokePrivate($this->requestSharedSecret, 'retainJob'));
- }
- }
-
- public function dataTestRun() {
- return [
- [Http::STATUS_OK],
- [Http::STATUS_FORBIDDEN],
- [Http::STATUS_CONFLICT],
- ];
- }
-}
diff --git a/apps/federation/tests/controller/settingscontrollertest.php b/apps/federation/tests/controller/settingscontrollertest.php
deleted file mode 100644
index 65f7d5f91d3..00000000000
--- a/apps/federation/tests/controller/settingscontrollertest.php
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\Controller;
-
-
-use OCA\Federation\Controller\SettingsController;
-use OCP\AppFramework\Http\DataResponse;
-use Test\TestCase;
-
-class SettingsControllerTest extends TestCase {
-
- /** @var SettingsController */
- private $controller;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IRequest */
- private $request;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */
- private $l10n;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCA\Federation\TrustedServers */
- private $trustedServers;
-
- public function setUp() {
- parent::setUp();
-
- $this->request = $this->getMock('OCP\IRequest');
- $this->l10n = $this->getMock('OCP\IL10N');
- $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->disableOriginalConstructor()->getMock();
-
- $this->controller = new SettingsController(
- 'SettingsControllerTest',
- $this->request,
- $this->l10n,
- $this->trustedServers
- );
- }
-
- public function testAddServer() {
- $this->trustedServers
- ->expects($this->once())
- ->method('isTrustedServer')
- ->with('url')
- ->willReturn(false);
- $this->trustedServers
- ->expects($this->once())
- ->method('isOwnCloudServer')
- ->with('url')
- ->willReturn(true);
-
- $result = $this->controller->addServer('url');
- $this->assertTrue($result instanceof DataResponse);
-
- $data = $result->getData();
- $this->assertSame(200, $result->getStatus());
- $this->assertSame('url', $data['url']);
- $this->assertArrayHasKey('id', $data);
- }
-
- /**
- * @dataProvider checkServerFails
- * @expectedException \OC\HintException
- *
- * @param bool $isTrustedServer
- * @param bool $isOwnCloud
- */
- public function testAddServerFail($isTrustedServer, $isOwnCloud) {
- $this->trustedServers
- ->expects($this->any())
- ->method('isTrustedServer')
- ->with('url')
- ->willReturn($isTrustedServer);
- $this->trustedServers
- ->expects($this->any())
- ->method('isOwnCloudServer')
- ->with('url')
- ->willReturn($isOwnCloud);
-
- $this->controller->addServer('url');
- }
-
- public function testRemoveServer() {
- $this->trustedServers->expects($this->once())->method('removeServer')
- ->with('url');
- $result = $this->controller->removeServer('url');
- $this->assertTrue($result instanceof DataResponse);
- $this->assertSame(200, $result->getStatus());
- }
-
- public function testCheckServer() {
- $this->trustedServers
- ->expects($this->once())
- ->method('isTrustedServer')
- ->with('url')
- ->willReturn(false);
- $this->trustedServers
- ->expects($this->once())
- ->method('isOwnCloudServer')
- ->with('url')
- ->willReturn(true);
-
- $this->assertTrue(
- $this->invokePrivate($this->controller, 'checkServer', ['url'])
- );
-
- }
-
- /**
- * @dataProvider checkServerFails
- * @expectedException \OC\HintException
- *
- * @param bool $isTrustedServer
- * @param bool $isOwnCloud
- */
- public function testCheckServerFail($isTrustedServer, $isOwnCloud) {
- $this->trustedServers
- ->expects($this->any())
- ->method('isTrustedServer')
- ->with('url')
- ->willReturn($isTrustedServer);
- $this->trustedServers
- ->expects($this->any())
- ->method('isOwnCloudServer')
- ->with('url')
- ->willReturn($isOwnCloud);
-
- $this->assertTrue(
- $this->invokePrivate($this->controller, 'checkServer', ['url'])
- );
-
- }
-
- /**
- * data to simulate checkServer fails
- *
- * @return array
- */
- public function checkServerFails() {
- return [
- [true, true],
- [false, false]
- ];
- }
-
-}
diff --git a/apps/federation/tests/dav/fedauthtest.php b/apps/federation/tests/dav/fedauthtest.php
deleted file mode 100644
index b716084a45d..00000000000
--- a/apps/federation/tests/dav/fedauthtest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\DAV;
-
-use OCA\Federation\DAV\FedAuth;
-use OCA\Federation\DbHandler;
-use Test\TestCase;
-
-class FedAuthTest extends TestCase {
-
- /**
- * @dataProvider providesUser
- *
- * @param array $expected
- * @param string $user
- * @param string $password
- */
- public function testFedAuth($expected, $user, $password) {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $db */
- $db = $this->getMockBuilder('OCA\Federation\DbHandler')->disableOriginalConstructor()->getMock();
- $db->method('auth')->willReturn(true);
- $auth = new FedAuth($db);
- $result = $this->invokePrivate($auth, 'validateUserPass', [$user, $password]);
- $this->assertEquals($expected, $result);
- }
-
- public function providesUser() {
- return [
- [true, 'system', '123456']
- ];
- }
-}
diff --git a/apps/federation/tests/lib/hookstest.php b/apps/federation/tests/lib/hookstest.php
deleted file mode 100644
index 71569226dd2..00000000000
--- a/apps/federation/tests/lib/hookstest.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\lib;
-
-
-use OCA\Federation\Hooks;
-use OCA\Federation\TrustedServers;
-use Test\TestCase;
-
-class HooksTest extends TestCase {
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers */
- private $trustedServers;
-
- /** @var Hooks */
- private $hooks;
-
- public function setUp() {
- parent::setUp();
-
- $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->disableOriginalConstructor()->getMock();
-
- $this->hooks = new Hooks($this->trustedServers);
- }
-
- /**
- * @dataProvider dataTestAddServerHook
- *
- * @param bool $autoAddEnabled is auto-add enabled
- * @param bool $isTrustedServer is the server already in the list of trusted servers
- * @param bool $addServer should the server be added
- */
- public function testAddServerHook($autoAddEnabled, $isTrustedServer, $addServer) {
- $this->trustedServers->expects($this->any())->method('getAutoAddServers')
- ->willReturn($autoAddEnabled);
- $this->trustedServers->expects($this->any())->method('isTrustedServer')
- ->with('url')->willReturn($isTrustedServer);
-
- if ($addServer) {
- $this->trustedServers->expects($this->once())->method('addServer')
- ->with('url');
- } else {
- $this->trustedServers->expects($this->never())->method('addServer');
- }
-
- $this->hooks->addServerHook(['server' => 'url']);
-
- }
-
- public function dataTestAddServerHook() {
- return [
- [true, true, false],
- [false, true, false],
- [true, false, true],
- [false, false, false],
- ];
- }
-}
diff --git a/apps/federation/tests/lib/syncfederationaddressbookstest.php b/apps/federation/tests/lib/syncfederationaddressbookstest.php
deleted file mode 100644
index aa2bd9ac2cb..00000000000
--- a/apps/federation/tests/lib/syncfederationaddressbookstest.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Lukas Reschke <lukas@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-namespace OCA\Federation\Tests\lib;
-
-use OCA\Federation\DbHandler;
-use OCA\Federation\SyncFederationAddressBooks;
-
-class SyncFederationAddressbooksTest extends \Test\TestCase {
-
- /** @var array */
- private $callBacks = [];
-
- function testSync() {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $dbHandler */
- $dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')->
- disableOriginalConstructor()->
- getMock();
- $dbHandler->method('getAllServer')->
- willReturn([
- [
- 'url' => 'https://cloud.drop.box',
- 'url_hash' => 'sha1',
- 'shared_secret' => 'iloveowncloud',
- 'sync_token' => '0'
- ]
- ]);
- $dbHandler->expects($this->once())->method('setServerStatus')->
- with('https://cloud.drop.box', 1, '1');
- $syncService = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService')
- ->disableOriginalConstructor()
- ->getMock();
- $syncService->expects($this->once())->method('syncRemoteAddressBook')
- ->willReturn(1);
-
- $s = new SyncFederationAddressBooks($dbHandler, $syncService);
- $s->syncThemAll(function($url, $ex) {
- $this->callBacks[] = [$url, $ex];
- });
- $this->assertEquals(1, count($this->callBacks));
- }
-
- function testException() {
- /** @var DbHandler | \PHPUnit_Framework_MockObject_MockObject $dbHandler */
- $dbHandler = $this->getMockBuilder('OCA\Federation\DbHandler')->
- disableOriginalConstructor()->
- getMock();
- $dbHandler->method('getAllServer')->
- willReturn([
- [
- 'url' => 'https://cloud.drop.box',
- 'url_hash' => 'sha1',
- 'shared_secret' => 'iloveowncloud',
- 'sync_token' => '0'
- ]
- ]);
- $syncService = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService')
- ->disableOriginalConstructor()
- ->getMock();
- $syncService->expects($this->once())->method('syncRemoteAddressBook')
- ->willThrowException(new \Exception('something did not work out'));
-
- $s = new SyncFederationAddressBooks($dbHandler, $syncService);
- $s->syncThemAll(function($url, $ex) {
- $this->callBacks[] = [$url, $ex];
- });
- $this->assertEquals(2, count($this->callBacks));
- }
-}
diff --git a/apps/federation/tests/lib/trustedserverstest.php b/apps/federation/tests/lib/trustedserverstest.php
deleted file mode 100644
index a8c7c7afb1f..00000000000
--- a/apps/federation/tests/lib/trustedserverstest.php
+++ /dev/null
@@ -1,372 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\lib;
-
-
-use OCA\Federation\DbHandler;
-use OCA\Federation\TrustedServers;
-use OCP\BackgroundJob\IJobList;
-use OCP\Http\Client\IClient;
-use OCP\Http\Client\IClientService;
-use OCP\Http\Client\IResponse;
-use OCP\IConfig;
-use OCP\ILogger;
-use OCP\Security\ISecureRandom;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Test\TestCase;
-
-class TrustedServersTest extends TestCase {
-
- /** @var TrustedServers */
- private $trustedServers;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | DbHandler */
- private $dbHandler;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClientService */
- private $httpClientService;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IClient */
- private $httpClient;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IResponse */
- private $response;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
- private $logger;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IJobList */
- private $jobList;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ISecureRandom */
- private $secureRandom;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | IConfig */
- private $config;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | EventDispatcherInterface */
- private $dispatcher;
-
- public function setUp() {
- parent::setUp();
-
- $this->dbHandler = $this->getMockBuilder('\OCA\Federation\DbHandler')
- ->disableOriginalConstructor()->getMock();
- $this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')
- ->disableOriginalConstructor()->getMock();
- $this->httpClientService = $this->getMock('OCP\Http\Client\IClientService');
- $this->httpClient = $this->getMock('OCP\Http\Client\IClient');
- $this->response = $this->getMock('OCP\Http\Client\IResponse');
- $this->logger = $this->getMock('OCP\ILogger');
- $this->jobList = $this->getMock('OCP\BackgroundJob\IJobList');
- $this->secureRandom = $this->getMock('OCP\Security\ISecureRandom');
- $this->config = $this->getMock('OCP\IConfig');
-
- $this->trustedServers = new TrustedServers(
- $this->dbHandler,
- $this->httpClientService,
- $this->logger,
- $this->jobList,
- $this->secureRandom,
- $this->config,
- $this->dispatcher
- );
-
- }
-
- /**
- * @dataProvider dataTrueFalse
- *
- * @param bool $success
- */
- public function testAddServer($success) {
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers $trustedServer */
- $trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->setConstructorArgs(
- [
- $this->dbHandler,
- $this->httpClientService,
- $this->logger,
- $this->jobList,
- $this->secureRandom,
- $this->config,
- $this->dispatcher
- ]
- )
- ->setMethods(['normalizeUrl', 'updateProtocol'])
- ->getMock();
- $trustedServers->expects($this->once())->method('updateProtocol')
- ->with('url')->willReturn('https://url');
- $this->dbHandler->expects($this->once())->method('addServer')->with('https://url')
- ->willReturn($success);
-
- if ($success) {
- $this->secureRandom->expects($this->once())->method('generate')
- ->willReturn('token');
- $this->dbHandler->expects($this->once())->method('addToken')->with('https://url', 'token');
- $this->jobList->expects($this->once())->method('add')
- ->with('OCA\Federation\BackgroundJob\RequestSharedSecret',
- ['url' => 'https://url', 'token' => 'token']);
- } else {
- $this->jobList->expects($this->never())->method('add');
- }
-
- $this->assertSame($success,
- $trustedServers->addServer('url')
- );
- }
-
- public function dataTrueFalse() {
- return [
- [true],
- [false]
- ];
- }
-
- /**
- * @dataProvider dataTrueFalse
- *
- * @param bool $status
- */
- public function testSetAutoAddServers($status) {
- if ($status) {
- $this->config->expects($this->once())->method('setAppValue')
- ->with('federation', 'autoAddServers', '1');
- } else {
- $this->config->expects($this->once())->method('setAppValue')
- ->with('federation', 'autoAddServers', '0');
- }
-
- $this->trustedServers->setAutoAddServers($status);
- }
-
- /**
- * @dataProvider dataTestGetAutoAddServers
- *
- * @param string $status
- * @param bool $expected
- */
- public function testGetAutoAddServers($status, $expected) {
- $this->config->expects($this->once())->method('getAppValue')
- ->with('federation', 'autoAddServers', '1')->willReturn($status);
-
- $this->assertSame($expected,
- $this->trustedServers->getAutoAddServers($status)
- );
- }
-
- public function dataTestGetAutoAddServers() {
- return [
- ['1', true],
- ['0', false]
- ];
- }
-
- public function testAddSharedSecret() {
- $this->dbHandler->expects($this->once())->method('addSharedSecret')
- ->with('url', 'secret');
- $this->trustedServers->addSharedSecret('url', 'secret');
- }
-
- public function testGetSharedSecret() {
- $this->dbHandler->expects($this->once())->method('getSharedSecret')
- ->with('url')->willReturn(true);
- $this->assertTrue(
- $this->trustedServers->getSharedSecret('url')
- );
- }
-
- public function testRemoveServer() {
- $id = 42;
- $server = ['url_hash' => 'url_hash'];
- $this->dbHandler->expects($this->once())->method('removeServer')->with($id);
- $this->dbHandler->expects($this->once())->method('getServerById')->with($id)
- ->willReturn($server);
- $this->dispatcher->expects($this->once())->method('dispatch')
- ->willReturnCallback(
- function($eventId, $event) {
- $this->assertSame($eventId, 'OCP\Federation\TrustedServerEvent::remove');
- $this->assertInstanceOf('Symfony\Component\EventDispatcher\GenericEvent', $event);
- $this->assertSame('url_hash', $event->getSubject());
- }
- );
- $this->trustedServers->removeServer($id);
- }
-
- public function testGetServers() {
- $this->dbHandler->expects($this->once())->method('getAllServer')->willReturn(true);
-
- $this->assertTrue(
- $this->trustedServers->getServers()
- );
- }
-
-
- public function testIsTrustedServer() {
- $this->dbHandler->expects($this->once())->method('serverExists')->with('url')
- ->willReturn(true);
-
- $this->assertTrue(
- $this->trustedServers->isTrustedServer('url')
- );
- }
-
- public function testSetServerStatus() {
- $this->dbHandler->expects($this->once())->method('setServerStatus')
- ->with('url', 'status');
- $this->trustedServers->setServerStatus('url', 'status');
- }
-
- public function testGetServerStatus() {
- $this->dbHandler->expects($this->once())->method('getServerStatus')
- ->with('url')->willReturn(true);
- $this->assertTrue(
- $this->trustedServers->getServerStatus('url')
- );
- }
-
- /**
- * @dataProvider dataTestIsOwnCloudServer
- *
- * @param int $statusCode
- * @param bool $isValidOwnCloudVersion
- * @param bool $expected
- */
- public function testIsOwnCloudServer($statusCode, $isValidOwnCloudVersion, $expected) {
-
- $server = 'server1';
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | TrustedServers $trustedServer */
- $trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers')
- ->setConstructorArgs(
- [
- $this->dbHandler,
- $this->httpClientService,
- $this->logger,
- $this->jobList,
- $this->secureRandom,
- $this->config,
- $this->dispatcher
- ]
- )
- ->setMethods(['checkOwnCloudVersion'])
- ->getMock();
-
- $this->httpClientService->expects($this->once())->method('newClient')
- ->willReturn($this->httpClient);
-
- $this->httpClient->expects($this->once())->method('get')->with($server . '/status.php')
- ->willReturn($this->response);
-
- $this->response->expects($this->once())->method('getStatusCode')
- ->willReturn($statusCode);
-
- if ($statusCode === 200) {
- $trustedServers->expects($this->once())->method('checkOwnCloudVersion')
- ->willReturn($isValidOwnCloudVersion);
- } else {
- $trustedServers->expects($this->never())->method('checkOwnCloudVersion');
- }
-
- $this->assertSame($expected,
- $trustedServers->isOwnCloudServer($server)
- );
-
- }
-
- public function dataTestIsOwnCloudServer() {
- return [
- [200, true, true],
- [200, false, false],
- [404, true, false],
- ];
- }
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage simulated exception
- */
- public function testIsOwnCloudServerFail() {
- $server = 'server1';
-
- $this->httpClientService->expects($this->once())->method('newClient')
- ->willReturn($this->httpClient);
-
- $this->httpClient->expects($this->once())->method('get')->with($server . '/status.php')
- ->willReturnCallback(function () {
- throw new \Exception('simulated exception');
- });
-
- $this->trustedServers->isOwnCloudServer($server);
- }
-
- /**
- * @dataProvider dataTestCheckOwnCloudVersion
- */
- public function testCheckOwnCloudVersion($status) {
- $this->assertTrue($this->invokePrivate($this->trustedServers, 'checkOwnCloudVersion', [$status]));
- }
-
- public function dataTestCheckOwnCloudVersion() {
- return [
- ['{"version":"9.0.0"}'],
- ['{"version":"9.1.0"}']
- ];
- }
-
- /**
- * @dataProvider dataTestCheckOwnCloudVersionTooLow
- * @expectedException \OC\HintException
- * @expectedExceptionMessage Remote server version is too low. ownCloud 9.0 is required.
- */
- public function testCheckOwnCloudVersionTooLow($status) {
- $this->invokePrivate($this->trustedServers, 'checkOwnCloudVersion', [$status]);
- }
-
- public function dataTestCheckOwnCloudVersionTooLow() {
- return [
- ['{"version":"8.2.3"}'],
- ];
- }
-
- /**
- * @dataProvider dataTestUpdateProtocol
- * @param string $url
- * @param string $expected
- */
- public function testUpdateProtocol($url, $expected) {
- $this->assertSame($expected,
- $this->invokePrivate($this->trustedServers, 'updateProtocol', [$url])
- );
- }
-
- public function dataTestUpdateProtocol() {
- return [
- ['http://owncloud.org', 'http://owncloud.org'],
- ['https://owncloud.org', 'https://owncloud.org'],
- ['owncloud.org', 'https://owncloud.org'],
- ['httpserver', 'https://httpserver'],
- ];
- }
-}
diff --git a/apps/federation/tests/middleware/addservermiddlewaretest.php b/apps/federation/tests/middleware/addservermiddlewaretest.php
deleted file mode 100644
index be1d97c4035..00000000000
--- a/apps/federation/tests/middleware/addservermiddlewaretest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\Federation\Tests\Middleware;
-
-
-use OC\HintException;
-use OCA\Federation\Middleware\AddServerMiddleware;
-use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http;
-use OCP\ILogger;
-use Test\TestCase;
-
-class AddServerMiddlewareTest extends TestCase {
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | ILogger */
- private $logger;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IL10N */
- private $l10n;
-
- /** @var AddServerMiddleware */
- private $middleware;
-
- /** @var \PHPUnit_Framework_MockObject_MockObject | Controller */
- private $controller;
-
- public function setUp() {
- parent::setUp();
-
- $this->logger = $this->getMock('OCP\ILogger');
- $this->l10n = $this->getMock('OCP\IL10N');
- $this->controller = $this->getMockBuilder('OCP\AppFramework\Controller')
- ->disableOriginalConstructor()->getMock();
-
- $this->middleware = new AddServerMiddleware(
- 'AddServerMiddlewareTest',
- $this->l10n,
- $this->logger
- );
- }
-
- /**
- * @dataProvider dataTestAfterException
- *
- * @param \Exception $exception
- * @param string $message
- * @param string $hint
- */
- public function testAfterException($exception, $message, $hint) {
-
- $this->logger->expects($this->once())->method('error')
- ->with($message, ['app' => 'AddServerMiddlewareTest']);
-
- $this->l10n->expects($this->any())->method('t')
- ->willReturnCallback(
- function($message) {
- return $message;
- }
- );
-
- $result = $this->middleware->afterException($this->controller, 'method', $exception);
-
- $this->assertSame(Http::STATUS_BAD_REQUEST,
- $result->getStatus()
- );
-
- $data = $result->getData();
-
- $this->assertSame($hint,
- $data['message']
- );
- }
-
- public function dataTestAfterException() {
- return [
- [new HintException('message', 'hint'), 'message', 'hint'],
- [new \Exception('message'), 'message', 'message'],
- ];
- }
-
-}