diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-05-18 14:54:27 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-28 16:53:22 +0200 |
commit | a95c19e14b5a371240392de480278ee97c01ab12 (patch) | |
tree | c96d6efaa88d234cdc3393e5004fd27cfc174ebe /apps/dav/lib/Server.php | |
parent | ee23f41abe2fd53d00f44d9c16ebd722ac93e9a3 (diff) | |
download | nextcloud-server-a95c19e14b5a371240392de480278ee97c01ab12.tar.gz nextcloud-server-a95c19e14b5a371240392de480278ee97c01ab12.zip |
Add share attributes + prevent download permission
Makes it possible to store download permission
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/Server.php')
-rw-r--r-- | apps/dav/lib/Server.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 5b532465aba..5c83e5c2963 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -62,6 +62,7 @@ use OCA\DAV\Connector\Sabre\SharesPlugin; use OCA\DAV\Connector\Sabre\TagsPlugin; use OCA\DAV\DAV\CustomPropertiesBackend; use OCA\DAV\DAV\PublicAuth; +use OCA\DAV\DAV\ViewOnlyPlugin; use OCA\DAV\Events\SabrePluginAuthInitEvent; use OCA\DAV\Files\BrowserErrorPagePlugin; use OCA\DAV\Files\LazySearchBackend; @@ -229,6 +230,11 @@ class Server { $this->server->addPlugin(new FakeLockerPlugin()); } + // Allow view-only plugin for webdav requests + $this->server->addPlugin(new ViewOnlyPlugin( + \OC::$server->getLogger() + )); + if (BrowserErrorPagePlugin::isBrowserRequest($request)) { $this->server->addPlugin(new BrowserErrorPagePlugin()); } |