Merge pull request #9581 from nextcloud/dav-acl-no-files
disable dav acl plugin for files resource
This commit is contained in:
commit
a2df728fb8
|
@ -28,6 +28,8 @@ use Sabre\DAV\Exception\NotFound;
|
||||||
use Sabre\DAV\INode;
|
use Sabre\DAV\INode;
|
||||||
use \Sabre\DAV\PropFind;
|
use \Sabre\DAV\PropFind;
|
||||||
use OCA\DAV\CardDAV\AddressBook;
|
use OCA\DAV\CardDAV\AddressBook;
|
||||||
|
use Sabre\HTTP\RequestInterface;
|
||||||
|
use Sabre\HTTP\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DavAclPlugin is a wrapper around \Sabre\DAVACL\Plugin that returns 404
|
* Class DavAclPlugin is a wrapper around \Sabre\DAVACL\Plugin that returns 404
|
||||||
|
@ -84,4 +86,13 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin {
|
||||||
|
|
||||||
return parent::propFind($propFind, $node);
|
return parent::propFind($propFind, $node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function beforeMethod(RequestInterface $request, ResponseInterface $response) {
|
||||||
|
$path = $request->getPath();
|
||||||
|
|
||||||
|
// prevent the plugin from causing an unneeded overhead for file requests
|
||||||
|
if (strpos($path, 'files/') !== 0) {
|
||||||
|
parent::beforeMethod($request, $response);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue