summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/Controller/UsersController.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-13 16:23:59 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-07-14 16:34:43 +0200
commit7e281a07bb66a082a35cbdd52f7d1e418beb4f53 (patch)
tree9a2ab162c879eec9ede9087d2869a490c3988a49 /apps/provisioning_api/lib/Controller/UsersController.php
parent2c87ce60a04eb98533d430ef7abe386ef0d04c2a (diff)
downloadnextcloud-server-7e281a07bb66a082a35cbdd52f7d1e418beb4f53.tar.gz
nextcloud-server-7e281a07bb66a082a35cbdd52f7d1e418beb4f53.zip
Use IBootstrap for the app federatedfilesharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/UsersController.php')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 52a712dc848..6e8613085d0 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -43,7 +43,7 @@ namespace OCA\Provisioning_API\Controller;
use OC\Accounts\AccountManager;
use OC\Authentication\Token\RemoteWipe;
use OC\HintException;
-use OCA\Provisioning_API\FederatedFileSharingFactory;
+use OCA\Provisioning_API\FederatedShareProviderFactory;
use OCA\Settings\Mailer\NewUserMailHelper;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\DataResponse;
@@ -70,8 +70,8 @@ class UsersController extends AUserData {
protected $l10nFactory;
/** @var NewUserMailHelper */
private $newUserMailHelper;
- /** @var FederatedFileSharingFactory */
- private $federatedFileSharingFactory;
+ /** @var FederatedShareProviderFactory */
+ private $federatedShareProviderFactory;
/** @var ISecureRandom */
private $secureRandom;
/** @var RemoteWipe */
@@ -88,7 +88,7 @@ class UsersController extends AUserData {
ILogger $logger,
IFactory $l10nFactory,
NewUserMailHelper $newUserMailHelper,
- FederatedFileSharingFactory $federatedFileSharingFactory,
+ FederatedShareProviderFactory $federatedShareProviderFactory,
ISecureRandom $secureRandom,
RemoteWipe $remoteWipe) {
parent::__construct($appName,
@@ -104,7 +104,7 @@ class UsersController extends AUserData {
$this->logger = $logger;
$this->l10nFactory = $l10nFactory;
$this->newUserMailHelper = $newUserMailHelper;
- $this->federatedFileSharingFactory = $federatedFileSharingFactory;
+ $this->federatedShareProviderFactory = $federatedShareProviderFactory;
$this->secureRandom = $secureRandom;
$this->remoteWipe = $remoteWipe;
}
@@ -418,8 +418,7 @@ class UsersController extends AUserData {
}
if ($this->appManager->isEnabledForUser('federatedfilesharing')) {
- $federatedFileSharing = $this->federatedFileSharingFactory->get();
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ $shareProvider = $this->federatedShareProviderFactory->get();
if ($shareProvider->isLookupServerUploadEnabled()) {
$permittedFields[] = AccountManager::PROPERTY_PHONE;
$permittedFields[] = AccountManager::PROPERTY_ADDRESS;
@@ -473,8 +472,7 @@ class UsersController extends AUserData {
}
if ($this->appManager->isEnabledForUser('federatedfilesharing')) {
- $federatedFileSharing = \OC::$server->query(\OCA\FederatedFileSharing\AppInfo\Application::class);
- $shareProvider = $federatedFileSharing->getFederatedShareProvider();
+ $shareProvider = $this->federatedShareProviderFactory->get();
if ($shareProvider->isLookupServerUploadEnabled()) {
$permittedFields[] = AccountManager::PROPERTY_PHONE;
$permittedFields[] = AccountManager::PROPERTY_ADDRESS;