Register only one dav auth backend

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Thomas Citharel 2016-10-12 12:36:40 +02:00 committed by Lukas Reschke
parent 734e55da95
commit dcbf434841
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 4 additions and 4 deletions

View File

@ -84,17 +84,17 @@ class Server {
$this->server->setBaseUri($this->baseUri);
$this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
$authPlugin = new Plugin();
$authPlugin->addBackend($authBackend);
$authPlugin->addBackend(new PublicAuth());
$this->server->addPlugin($authPlugin);
// allow setup of additional auth backends
$event = new SabrePluginEvent($this->server);
$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
// because we are throwing exceptions this plugin has to be the last one
$authPlugin = new Plugin();
$authPlugin->addBackend($authBackend);
$authPlugin->addBackend(new PublicAuth());
$this->server->addPlugin($authPlugin);
// debugging
if(\OC::$server->getConfig()->getSystemValue('debug', false)) {