aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/RootCollection.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-09-03 10:52:05 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-26 11:55:42 +0200
commitd884370844c7f807b10aa09e63cb814927011572 (patch)
treeebafe7b1be706aad48b9aed2b631c5013ee3230c /apps/dav/lib/RootCollection.php
parent4659e3ab599f18069765cb2414a8ace8bdf30ca8 (diff)
downloadnextcloud-server-d884370844c7f807b10aa09e63cb814927011572.tar.gz
nextcloud-server-d884370844c7f807b10aa09e63cb814927011572.zip
Use true random string as uri for public calendars - as a result we can no longer return the pre-publish-url
Diffstat (limited to 'apps/dav/lib/RootCollection.php')
-rw-r--r--apps/dav/lib/RootCollection.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php
index f99d5850212..4c76dc30c3f 100644
--- a/apps/dav/lib/RootCollection.php
+++ b/apps/dav/lib/RootCollection.php
@@ -39,10 +39,12 @@ class RootCollection extends SimpleCollection {
public function __construct() {
$config = \OC::$server->getConfig();
+ $random = \OC::$server->getSecureRandom();
+ $userManager = \OC::$server->getUserManager();
$db = \OC::$server->getDatabaseConnection();
$dispatcher = \OC::$server->getEventDispatcher();
$userPrincipalBackend = new Principal(
- \OC::$server->getUserManager(),
+ $userManager,
\OC::$server->getGroupManager()
);
$groupPrincipalBackend = new GroupPrincipalBackend(
@@ -60,7 +62,7 @@ class RootCollection extends SimpleCollection {
$systemPrincipals->disableListing = $disableListing;
$filesCollection = new Files\RootCollection($userPrincipalBackend, 'principals/users');
$filesCollection->disableListing = $disableListing;
- $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, \OC::$server->getUserManager(), $config);
+ $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $config, $random);
$calendarRoot = new CalendarRoot($userPrincipalBackend, $caldavBackend, 'principals/users');
$calendarRoot->disableListing = $disableListing;
$publicCalendarRoot = new PublicCalendarRoot($caldavBackend);