mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #35621 from nextcloud/enh/noid/sabre-plugin-publicwebdav
Allow additional Sabre plugins in publicwebdav.php
This commit is contained in:
commit
104a1097b5
2 changed files with 32 additions and 0 deletions
|
|
@ -30,6 +30,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\SabrePublicPluginEvent;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
// load needed apps
|
||||
|
|
@ -111,6 +113,11 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
|
|||
|
||||
$server->addPlugin($linkCheckPlugin);
|
||||
$server->addPlugin($filesDropPlugin);
|
||||
// allow setup of additional plugins
|
||||
$event = new SabrePublicPluginEvent($server);
|
||||
/** @var IEventDispatcher $eventDispatcher */
|
||||
$eventDispatcher = \OC::$server->get(IEventDispatcher::class);
|
||||
$eventDispatcher->dispatchTyped($event);
|
||||
|
||||
// And off we go!
|
||||
$server->exec();
|
||||
|
|
|
|||
25
lib/public/SabrePublicPluginEvent.php
Normal file
25
lib/public/SabrePublicPluginEvent.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Julien Veyssier <eneiluj@posteo.net> 2022
|
||||
*
|
||||
* @author Julien Veyssier <eneiluj@posteo.net>
|
||||
*
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This code is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License, version 3,
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
namespace OCP;
|
||||
|
||||
class SabrePublicPluginEvent extends SabrePluginEvent {
|
||||
}
|
||||
Loading…
Reference in a new issue