mirror of
https://github.com/nextcloud/server.git
synced 2026-04-09 02:56:28 -04:00
disable dav acl plugin for files resource
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
fd4a7bf72a
commit
491f01efba
1 changed files with 11 additions and 0 deletions
|
|
@ -28,6 +28,8 @@ use Sabre\DAV\Exception\NotFound;
|
|||
use Sabre\DAV\INode;
|
||||
use \Sabre\DAV\PropFind;
|
||||
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
|
||||
|
|
@ -84,4 +86,13 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin {
|
|||
|
||||
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 a new issue