0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-04-16 06:11:43 +00:00
nextcloud_server/apps/dav/lib/Upload/RootCollection.php
Robin Appelman 2c56dfba84 fix: attempt to repair upload folder permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-04 15:44:37 +02:00

59 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCA\DAV\Upload;
use OCP\Files\IRootFolder;
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
use Sabre\DAVACL\AbstractPrincipalCollection;
use Sabre\DAVACL\PrincipalBackend;
class RootCollection extends AbstractPrincipalCollection {
public function __construct(PrincipalBackend\BackendInterface $principalBackend,
string $principalPrefix,
private CleanupService $cleanupService,
private IRootFolder $rootFolder,
private IUserSession $userSession,
private LoggerInterface $logger,
) {
parent::__construct($principalBackend, $principalPrefix);
}
/**
* @inheritdoc
*/
public function getChildForPrincipal(array $principalInfo): UploadHome {
return new UploadHome($principalInfo, $this->cleanupService, $this->rootFolder, $this->userSession, $this->logger);
}
/**
* @inheritdoc
*/
public function getName(): string {
return 'uploads';
}
}