summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/RootCollection.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-10-05 12:32:46 +0200
committerJoas Schilling <coding@schilljs.com>2017-10-05 12:48:10 +0200
commit3b4ab6560b1195a8ebd1d0627e142e440b644f1a (patch)
tree0948dd837b8e6464b8e2bfa9db83796757f74fbd /apps/dav/lib/RootCollection.php
parent9ba51247f0ab65e8e92763508a9ba3c53f275fab (diff)
downloadnextcloud-server-3b4ab6560b1195a8ebd1d0627e142e440b644f1a.tar.gz
nextcloud-server-3b4ab6560b1195a8ebd1d0627e142e440b644f1a.zip
Check if the user/group exists for dav shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib/RootCollection.php')
-rw-r--r--apps/dav/lib/RootCollection.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php
index a243ec6d00a..e4ba1f2c02a 100644
--- a/apps/dav/lib/RootCollection.php
+++ b/apps/dav/lib/RootCollection.php
@@ -41,15 +41,14 @@ class RootCollection extends SimpleCollection {
$config = \OC::$server->getConfig();
$random = \OC::$server->getSecureRandom();
$userManager = \OC::$server->getUserManager();
+ $groupManager = \OC::$server->getGroupManager();
$db = \OC::$server->getDatabaseConnection();
$dispatcher = \OC::$server->getEventDispatcher();
$userPrincipalBackend = new Principal(
$userManager,
- \OC::$server->getGroupManager()
- );
- $groupPrincipalBackend = new GroupPrincipalBackend(
- \OC::$server->getGroupManager()
+ $groupManager
);
+ $groupPrincipalBackend = new GroupPrincipalBackend($groupManager);
// as soon as debug mode is enabled we allow listing of principals
$disableListing = !$config->getSystemValue('debug', false);
@@ -62,7 +61,7 @@ class RootCollection extends SimpleCollection {
$systemPrincipals->disableListing = $disableListing;
$filesCollection = new Files\RootCollection($userPrincipalBackend, 'principals/users');
$filesCollection->disableListing = $disableListing;
- $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $random, $dispatcher);
+ $caldavBackend = new CalDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $random, $dispatcher);
$calendarRoot = new CalendarRoot($userPrincipalBackend, $caldavBackend, 'principals/users');
$calendarRoot->disableListing = $disableListing;
$publicCalendarRoot = new PublicCalendarRoot($caldavBackend);
@@ -71,28 +70,28 @@ class RootCollection extends SimpleCollection {
$systemTagCollection = new SystemTag\SystemTagsByIdCollection(
\OC::$server->getSystemTagManager(),
\OC::$server->getUserSession(),
- \OC::$server->getGroupManager()
+ $groupManager
);
$systemTagRelationsCollection = new SystemTag\SystemTagsRelationsCollection(
\OC::$server->getSystemTagManager(),
\OC::$server->getSystemTagObjectMapper(),
\OC::$server->getUserSession(),
- \OC::$server->getGroupManager(),
+ $groupManager,
\OC::$server->getEventDispatcher()
);
$commentsCollection = new Comments\RootCollection(
\OC::$server->getCommentsManager(),
- \OC::$server->getUserManager(),
+ $userManager,
\OC::$server->getUserSession(),
\OC::$server->getEventDispatcher(),
\OC::$server->getLogger()
);
- $usersCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, \OC::$server->getUserManager(), $dispatcher);
+ $usersCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher);
$usersAddressBookRoot = new AddressBookRoot($userPrincipalBackend, $usersCardDavBackend, 'principals/users');
$usersAddressBookRoot->disableListing = $disableListing;
- $systemCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, \OC::$server->getUserManager(), $dispatcher);
+ $systemCardDavBackend = new CardDavBackend($db, $userPrincipalBackend, $userManager, $groupManager, $dispatcher);
$systemAddressBookRoot = new AddressBookRoot(new SystemPrincipalBackend(), $systemCardDavBackend, 'principals/system');
$systemAddressBookRoot->disableListing = $disableListing;