Merge pull request #6309 from nextcloud/new-dav-event
add a new dav event to allow apps to register their own sabredav plugins
This commit is contained in:
commit
f0158e42e9
2 changed files with 8 additions and 0 deletions
|
@ -67,5 +67,10 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
|
|||
return \OC\Files\Filesystem::getView();
|
||||
});
|
||||
|
||||
$dispatcher = \OC::$server->getEventDispatcher();
|
||||
// allow setup of additional plugins
|
||||
$event = new \OCP\SabrePluginEvent($server);
|
||||
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);
|
||||
|
||||
// And off we go!
|
||||
$server->exec();
|
||||
|
|
|
@ -163,6 +163,9 @@ class Server {
|
|||
|
||||
$this->server->addPlugin(new CopyEtagHeaderPlugin());
|
||||
|
||||
// allow setup of additional plugins
|
||||
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);
|
||||
|
||||
// Some WebDAV clients do require Class 2 WebDAV support (locking), since
|
||||
// we do not provide locking we emulate it using a fake locking plugin.
|
||||
if($request->isUserAgent([
|
||||
|
|
Loading…
Reference in a new issue