Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-04-01 18:04:10 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2016-04-08 15:17:13 +0300
commit375f6fcab1897803ea52e8f64954929f854ee8f1 (patch)
treea9783e1fbf0b55c95f0ed2886491f5dad4fece8f /apps/dav/appinfo/v1/publicwebdav.php
parentbd3bde2f3bccb8550f1dbe3c8b254052e8b38865 (diff)
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.php13
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) {