diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-10-27 15:23:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-10-27 15:23:27 +0100 |
commit | 46ce7277c735bc91dc07908d84bbed796f64b229 (patch) | |
tree | 34007fa8eb510ae2942f34cf7ba2b9c2539d8881 /apps/dav/lib/Server.php | |
parent | 7570daf123169e0a0b17a01b3d7b762e7b1500d4 (diff) | |
download | nextcloud-server-46ce7277c735bc91dc07908d84bbed796f64b229.tar.gz nextcloud-server-46ce7277c735bc91dc07908d84bbed796f64b229.zip |
Also run the SabreAuthInitEvent for the main server
else for example trusted servers breaks
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/lib/Server.php')
-rw-r--r-- | apps/dav/lib/Server.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 44ba036de87..3dd54bd2fc0 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -60,11 +60,13 @@ use OCA\DAV\Connector\Sabre\SharesPlugin; use OCA\DAV\Connector\Sabre\TagsPlugin; use OCA\DAV\DAV\CustomPropertiesBackend; use OCA\DAV\DAV\PublicAuth; +use OCA\DAV\Events\SabrePluginAuthInitEvent; use OCA\DAV\Files\BrowserErrorPagePlugin; use OCA\DAV\Files\LazySearchBackend; use OCA\DAV\Provisioning\Apple\AppleProvisioningPlugin; use OCA\DAV\SystemTag\SystemTagPlugin; use OCA\DAV\Upload\ChunkingPlugin; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IRequest; use OCP\SabrePluginEvent; use Sabre\CardDAV\VCFExportPlugin; @@ -88,6 +90,8 @@ class Server { $this->baseUri = $baseUri; $logger = \OC::$server->getLogger(); $dispatcher = \OC::$server->getEventDispatcher(); + /** @var IEventDispatcher $newDispatcher */ + $newDispatcher = \OC::$server->query(IEventDispatcher::class); $root = new RootCollection(); $this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root)); @@ -118,6 +122,9 @@ class Server { $event = new SabrePluginEvent($this->server); $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); + $event = new SabrePluginAuthInitEvent($this->server); + $newDispatcher->dispatchTyped($event); + $bearerAuthBackend = new BearerAuth( \OC::$server->getUserSession(), \OC::$server->getSession(), |