mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(dav): Init ViewOnlyPlugin after auth
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
e83ddcfa80
commit
c1ab894b59
1 changed files with 5 additions and 5 deletions
|
|
@ -239,11 +239,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());
|
||||
}
|
||||
|
|
@ -253,6 +248,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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue