mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(dav): do not list intermediate upload folders
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
96f1135a77
commit
faff7edb49
2 changed files with 3 additions and 3 deletions
|
|
@ -39,6 +39,7 @@ class RootCollection extends AbstractPrincipalCollection {
|
|||
CleanupService $cleanupService) {
|
||||
parent::__construct($principalBackend, $principalPrefix);
|
||||
$this->cleanupService = $cleanupService;
|
||||
$this->disableListing = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ use OC\Files\Filesystem;
|
|||
use OC\Files\View;
|
||||
use OCA\DAV\Connector\Sabre\Directory;
|
||||
use Sabre\DAV\Exception\Forbidden;
|
||||
use Sabre\DAV\Exception\MethodNotAllowed;
|
||||
use Sabre\DAV\ICollection;
|
||||
|
||||
class UploadHome implements ICollection {
|
||||
|
|
@ -58,9 +59,7 @@ class UploadHome implements ICollection {
|
|||
}
|
||||
|
||||
public function getChildren(): array {
|
||||
return array_map(function ($node) {
|
||||
return new UploadFolder($node, $this->cleanupService, $this->getStorage());
|
||||
}, $this->impl()->getChildren());
|
||||
throw new MethodNotAllowed('Listing members of this collection is disabled');
|
||||
}
|
||||
|
||||
public function childExists($name): bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue