Skip to content

Commit a83c5e8

Browse files
authored
Merge pull request #906 from nextcloud/files_external-settings-polish-missing
Files external settings polish
2 parents 7f96e4e + c51e2eb commit a83c5e8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

apps/files_external/lib/AppInfo/Application.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,18 @@ public function __construct(array $urlParams = array()) {
6868
* Register settings templates
6969
*/
7070
public function registerSettings() {
71-
\OCP\App::registerPersonal('files_external', 'personal');
71+
$container = $this->getContainer();
72+
$userSession = $container->getServer()->getUserSession();
73+
if (!$userSession->isLoggedIn()) {
74+
return;
75+
}
76+
$backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
77+
78+
/** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
79+
$userGlobalStoragesService = $container->query('OCA\Files_External\Service\UserGlobalStoragesService');
80+
if (count($userGlobalStoragesService->getStorages()) > 0 || $backendService->isUserMountingAllowed()) {
81+
\OCP\App::registerPersonal('files_external', 'personal');
82+
}
7283
}
7384

7485
/**

apps/files_external/lib/Lib/Backend/OwnCloud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(IL10N $l, Password $legacyAuth) {
3737
->setIdentifier('owncloud')
3838
->addIdentifierAlias('\OC\Files\Storage\OwnCloud') // legacy compat
3939
->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud')
40-
->setText($l->t('ownCloud'))
40+
->setText($l->t('Nextcloud'))
4141
->addParameters([
4242
(new DefinitionParameter('host', $l->t('URL'))),
4343
(new DefinitionParameter('root', $l->t('Remote subfolder')))

0 commit comments

Comments
 (0)