summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-18 09:21:32 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-18 13:55:54 +0100
commit7abb8693a16f96c3bcb252afce39fbd29ec0ed57 (patch)
tree14122775165da80c0ed21634dde6e4511ddd3736 /lib/private/server.php
parent73d46afc3c5ef237cc8a5431aa1bef4686a7521b (diff)
downloadnextcloud-server-7abb8693a16f96c3bcb252afce39fbd29ec0ed57.tar.gz
nextcloud-server-7abb8693a16f96c3bcb252afce39fbd29ec0ed57.zip
getRootFolder should not setup the FS for any user
Fixes #22467 This can go wrong when an app (take the ldap app) DIs something that needs the rootFolder. This break if we use cookie auth since then we know the user at that point and thus try to setup the fs for that user. However if there are then incomming shares from an ldap user they will fails since the user manager can't find them yet. Now getRootFolder does not setup the fs for any user.
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index ef4764d07cf..96eb5386ad6 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -165,14 +165,9 @@ class Server extends ServerContainer implements IServerContainer {
return $c->query('SystemTagManagerFactory')->getObjectMapper();
});
$this->registerService('RootFolder', function (Server $c) {
- // TODO: get user and user manager from container as well
- $user = \OC_User::getUser();
- /** @var $c SimpleContainer */
- $userManager = $c->query('UserManager');
- $user = $userManager->get($user);
- $manager = \OC\Files\Filesystem::getMountManager();
+ $manager = \OC\Files\Filesystem::getMountManager(null);
$view = new View();
- $root = new Root($manager, $view, $user);
+ $root = new Root($manager, $view, null);
$connector = new HookConnector($root, $view);
$connector->viewToNode();
return $root;