$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
- $federatedSharingApp = \OC::$server->query(\OCA\FederatedFileSharing\AppInfo\Application::class);
- $federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
+ /** @var \OCA\FederatedFileSharing\FederatedShareProvider $shareProvider */
+ $federatedShareProvider = \OC::$server->query(\OCA\FederatedFileSharing\FederatedShareProvider::class);
if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
// this is what is thrown when trying to access a non-existing share
throw new \Sabre\DAV\Exception\NotAuthenticated();
+++ /dev/null
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Björn Schießle <bjoern@schiessle.org>
- * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @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/>
- *
- */
-
-use OCA\FederatedFileSharing\AppInfo\Application;
-
-\OC::$server->query(Application::class);
'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir . '/../lib/Controller/MountPublicLinkController.php',
'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php',
'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir . '/../lib/FederatedShareProvider.php',
+ 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => $baseDir . '/../lib/Listeners/LoadAdditionalScriptsListener.php',
'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => $baseDir . '/../lib/Migration/Version1010Date20200630191755.php',
'OCA\\FederatedFileSharing\\Notifications' => $baseDir . '/../lib/Notifications.php',
'OCA\\FederatedFileSharing\\Notifier' => $baseDir . '/../lib/Notifier.php',
'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__ . '/..' . '/../lib/Controller/MountPublicLinkController.php',
'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php',
'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__ . '/..' . '/../lib/FederatedShareProvider.php',
+ 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => __DIR__ . '/..' . '/../lib/Listeners/LoadAdditionalScriptsListener.php',
'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191755.php',
'OCA\\FederatedFileSharing\\Notifications' => __DIR__ . '/..' . '/../lib/Notifications.php',
'OCA\\FederatedFileSharing\\Notifier' => __DIR__ . '/..' . '/../lib/Notifier.php',
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
- * @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
namespace OCA\FederatedFileSharing\AppInfo;
-use OC\AppFramework\Utility\SimpleContainer;
-use OCA\FederatedFileSharing\AddressHandler;
-use OCA\FederatedFileSharing\Controller\RequestHandlerController;
-use OCA\FederatedFileSharing\FederatedShareProvider;
-use OCA\FederatedFileSharing\Notifications;
+use OCA\FederatedFileSharing\Listeners\LoadAdditionalScriptsListener;
use OCA\FederatedFileSharing\Notifier;
use OCA\FederatedFileSharing\OCM\CloudFederationProviderFiles;
+use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCP\AppFramework\App;
-use OCP\GlobalScale\IConfig;
-
-class Application extends App {
-
- /** @var FederatedShareProvider */
- protected $federatedShareProvider;
+use OCP\AppFramework\Bootstrap\IBootContext;
+use OCP\AppFramework\Bootstrap\IBootstrap;
+use OCP\AppFramework\Bootstrap\IRegistrationContext;
+class Application extends App implements IBootstrap {
public function __construct() {
parent::__construct('federatedfilesharing');
+ }
- $container = $this->getContainer();
- $server = $container->getServer();
+ public function register(IRegistrationContext $context): void {
+ $context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScriptsListener::class);
+ }
+
+ public function boot(IBootContext $context): void {
+ $server = $context->getServerContainer();
$cloudFederationManager = $server->getCloudFederationProviderManager();
$cloudFederationManager->addCloudFederationProvider('file',
'Federated Files Sharing',
- function () use ($container) {
- $server = $container->getServer();
- return new CloudFederationProviderFiles(
- $server->getAppManager(),
- $server->query(FederatedShareProvider::class),
- $server->query(AddressHandler::class),
- $server->getLogger(),
- $server->getUserManager(),
- $server->getShareManager(),
- $server->getCloudIdManager(),
- $server->getActivityManager(),
- $server->getNotificationManager(),
- $server->getURLGenerator(),
- $server->getCloudFederationFactory(),
- $server->getCloudFederationProviderManager(),
- $server->getDatabaseConnection(),
- $server->getGroupManager()
- );
+ function () use ($server) {
+ return $server->query(CloudFederationProviderFiles::class);
});
- $container->registerService('RequestHandlerController', function (SimpleContainer $c) use ($server) {
- $addressHandler = new AddressHandler(
- $server->getURLGenerator(),
- $server->getL10N('federatedfilesharing'),
- $server->getCloudIdManager()
- );
- $notification = new Notifications(
- $addressHandler,
- $server->getHTTPClientService(),
- $server->query(\OCP\OCS\IDiscoveryService::class),
- \OC::$server->getJobList(),
- \OC::$server->getCloudFederationProviderManager(),
- \OC::$server->getCloudFederationFactory()
- );
- return new RequestHandlerController(
- $c->query('AppName'),
- $server->getRequest(),
- $this->getFederatedShareProvider(),
- $server->getDatabaseConnection(),
- $server->getShareManager(),
- $notification,
- $addressHandler,
- $server->getUserManager(),
- $server->getCloudIdManager(),
- $server->getLogger(),
- $server->getCloudFederationFactory(),
- $server->getCloudFederationProviderManager()
- );
- });
-
- // register events listeners
- $eventDispatcher = $server->getEventDispatcher();
$manager = $server->getNotificationManager();
- $federatedShareProvider = $this->getFederatedShareProvider();
-
$manager->registerNotifierService(Notifier::class);
-
- $eventDispatcher->addListener(
- 'OCA\Files::loadAdditionalScripts',
- function () use ($federatedShareProvider) {
- if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) {
- \OCP\Util::addScript('federatedfilesharing', 'external');
- }
- }
- );
- }
-
- /**
- * get instance of federated share provider
- *
- * @return FederatedShareProvider
- */
- public function getFederatedShareProvider() {
- if ($this->federatedShareProvider === null) {
- $this->initFederatedShareProvider();
- }
- return $this->federatedShareProvider;
- }
-
- /**
- * initialize federated share provider
- */
- protected function initFederatedShareProvider() {
- $c = $this->getContainer();
- $addressHandler = new \OCA\FederatedFileSharing\AddressHandler(
- \OC::$server->getURLGenerator(),
- \OC::$server->getL10N('federatedfilesharing'),
- \OC::$server->getCloudIdManager()
- );
- $notifications = new \OCA\FederatedFileSharing\Notifications(
- $addressHandler,
- \OC::$server->getHTTPClientService(),
- \OC::$server->query(\OCP\OCS\IDiscoveryService::class),
- \OC::$server->getJobList(),
- \OC::$server->getCloudFederationProviderManager(),
- \OC::$server->getCloudFederationFactory()
- );
- $tokenHandler = new \OCA\FederatedFileSharing\TokenHandler(
- \OC::$server->getSecureRandom()
- );
-
- $this->federatedShareProvider = new \OCA\FederatedFileSharing\FederatedShareProvider(
- \OC::$server->getDatabaseConnection(),
- $addressHandler,
- $notifications,
- $tokenHandler,
- \OC::$server->getL10N('federatedfilesharing'),
- \OC::$server->getLogger(),
- \OC::$server->getLazyRootFolder(),
- \OC::$server->getConfig(),
- \OC::$server->getUserManager(),
- \OC::$server->getCloudIdManager(),
- $c->query(IConfig::class),
- \OC::$server->getCloudFederationProviderManager()
-
- );
}
}
--- /dev/null
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2020 Morris Jobke <hey@morrisjobke.de>
+ *
+ * @author Morris Jobke <hey@morrisjobke.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * 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
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\FederatedFileSharing\Listeners;
+
+use OCA\FederatedFileSharing\FederatedShareProvider;
+use OCA\Files\Event\LoadAdditionalScriptsEvent;
+use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\IEventListener;
+
+class LoadAdditionalScriptsListener implements IEventListener {
+ /** @var FederatedShareProvider */
+ protected $federatedShareProvider;
+
+ public function __construct(FederatedShareProvider $federatedShareProvider) {
+ $this->federatedShareProvider = $federatedShareProvider;
+ }
+
+ public function handle(Event $event): void {
+ if (!$event instanceof LoadAdditionalScriptsEvent) {
+ return;
+ }
+
+ if ($this->federatedShareProvider->isIncomingServer2serverShareEnabled()) {
+ \OCP\Util::addScript('federatedfilesharing', 'external');
+ }
+ }
+}
namespace OCA\Files_Sharing\ShareBackend;
-use OCA\FederatedFileSharing\AppInfo\Application;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\Share\IShare;
if ($federatedShareProvider) {
$this->federatedShareProvider = $federatedShareProvider;
} else {
- $federatedSharingApp = \OC::$server->query(Application::class);
- $this->federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
+ $this->federatedShareProvider = \OC::$server->query(FederatedShareProvider::class);
}
}
'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir . '/../lib/Controller/AppsController.php',
'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir . '/../lib/Controller/GroupsController.php',
'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir . '/../lib/Controller/UsersController.php',
- 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => $baseDir . '/../lib/FederatedFileSharingFactory.php',
+ 'OCA\\Provisioning_API\\FederatedShareProviderFactory' => $baseDir . '/../lib/FederatedShareProviderFactory.php',
'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir . '/../lib/Middleware/ProvisioningApiMiddleware.php',
);
'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__ . '/..' . '/../lib/Controller/AppsController.php',
'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__ . '/..' . '/../lib/Controller/GroupsController.php',
'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__ . '/..' . '/../lib/Controller/UsersController.php',
- 'OCA\\Provisioning_API\\FederatedFileSharingFactory' => __DIR__ . '/..' . '/../lib/FederatedFileSharingFactory.php',
+ 'OCA\\Provisioning_API\\FederatedShareProviderFactory' => __DIR__ . '/..' . '/../lib/FederatedShareProviderFactory.php',
'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__ . '/..' . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ProvisioningApiMiddleware.php',
);
use OC\Accounts\AccountManager;
use OC\Authentication\Token\RemoteWipe;
use OC\HintException;
-use OCA\Provisioning_API\FederatedFileSharingFactory;
+use OCA\Provisioning_API\FederatedShareProviderFactory;
use OCA\Settings\Mailer\NewUserMailHelper;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\DataResponse;
protected $l10nFactory;
/** @var NewUserMailHelper */
private $newUserMailHelper;
- /** @var FederatedFileSharingFactory */
- private $federatedFileSharingFactory;
+ /** @var FederatedShareProviderFactory */
+ private $federatedShareProviderFactory;
/** @var ISecureRandom */
private $secureRandom;
/** @var RemoteWipe */
ILogger $logger,
IFactory $l10nFactory,
NewUserMailHelper $newUserMailHelper,
- FederatedFileSharingFactory $federatedFileSharingFactory,
+ FederatedShareProviderFactory $federatedShareProviderFactory,
ISecureRandom $secureRandom,
RemoteWipe $remoteWipe) {
parent::__construct($appName,
$this->logger = $logger;
$this->l10nFactory = $l10nFactory;
$this->newUserMailHelper = $newUserMailHelper;
- $this->federatedFileSharingFactory = $federatedFileSharingFactory;
+ $this->federatedShareProviderFactory = $federatedShareProviderFactory;
$this->secureRandom = $secureRandom;
$this->remoteWipe = $remoteWipe;
}
}
if ($this->appManager->isEnabledForUser('federatedfilesharing')) {
- $federatedFileSharing = $this->federatedFileSharingFactory->get();
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ $shareProvider = $this->federatedShareProviderFactory->get();
if ($shareProvider->isLookupServerUploadEnabled()) {
$permittedFields[] = AccountManager::PROPERTY_PHONE;
$permittedFields[] = AccountManager::PROPERTY_ADDRESS;
}
if ($this->appManager->isEnabledForUser('federatedfilesharing')) {
- $federatedFileSharing = \OC::$server->query(\OCA\FederatedFileSharing\AppInfo\Application::class);
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ $shareProvider = $this->federatedShareProviderFactory->get();
if ($shareProvider->isLookupServerUploadEnabled()) {
$permittedFields[] = AccountManager::PROPERTY_PHONE;
$permittedFields[] = AccountManager::PROPERTY_ADDRESS;
+++ /dev/null
-<?php
-/**
- * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-declare(strict_types=1);
-
-namespace OCA\Provisioning_API;
-
-use OCA\FederatedFileSharing\AppInfo\Application;
-use OCP\IServerContainer;
-
-class FederatedFileSharingFactory {
-
- /** @var IServerContainer */
- private $serverContainer;
-
- public function __construct(IServerContainer $serverContainer) {
- $this->serverContainer = $serverContainer;
- }
-
- public function get(): Application {
- return $this->serverContainer->query(Application::class);
- }
-}
--- /dev/null
+<?php
+/**
+ * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * 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
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+declare(strict_types=1);
+
+namespace OCA\Provisioning_API;
+
+use OCA\FederatedFileSharing\FederatedShareProvider;
+use OCP\IServerContainer;
+
+class FederatedShareProviderFactory {
+
+ /** @var IServerContainer */
+ private $serverContainer;
+
+ public function __construct(IServerContainer $serverContainer) {
+ $this->serverContainer = $serverContainer;
+ }
+
+ public function get(): FederatedShareProvider {
+ return $this->serverContainer->query(FederatedShareProvider::class);
+ }
+}
use OC\Authentication\Token\RemoteWipe;
use OC\Group\Manager;
use OC\SubAdmin;
-use OCA\FederatedFileSharing\AppInfo\Application;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Provisioning_API\Controller\UsersController;
-use OCA\Provisioning_API\FederatedFileSharingFactory;
+use OCA\Provisioning_API\FederatedShareProviderFactory;
use OCA\Settings\Mailer\NewUserMailHelper;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\DataResponse;
private $l10nFactory;
/** @var NewUserMailHelper|PHPUnit_Framework_MockObject_MockObject */
private $newUserMailHelper;
- /** @var FederatedFileSharingFactory|\PHPUnit_Framework_MockObject_MockObject */
- private $federatedFileSharingFactory;
+ /** @var FederatedShareProviderFactory|\PHPUnit_Framework_MockObject_MockObject */
+ private $federatedShareProviderFactory;
/** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */
private $secureRandom;
/** @var RemoteWipe|MockObject */
$this->accountManager = $this->createMock(AccountManager::class);
$this->l10nFactory = $this->createMock(IFactory::class);
$this->newUserMailHelper = $this->createMock(NewUserMailHelper::class);
- $this->federatedFileSharingFactory = $this->createMock(FederatedFileSharingFactory::class);
+ $this->federatedShareProviderFactory = $this->createMock(FederatedShareProviderFactory::class);
$this->secureRandom = $this->createMock(ISecureRandom::class);
$this->remoteWipe = $this->createMock(RemoteWipe::class);
$this->logger,
$this->l10nFactory,
$this->newUserMailHelper,
- $this->federatedFileSharingFactory,
+ $this->federatedShareProviderFactory,
$this->secureRandom,
$this->remoteWipe,
])
$this->logger,
$this->l10nFactory,
$this->newUserMailHelper,
- $this->federatedFileSharingFactory,
+ $this->federatedShareProviderFactory,
$this->secureRandom,
$this->remoteWipe
])
$this->logger,
$this->l10nFactory,
$this->newUserMailHelper,
- $this->federatedFileSharingFactory,
+ $this->federatedShareProviderFactory,
$this->secureRandom,
$this->remoteWipe,
])
$this->logger,
$this->l10nFactory,
$this->newUserMailHelper,
- $this->federatedFileSharingFactory,
+ $this->federatedShareProviderFactory,
$this->secureRandom,
$this->remoteWipe,
])
$shareprovider = $this->createMock(FederatedShareProvider::class);
$shareprovider->method('isLookupServerUploadEnabled')->willReturn(true);
- $federatedFileSharing = $this->createMock(Application::class);
- $federatedFileSharing
- ->method('getFederatedShareProvider')
- ->willReturn($shareprovider);
-
- $this->federatedFileSharingFactory
+ $this->federatedShareProviderFactory
->method('get')
- ->willReturn($federatedFileSharing);
+ ->willReturn($shareprovider);
$expectedResp = new DataResponse($expected);
$this->assertEquals($expectedResp, $this->api->getEditableFields());
use OC\Encryption\Exceptions\ModuleDoesNotExistsException;
use OC\ForbiddenException;
use OC\Security\IdentityProof\Manager;
+use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Settings\BackgroundJobs\VerifyUserData;
use OCA\User_LDAP\User_Proxy;
use OCP\App\IAppManager;
$data[AccountManager::PROPERTY_EMAIL] = ['value' => $email, 'scope' => $emailScope];
}
if ($this->appManager->isEnabledForUser('federatedfilesharing')) {
- $federatedFileSharing = new \OCA\FederatedFileSharing\AppInfo\Application();
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ $shareProvider = \OC::$server->query(FederatedShareProvider::class);
if ($shareProvider->isLookupServerUploadEnabled()) {
$data[AccountManager::PROPERTY_WEBSITE] = ['value' => $website, 'scope' => $websiteScope];
$data[AccountManager::PROPERTY_ADDRESS] = ['value' => $address, 'scope' => $addressScope];
namespace OCA\Settings\Settings\Personal;
use OC\Accounts\AccountManager;
-use OCA\FederatedFileSharing\AppInfo\Application;
+use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Files\FileInfo;
$federatedFileSharingEnabled = $this->appManager->isEnabledForUser('federatedfilesharing');
$lookupServerUploadEnabled = false;
if ($federatedFileSharingEnabled) {
- $federatedFileSharing = \OC::$server->query(Application::class);
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ /** @var FederatedShareProvider $shareProvider */
+ $shareProvider = \OC::$server->query(FederatedShareProvider::class);
$lookupServerUploadEnabled = $shareProvider->isLookupServerUploadEnabled();
}