Merge pull request #20275 from nextcloud/bugfix/noid/publicwebdav-query-application
Query Application class on publicwebdav
This commit is contained in:
commit
483e921f3e
|
@ -65,7 +65,7 @@ $filesDropPlugin = new \OCA\DAV\Files\Sharing\FilesDropPlugin();
|
||||||
|
|
||||||
$server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, function (\Sabre\DAV\Server $server) use ($authBackend, $linkCheckPlugin, $filesDropPlugin) {
|
$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');
|
$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest');
|
||||||
$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
|
$federatedSharingApp = \OC::$server->query(\OCA\FederatedFileSharing\AppInfo\Application::class);
|
||||||
$federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
|
$federatedShareProvider = $federatedSharingApp->getFederatedShareProvider();
|
||||||
if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
|
if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) {
|
||||||
// this is what is thrown when trying to access a non-existing share
|
// this is what is thrown when trying to access a non-existing share
|
||||||
|
|
Loading…
Reference in New Issue