fileInfo = $fileInfo; } /** * This initializes the plugin. * * @param \Sabre\DAV\Server $server Sabre server * * @return void */ public function initialize(\Sabre\DAV\Server $server) { $server->on('beforeMethod:*', [$this, 'beforeMethod']); } public function beforeMethod(RequestInterface $request, ResponseInterface $response) { // verify that the owner didn't have his share permissions revoked if ($this->fileInfo && !$this->fileInfo->isShareable()) { throw new NotFound(); } } }