diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-01 17:04:10 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-08 14:17:13 +0200 |
commit | 375f6fcab1897803ea52e8f64954929f854ee8f1 (patch) | |
tree | a9783e1fbf0b55c95f0ed2886491f5dad4fece8f /apps/dav/appinfo/v1/publicwebdav.php | |
parent | bd3bde2f3bccb8550f1dbe3c8b254052e8b38865 (diff) | |
download | nextcloud-server-375f6fcab1897803ea52e8f64954929f854ee8f1.tar.gz nextcloud-server-375f6fcab1897803ea52e8f64954929f854ee8f1.zip |
Move public webdav auth over to share manager
The public webdav auth should use the shiny new share manager.
Diffstat (limited to 'apps/dav/appinfo/v1/publicwebdav.php')
-rw-r--r-- | apps/dav/appinfo/v1/publicwebdav.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index 558a8238666..b26e9ebe7c8 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -32,7 +32,11 @@ OC_App::loadApps($RUNTIME_APPTYPES); OC_Util::obEnd(); // Backends -$authBackend = new OCA\DAV\Connector\PublicAuth(\OC::$server->getConfig(), \OC::$server->getRequest()); +$authBackend = new OCA\DAV\Connector\PublicAuth( + \OC::$server->getRequest(), + \OC::$server->getShareManager(), + \OC::$server->getSession() +); $serverFactory = new OCA\DAV\Connector\Sabre\ServerFactory( \OC::$server->getConfig(), @@ -56,10 +60,9 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, func } $share = $authBackend->getShare(); - $rootShare = \OCP\Share::resolveReShare($share); - $owner = $rootShare['uid_owner']; - $isWritable = $share['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); - $fileId = $share['file_source']; + $owner = $share->getShareOwner(); + $isWritable = $share->getPermissions() & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); + $fileId = $share->getNodeId(); if (!$isWritable) { \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) { |