aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php5
-rw-r--r--lib/private/Federation/CloudIdManager.php1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 5a350bbec5a..ec36aab75d9 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -49,6 +49,7 @@ use OC\RichObjectStrings\Validator;
use OC\Security\Bruteforce\Throttler;
use OCP\AppFramework\IApi;
use OCP\AppFramework\IAppContainer;
+use OCP\Federation\ICloudIdManager;
use OCP\Files\IAppData;
use OCP\Files\Mount\IMountManager;
use OCP\RichObjectStrings\IValidator;
@@ -152,6 +153,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return $this->getServer()->getQueryLogger();
});
+ $this->registerService(ICloudIdManager::class, function($c) {
+ return $this->getServer()->getCloudIdManager();
+ });
+
$this->registerService('OCP\\Files\\IMimeTypeDetector', function($c) {
return $this->getServer()->getMimeTypeDetector();
});
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php
index 45cc69b306e..46d90f7ab92 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -27,6 +27,7 @@ class CloudIdManager implements ICloudIdManager {
/**
* @param string $cloudId
* @return ICloudId
+ * @throws \InvalidArgumentException
*/
public function resolveCloudId($cloudId) {
// TODO magic here to get the url and user instead of just splitting on @