From e10105474fbef8940fdfa96d5e2bf2f09b1f0649 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Mon, 18 Apr 2016 18:17:08 +0200 Subject: move federated sharing settings to the federatedfilesharing app --- apps/dav/appinfo/v1/publicwebdav.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/dav/appinfo/v1/publicwebdav.php') diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index 43fedb19415..39c169728b9 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -55,7 +55,9 @@ $linkCheckPlugin = new \OCA\DAV\Files\Sharing\PublicLinkCheckPlugin(); $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin) { $isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest'); - if (OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled() === false && !$isAjax) { + $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application('federatedfilesharing'); + $federatedShareProvider = $federatedSharingApp->getFederatedShareProvider(); + if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) { // this is what is thrown when trying to access a non-existing share throw new \Sabre\DAV\Exception\NotAuthenticated(); } -- cgit v1.2.3