aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SetupManagerFactory.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-16 18:28:26 +0100
committerRobin Appelman <robin@icewind.nl>2022-03-17 14:56:49 +0100
commit577b1fa85619caa53fa80b64504522965daf337b (patch)
treeb45ab8fefcc69e336909a3bc96f2e0e428856535 /lib/private/Files/SetupManagerFactory.php
parentbf48c0b1b4bd3677a70aa0d7c8a50a5253c4cb5b (diff)
downloadnextcloud-server-577b1fa85619caa53fa80b64504522965daf337b.tar.gz
nextcloud-server-577b1fa85619caa53fa80b64504522965daf337b.zip
setup for current user when finding mounts in the root
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/SetupManagerFactory.php')
-rw-r--r--lib/private/Files/SetupManagerFactory.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/private/Files/SetupManagerFactory.php b/lib/private/Files/SetupManagerFactory.php
index 5dd1601570d..56e70d09961 100644
--- a/lib/private/Files/SetupManagerFactory.php
+++ b/lib/private/Files/SetupManagerFactory.php
@@ -29,6 +29,7 @@ use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Mount\IMountManager;
use OCP\IUserManager;
+use OCP\IUserSession;
use OCP\Lockdown\ILockdownManager;
class SetupManagerFactory {
@@ -38,6 +39,7 @@ class SetupManagerFactory {
private IEventDispatcher $eventDispatcher;
private IUserMountCache $userMountCache;
private ILockdownManager $lockdownManager;
+ private IUserSession $userSession;
private ?SetupManager $setupManager;
public function __construct(
@@ -46,7 +48,8 @@ class SetupManagerFactory {
IUserManager $userManager,
IEventDispatcher $eventDispatcher,
IUserMountCache $userMountCache,
- ILockdownManager $lockdownManager
+ ILockdownManager $lockdownManager,
+ IUserSession $userSession
) {
$this->eventLogger = $eventLogger;
$this->mountProviderCollection = $mountProviderCollection;
@@ -54,12 +57,22 @@ class SetupManagerFactory {
$this->eventDispatcher = $eventDispatcher;
$this->userMountCache = $userMountCache;
$this->lockdownManager = $lockdownManager;
+ $this->userSession = $userSession;
$this->setupManager = null;
}
public function create(IMountManager $mountManager): SetupManager {
if (!$this->setupManager) {
- $this->setupManager = new SetupManager($this->eventLogger, $this->mountProviderCollection, $mountManager, $this->userManager, $this->eventDispatcher, $this->userMountCache, $this->lockdownManager);
+ $this->setupManager = new SetupManager(
+ $this->eventLogger,
+ $this->mountProviderCollection,
+ $mountManager,
+ $this->userManager,
+ $this->eventDispatcher,
+ $this->userMountCache,
+ $this->lockdownManager,
+ $this->userSession,
+ );
}
return $this->setupManager;
}