diff options
Diffstat (limited to 'apps/files_sharing/lib/External/MountProvider.php')
-rw-r--r-- | apps/files_sharing/lib/External/MountProvider.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php index 3f2f39a74f7..27ee9fcb46b 100644 --- a/apps/files_sharing/lib/External/MountProvider.php +++ b/apps/files_sharing/lib/External/MountProvider.php @@ -22,6 +22,7 @@ namespace OCA\Files_Sharing\External; +use OCP\Federation\ICloudIdManager; use OCP\Files\Config\IMountProvider; use OCP\Files\Storage\IStorageFactory; use OCP\IDBConnection; @@ -41,12 +42,19 @@ class MountProvider implements IMountProvider { private $managerProvider; /** + * @var ICloudIdManager + */ + private $cloudIdManager; + + /** * @param \OCP\IDBConnection $connection * @param callable $managerProvider due to setup order we need a callable that return the manager instead of the manager itself + * @param ICloudIdManager $cloudIdManager */ - public function __construct(IDBConnection $connection, callable $managerProvider) { + public function __construct(IDBConnection $connection, callable $managerProvider, ICloudIdManager $cloudIdManager) { $this->connection = $connection; $this->managerProvider = $managerProvider; + $this->cloudIdManager = $cloudIdManager; } public function getMount(IUser $user, $data, IStorageFactory $storageFactory) { @@ -55,6 +63,7 @@ class MountProvider implements IMountProvider { $data['manager'] = $manager; $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); $data['mountpoint'] = $mountPoint; + $data['cloudId'] = $this->cloudIdManager->getCloudId($data['owner'], $data['remote']); $data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID()); $data['HttpClientService'] = \OC::$server->getHTTPClientService(); return new Mount(self::STORAGE, $mountPoint, $data, $manager, $storageFactory); |