Merge pull request #906 from nextcloud/files_external-settings-polish-missing
Files external settings polish
This commit is contained in:
commit
a83c5e8b00
|
@ -68,7 +68,18 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
|
|||
* Register settings templates
|
||||
*/
|
||||
public function registerSettings() {
|
||||
\OCP\App::registerPersonal('files_external', 'personal');
|
||||
$container = $this->getContainer();
|
||||
$userSession = $container->getServer()->getUserSession();
|
||||
if (!$userSession->isLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
$backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
|
||||
|
||||
/** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
|
||||
$userGlobalStoragesService = $container->query('OCA\Files_External\Service\UserGlobalStoragesService');
|
||||
if (count($userGlobalStoragesService->getStorages()) > 0 || $backendService->isUserMountingAllowed()) {
|
||||
\OCP\App::registerPersonal('files_external', 'personal');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ class OwnCloud extends Backend {
|
|||
->setIdentifier('owncloud')
|
||||
->addIdentifierAlias('\OC\Files\Storage\OwnCloud') // legacy compat
|
||||
->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud')
|
||||
->setText($l->t('ownCloud'))
|
||||
->setText($l->t('Nextcloud'))
|
||||
->addParameters([
|
||||
(new DefinitionParameter('host', $l->t('URL'))),
|
||||
(new DefinitionParameter('root', $l->t('Remote subfolder')))
|
||||
|
|
Loading…
Reference in New Issue