\OC_Mount_Config::$app = new \OCA\Files_external\Appinfo\Application();
$appContainer = \OC_Mount_Config::$app->getContainer();
-$l = \OC::$server->getL10N('files_external');
+\OC_Mount_Config::$app->registerSettings();
-OCP\App::registerAdmin('files_external', 'settings');
-if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
- OCP\App::registerPersonal('files_external', 'personal');
-}
+$l = \OC::$server->getL10N('files_external');
\OCA\Files\App::getNavigationManager()->add([
"id" => 'extstoragemounts',
);
}
+ /**
+ * Register settings templates
+ */
+ public function registerSettings() {
+ $container = $this->getContainer();
+ $backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
+
+ \OCP\App::registerAdmin('files_external', 'settings');
+ if ($backendService->isUserMountingAllowed()) {
+ \OCP\App::registerPersonal('files_external', 'personal');
+ }
+ }
+
/**
* Load storage backends provided by this app
*/