Sabre/DAV 4.0: beforeMethod is now beforeMethod:*

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
pull/19325/head
Georg Ehrke 6 years ago committed by Roeland Jago Douma
parent 8648ee131a
commit 52ba75f644
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 2
      apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php
  2. 2
      apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
  3. 2
      apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
  4. 2
      apps/dav/lib/Connector/Sabre/AppEnabledPlugin.php
  5. 2
      apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
  6. 2
      apps/dav/lib/Connector/Sabre/LockPlugin.php
  7. 2
      apps/dav/lib/Connector/Sabre/MaintenancePlugin.php
  8. 2
      apps/dav/lib/Connector/Sabre/ServerFactory.php
  9. 2
      apps/dav/lib/Files/Sharing/FilesDropPlugin.php
  10. 2
      apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php
  11. 2
      apps/dav/lib/Server.php
  12. 2
      apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
  13. 2
      remote.php

@ -94,7 +94,7 @@ class InvitationResponseServer {
));
// wait with registering these until auth is handled and the filesystem is setup
$this->server->on('beforeMethod', function () use ($root) {
$this->server->on('beforeMethod:*', function () use ($root) {
// register plugins from apps
$pluginManager = new PluginManager(
\OC::$server,

@ -83,7 +83,7 @@ class Plugin extends ServerPlugin {
*/
public function initialize(Server $server) {
$this->server = $server;
$server->on('beforeMethod', [$this, 'beforeMethod']);
$server->on('beforeMethod:*', [$this, 'beforeMethod']);
}
/**

@ -46,7 +46,7 @@ class AnonymousOptionsPlugin extends ServerPlugin {
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
// before auth
$this->server->on('beforeMethod', [$this, 'handleAnonymousOptions'], 9);
$this->server->on('beforeMethod:*', [$this, 'handleAnonymousOptions'], 9);
}
/**

@ -74,7 +74,7 @@ class AppEnabledPlugin extends ServerPlugin {
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
$this->server->on('beforeMethod', [$this, 'checkAppEnabled'], 30);
$this->server->on('beforeMethod:*', [$this, 'checkAppEnabled'], 30);
}
/**

@ -53,7 +53,7 @@ class BlockLegacyClientPlugin extends ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
$this->server->on('beforeMethod', [$this, 'beforeHandler'], 200);
$this->server->on('beforeMethod:*', [$this, 'beforeHandler'], 200);
}
/**

@ -45,7 +45,7 @@ class LockPlugin extends ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
$this->server->on('beforeMethod', [$this, 'getLock'], 50);
$this->server->on('beforeMethod:*', [$this, 'getLock'], 50);
$this->server->on('afterMethod', [$this, 'releaseLock'], 50);
}

@ -67,7 +67,7 @@ class MaintenancePlugin extends ServerPlugin {
*/
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
$this->server->on('beforeMethod', [$this, 'checkMaintenanceMode'], 1);
$this->server->on('beforeMethod:*', [$this, 'checkMaintenanceMode'], 1);
}
/**

@ -140,7 +140,7 @@ class ServerFactory {
}
// wait with registering these until auth is handled and the filesystem is setup
$server->on('beforeMethod', function () use ($server, $objectTree, $viewCallBack) {
$server->on('beforeMethod:*', function () use ($server, $objectTree, $viewCallBack) {
// ensure the skeleton is copied
$userFolder = \OC::$server->getUserFolder();

@ -61,7 +61,7 @@ class FilesDropPlugin extends ServerPlugin {
* @throws MethodNotAllowed
*/
public function initialize(\Sabre\DAV\Server $server) {
$server->on('beforeMethod', [$this, 'beforeMethod'], 999);
$server->on('beforeMethod:*', [$this, 'beforeMethod'], 999);
$this->enabled = false;
}

@ -52,7 +52,7 @@ class PublicLinkCheckPlugin extends ServerPlugin {
* @return void
*/
public function initialize(\Sabre\DAV\Server $server) {
$server->on('beforeMethod', [$this, 'beforeMethod']);
$server->on('beforeMethod:*', [$this, 'beforeMethod']);
}
public function beforeMethod(RequestInterface $request, ResponseInterface $response){

@ -217,7 +217,7 @@ class Server {
$this->server->addPlugin(new SearchPlugin($lazySearchBackend));
// wait with registering these until auth is handled and the filesystem is setup
$this->server->on('beforeMethod', function () use ($root, $lazySearchBackend) {
$this->server->on('beforeMethod:*', function () use ($root, $lazySearchBackend) {
// custom properties plugin must be the last one
$userSession = \OC::$server->getUserSession();
$user = $userSession->getUser();

@ -66,7 +66,7 @@ class FilesDropPluginTest extends TestCase {
$this->server->expects($this->once())
->method('on')
->with(
$this->equalTo('beforeMethod'),
$this->equalTo('beforeMethod:*'),
$this->equalTo([$this->plugin, 'beforeMethod']),
$this->equalTo(999)
);

@ -58,7 +58,7 @@ function handleException($e) {
// we shall not log on RemoteException
$server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));
}
$server->on('beforeMethod', function () use ($e) {
$server->on('beforeMethod:*', function () use ($e) {
if ($e instanceof RemoteException) {
switch ($e->getCode()) {
case 503:

Loading…
Cancel
Save