aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php43
1 files changed, 12 insertions, 31 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
index a195b5722f5..686386dbfef 100644
--- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
@@ -1,29 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <vincent@nextcloud.com>
- *
- * @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/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\DAV\Connector\Sabre;
@@ -65,6 +45,9 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
// forbidden can be expected when trying to upload to
// read-only folders for example
Forbidden::class => true,
+ // our forbidden is expected when access control is blocking
+ // an item in a folder
+ \OCA\DAV\Connector\Sabre\Exception\Forbidden::class => true,
// Happens when an external storage or federated share is temporarily
// not available
StorageNotAvailableException::class => true,
@@ -84,15 +67,13 @@ class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
ServerMaintenanceMode::class => true,
];
- private string $appName;
- private LoggerInterface $logger;
-
/**
- * @param string $loggerAppName app name to use when logging
+ * @param string $appName app name to use when logging
*/
- public function __construct(string $loggerAppName, LoggerInterface $logger) {
- $this->appName = $loggerAppName;
- $this->logger = $logger;
+ public function __construct(
+ private string $appName,
+ private LoggerInterface $logger,
+ ) {
}
/**