aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-02-26 16:57:30 +0100
committerLouis Chemineau <louis@chmn.me>2024-02-27 09:22:29 +0100
commit51377570530fa299cf96cc60eaa26dbf14cf0872 (patch)
tree6a98e3cda3edbeb8d7cebe5f53d252a6e0975d64 /apps
parent6ee590b71d42bd2cbf5c26080865861be72d610a (diff)
downloadnextcloud-server-51377570530fa299cf96cc60eaa26dbf14cf0872.tar.gz
nextcloud-server-51377570530fa299cf96cc60eaa26dbf14cf0872.zip
fix(dav): Init ViewOnlyPlugin after auth
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Server.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php
index 2bff8e7ebd6..3c7e0936735 100644
--- a/apps/dav/lib/Server.php
+++ b/apps/dav/lib/Server.php
@@ -241,11 +241,6 @@ class Server {
$this->server->addPlugin(new FakeLockerPlugin());
}
- // Allow view-only plugin for webdav requests
- $this->server->addPlugin(new ViewOnlyPlugin(
- \OC::$server->getUserFolder(),
- ));
-
if (BrowserErrorPagePlugin::isBrowserRequest($request)) {
$this->server->addPlugin(new BrowserErrorPagePlugin());
}
@@ -255,6 +250,11 @@ class Server {
// wait with registering these until auth is handled and the filesystem is setup
$this->server->on('beforeMethod:*', function () use ($root, $lazySearchBackend, $logger) {
+ // Allow view-only plugin for webdav requests
+ $this->server->addPlugin(new ViewOnlyPlugin(
+ \OC::$server->getUserFolder(),
+ ));
+
// custom properties plugin must be the last one
$userSession = \OC::$server->getUserSession();
$user = $userSession->getUser();