Also run the SabreAuthInitEvent for the main server
else for example trusted servers breaks Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
ca4eaf9ab5
commit
aa12dd403e
|
@ -60,11 +60,13 @@ use OCA\DAV\Connector\Sabre\SharesPlugin;
|
||||||
use OCA\DAV\Connector\Sabre\TagsPlugin;
|
use OCA\DAV\Connector\Sabre\TagsPlugin;
|
||||||
use OCA\DAV\DAV\CustomPropertiesBackend;
|
use OCA\DAV\DAV\CustomPropertiesBackend;
|
||||||
use OCA\DAV\DAV\PublicAuth;
|
use OCA\DAV\DAV\PublicAuth;
|
||||||
|
use OCA\DAV\Events\SabrePluginAuthInitEvent;
|
||||||
use OCA\DAV\Files\BrowserErrorPagePlugin;
|
use OCA\DAV\Files\BrowserErrorPagePlugin;
|
||||||
use OCA\DAV\Files\LazySearchBackend;
|
use OCA\DAV\Files\LazySearchBackend;
|
||||||
use OCA\DAV\Provisioning\Apple\AppleProvisioningPlugin;
|
use OCA\DAV\Provisioning\Apple\AppleProvisioningPlugin;
|
||||||
use OCA\DAV\SystemTag\SystemTagPlugin;
|
use OCA\DAV\SystemTag\SystemTagPlugin;
|
||||||
use OCA\DAV\Upload\ChunkingPlugin;
|
use OCA\DAV\Upload\ChunkingPlugin;
|
||||||
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\SabrePluginEvent;
|
use OCP\SabrePluginEvent;
|
||||||
use Sabre\CardDAV\VCFExportPlugin;
|
use Sabre\CardDAV\VCFExportPlugin;
|
||||||
|
@ -88,6 +90,8 @@ class Server {
|
||||||
$this->baseUri = $baseUri;
|
$this->baseUri = $baseUri;
|
||||||
$logger = \OC::$server->getLogger();
|
$logger = \OC::$server->getLogger();
|
||||||
$dispatcher = \OC::$server->getEventDispatcher();
|
$dispatcher = \OC::$server->getEventDispatcher();
|
||||||
|
/** @var IEventDispatcher $newDispatcher */
|
||||||
|
$newDispatcher = \OC::$server->query(IEventDispatcher::class);
|
||||||
|
|
||||||
$root = new RootCollection();
|
$root = new RootCollection();
|
||||||
$this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root));
|
$this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root));
|
||||||
|
@ -118,6 +122,9 @@ class Server {
|
||||||
$event = new SabrePluginEvent($this->server);
|
$event = new SabrePluginEvent($this->server);
|
||||||
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
|
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
|
||||||
|
|
||||||
|
$event = new SabrePluginAuthInitEvent($this->server);
|
||||||
|
$newDispatcher->dispatchTyped($event);
|
||||||
|
|
||||||
$bearerAuthBackend = new BearerAuth(
|
$bearerAuthBackend = new BearerAuth(
|
||||||
\OC::$server->getUserSession(),
|
\OC::$server->getUserSession(),
|
||||||
\OC::$server->getSession(),
|
\OC::$server->getSession(),
|
||||||
|
|
Loading…
Reference in New Issue