diff options
author | Jesus Macias Portela <jesus.macias.portela@gmail.com> | 2015-12-03 12:35:49 +0100 |
---|---|---|
committer | Jesus Macias Portela <jesus.macias.portela@gmail.com> | 2015-12-03 12:35:49 +0100 |
commit | dcfbbe4737e9939b6c038f8e48b49957c66a52e8 (patch) | |
tree | 8163f2d7537708d7d5486a093bb3dab9cc63f9d2 /apps/files_external | |
parent | a79ae4ae086c08c75a6d974966458251e2167347 (diff) | |
parent | e62b6c1617886b2cdd7553ea9b119c431e4eb363 (diff) | |
download | nextcloud-server-dcfbbe4737e9939b6c038f8e48b49957c66a52e8.tar.gz nextcloud-server-dcfbbe4737e9939b6c038f8e48b49957c66a52e8.zip |
Merge branch 'master' into issue_20427
Diffstat (limited to 'apps/files_external')
148 files changed, 1462 insertions, 940 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php index a7d8f4f668d..1fcd09cca51 100644 --- a/apps/files_external/appinfo/app.php +++ b/apps/files_external/appinfo/app.php @@ -60,8 +60,5 @@ if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == ' "name" => $l->t('External storage') ]); -// connecting hooks -OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OC_Mount_Config', 'initMountPointsHook'); - $mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter'); \OC::$server->getMountProviderCollection()->registerProvider($mountProvider); diff --git a/apps/files_external/appinfo/register_command.php b/apps/files_external/appinfo/register_command.php new file mode 100644 index 00000000000..183d965d1a1 --- /dev/null +++ b/apps/files_external/appinfo/register_command.php @@ -0,0 +1,38 @@ +<?php +/** + * @author Björn Schießle <schiessle@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + + +use OCA\Files_External\Command\ListCommand; +use OCA\Files_External\Command\Config; +use OCA\Files_External\Command\Option; + +$userManager = OC::$server->getUserManager(); +$userSession = OC::$server->getUserSession(); + +$app = \OC_Mount_Config::$app; + +$globalStorageService = $app->getContainer()->query('\OCA\Files_external\Service\GlobalStoragesService'); +$userStorageService = $app->getContainer()->query('\OCA\Files_external\Service\UserStoragesService'); + +/** @var Symfony\Component\Console\Application $application */ +$application->add(new ListCommand($globalStorageService, $userStorageService, $userSession, $userManager)); +$application->add(new Config($globalStorageService)); +$application->add(new Option($globalStorageService)); diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index 39ded1dc2ec..e66c010a8cf 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -36,6 +36,7 @@ namespace OCA\Files_External\AppInfo; 'resources' => array( 'global_storages' => array('url' => '/globalstorages'), 'user_storages' => array('url' => '/userstorages'), + 'user_global_storages' => array('url' => '/userglobalstorages'), ), 'routes' => array( array( diff --git a/apps/files_external/command/config.php b/apps/files_external/command/config.php new file mode 100644 index 00000000000..6a57b2dd961 --- /dev/null +++ b/apps/files_external/command/config.php @@ -0,0 +1,112 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_External\Command; + +use OC\Core\Command\Base; +use OCA\Files_external\Lib\StorageConfig; +use OCA\Files_external\NotFoundException; +use OCA\Files_external\Service\GlobalStoragesService; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Helper\TableHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +class Config extends Base { + /** + * @var GlobalStoragesService + */ + protected $globalService; + + function __construct(GlobalStoragesService $globalService) { + parent::__construct(); + $this->globalService = $globalService; + } + + protected function configure() { + $this + ->setName('files_external:config') + ->setDescription('Manage backend configuration for a mount') + ->addArgument( + 'mount_id', + InputArgument::REQUIRED, + 'The id of the mount to edit' + )->addArgument( + 'key', + InputArgument::REQUIRED, + 'key of the config option to set/get' + )->addArgument( + 'value', + InputArgument::OPTIONAL, + 'value to set the config option to, when no value is provided the existing value will be printed' + ); + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output) { + $mountId = $input->getArgument('mount_id'); + $key = $input->getArgument('key'); + try { + $mount = $this->globalService->getStorage($mountId); + } catch (NotFoundException $e) { + $output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>'); + return 404; + } + + $value = $input->getArgument('value'); + if ($value) { + $this->setOption($mount, $key, $value, $output); + } else { + $this->getOption($mount, $key, $output); + } + } + + /** + * @param StorageConfig $mount + * @param string $key + * @param OutputInterface $output + */ + protected function getOption(StorageConfig $mount, $key, OutputInterface $output) { + $value = $mount->getBackendOption($key); + if (!is_string($value)) { // show bools and objects correctly + $value = json_encode($value); + } + $output->writeln($value); + } + + /** + * @param StorageConfig $mount + * @param string $key + * @param string $value + * @param OutputInterface $output + */ + protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) { + $decoded = json_decode($value, true); + if (!is_null($decoded)) { + $value = $decoded; + } + $mount->setBackendOption($key, $value); + $this->globalService->updateStorage($mount); + } +} diff --git a/apps/files_external/command/listcommand.php b/apps/files_external/command/listcommand.php new file mode 100644 index 00000000000..4c027ffcb8e --- /dev/null +++ b/apps/files_external/command/listcommand.php @@ -0,0 +1,231 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_External\Command; + +use OC\Core\Command\Base; +use OCA\Files_external\Lib\StorageConfig; +use OCA\Files_external\Service\GlobalStoragesService; +use OCA\Files_external\Service\UserStoragesService; +use OCP\IUserManager; +use OCP\IUserSession; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Helper\TableHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +class ListCommand extends Base { + /** + * @var GlobalStoragesService + */ + private $globalService; + + /** + * @var UserStoragesService + */ + private $userService; + + /** + * @var IUserSession + */ + private $userSession; + + /** + * @var IUserManager + */ + private $userManager; + + function __construct(GlobalStoragesService $globalService, UserStoragesService $userService, IUserSession $userSession, IUserManager $userManager) { + parent::__construct(); + $this->globalService = $globalService; + $this->userService = $userService; + $this->userSession = $userSession; + $this->userManager = $userManager; + } + + protected function configure() { + $this + ->setName('files_external:list') + ->setDescription('List configured mounts') + ->addArgument( + 'user_id', + InputArgument::OPTIONAL, + 'user id to list the personal mounts for, if no user is provided admin mounts will be listed' + )->addOption( + 'show-password', + null, + InputOption::VALUE_NONE, + 'show passwords and secrets' + )->addOption( + 'full', + null, + InputOption::VALUE_NONE, + 'don\'t truncate long values in table output' + ); + parent::configure(); + } + + protected function execute(InputInterface $input, OutputInterface $output) { + $userId = $input->getArgument('user_id'); + if (!empty($userId)) { + $user = $this->userManager->get($userId); + if (is_null($user)) { + $output->writeln("<error>user $userId not found</error>"); + return; + } + $this->userSession->setUser($user); + $storageService = $this->userService; + } else { + $storageService = $this->globalService; + } + + /** @var $mounts StorageConfig[] */ + $mounts = $storageService->getAllStorages(); + + if (count($mounts) === 0) { + if ($userId) { + $output->writeln("<info>No mounts configured by $userId</info>"); + } else { + $output->writeln("<info>No admin mounts configured</info>"); + } + return; + } + + $headers = ['Mount ID', 'Mount Point', 'Storage', 'Authentication Type', 'Configuration', 'Options']; + + if (!$userId) { + $headers[] = 'Applicable Users'; + $headers[] = 'Applicable Groups'; + } + + if (!$input->getOption('show-password')) { + $hideKeys = ['password', 'refresh_token', 'token', 'client_secret', 'public_key', 'private_key']; + foreach ($mounts as $mount) { + $config = $mount->getBackendOptions(); + foreach ($config as $key => $value) { + if (in_array($key, $hideKeys)) { + $mount->setBackendOption($key, '***'); + } + } + } + } + + $outputType = $input->getOption('output'); + if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { + $keys = array_map(function ($header) { + return strtolower(str_replace(' ', '_', $header)); + }, $headers); + + $pairs = array_map(function (StorageConfig $config) use ($keys, $userId) { + $values = [ + $config->getId(), + $config->getMountPoint(), + $config->getBackend()->getStorageClass(), + $config->getAuthMechanism()->getScheme(), + $config->getBackendOptions(), + $config->getMountOptions() + ]; + if (!$userId) { + $values[] = $config->getApplicableUsers(); + $values[] = $config->getApplicableGroups(); + } + + return array_combine($keys, $values); + }, $mounts); + if ($outputType === self::OUTPUT_FORMAT_JSON) { + $output->writeln(json_encode(array_values($pairs))); + } else { + $output->writeln(json_encode(array_values($pairs), JSON_PRETTY_PRINT)); + } + } else { + $full = $input->getOption('full'); + $defaultMountOptions = [ + 'encrypt' => true, + 'previews' => true, + 'filesystem_check_changes' => 1 + ]; + $rows = array_map(function (StorageConfig $config) use ($userId, $defaultMountOptions, $full) { + $storageConfig = $config->getBackendOptions(); + $keys = array_keys($storageConfig); + $values = array_values($storageConfig); + + if (!$full) { + $values = array_map(function ($value) { + if (is_string($value) && strlen($value) > 32) { + return substr($value, 0, 6) . '...' . substr($value, -6, 6); + } else { + return $value; + } + }, $values); + } + + $configStrings = array_map(function ($key, $value) { + return $key . ': ' . json_encode($value); + }, $keys, $values); + $configString = implode(', ', $configStrings); + + $mountOptions = $config->getMountOptions(); + // hide defaults + foreach ($mountOptions as $key => $value) { + if ($value === $defaultMountOptions[$key]) { + unset($mountOptions[$key]); + } + } + $keys = array_keys($mountOptions); + $values = array_values($mountOptions); + + $optionsStrings = array_map(function ($key, $value) { + return $key . ': ' . json_encode($value); + }, $keys, $values); + $optionsString = implode(', ', $optionsStrings); + + $values = [ + $config->getId(), + $config->getMountPoint(), + $config->getBackend()->getText(), + $config->getAuthMechanism()->getText(), + $configString, + $optionsString + ]; + + if (!$userId) { + $applicableUsers = implode(', ', $config->getApplicableUsers()); + $applicableGroups = implode(', ', $config->getApplicableGroups()); + if ($applicableUsers === '' && $applicableGroups === '') { + $applicableUsers = 'All'; + } + $values[] = $applicableUsers; + $values[] = $applicableGroups; + } + + return $values; + }, $mounts); + + $table = new Table($output); + $table->setHeaders($headers); + $table->setRows($rows); + $table->render(); + } + } +} diff --git a/apps/files_external/command/option.php b/apps/files_external/command/option.php new file mode 100644 index 00000000000..64dafb8f6dc --- /dev/null +++ b/apps/files_external/command/option.php @@ -0,0 +1,85 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_External\Command; + +use OC\Core\Command\Base; +use OCA\Files_external\Lib\StorageConfig; +use OCA\Files_external\Service\GlobalStoragesService; +use OCA\Files_external\Service\UserStoragesService; +use OCP\IUserManager; +use OCP\IUserSession; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Helper\TableHelper; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +class Option extends Config { + protected function configure() { + $this + ->setName('files_external:option') + ->setDescription('Manage mount options for a mount') + ->addArgument( + 'mount_id', + InputArgument::REQUIRED, + 'The id of the mount to edit' + )->addArgument( + 'key', + InputArgument::REQUIRED, + 'key of the mount option to set/get' + )->addArgument( + 'value', + InputArgument::OPTIONAL, + 'value to set the mount option to, when no value is provided the existing value will be printed' + ); + } + + /** + * @param StorageConfig $mount + * @param string $key + * @param OutputInterface $output + */ + protected function getOption(StorageConfig $mount, $key, OutputInterface $output) { + $value = $mount->getMountOption($key); + if (!is_string($value)) { // show bools and objects correctly + $value = json_encode($value); + } + $output->writeln($value); + } + + /** + * @param StorageConfig $mount + * @param string $key + * @param string $value + * @param OutputInterface $output + */ + protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) { + $decoded = json_decode($value, true); + if (!is_null($decoded)) { + $value = $decoded; + } + $mount->setMountOption($key, $value); + $this->globalService->updateStorage($mount); + } +} diff --git a/apps/files_external/controller/storagescontroller.php b/apps/files_external/controller/storagescontroller.php index 048f3588ed7..7712f9769c9 100644 --- a/apps/files_external/controller/storagescontroller.php +++ b/apps/files_external/controller/storagescontroller.php @@ -238,24 +238,38 @@ abstract class StoragesController extends Controller { ); } catch (InsufficientDataForMeaningfulAnswerException $e) { $storage->setStatus( - \OC_Mount_Config::STATUS_INDETERMINATE, + StorageNotAvailableException::STATUS_INDETERMINATE, $this->l10n->t('Insufficient data: %s', [$e->getMessage()]) ); } catch (StorageNotAvailableException $e) { $storage->setStatus( - \OC_Mount_Config::STATUS_ERROR, - $e->getMessage() + $e->getCode(), + $this->l10n->t('%s', [$e->getMessage()]) ); } catch (\Exception $e) { // FIXME: convert storage exceptions to StorageNotAvailableException $storage->setStatus( - \OC_Mount_Config::STATUS_ERROR, + StorageNotAvailableException::STATUS_ERROR, get_class($e).': '.$e->getMessage() ); } } /** + * Get all storage entries + * + * @return DataResponse + */ + public function index() { + $storages = $this->service->getAllStorages(); + + return new DataResponse( + $storages, + Http::STATUS_OK + ); + } + + /** * Get an external storage entry. * * @param int $id storage id diff --git a/apps/files_external/controller/userglobalstoragescontroller.php b/apps/files_external/controller/userglobalstoragescontroller.php new file mode 100644 index 00000000000..c6f777763e8 --- /dev/null +++ b/apps/files_external/controller/userglobalstoragescontroller.php @@ -0,0 +1,121 @@ +<?php +/** + * @author Robin McCorkell <rmccorkell@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_External\Controller; + +use \OCP\IRequest; +use \OCP\IL10N; +use \OCP\AppFramework\Http\DataResponse; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCA\Files_external\Service\UserGlobalStoragesService; +use \OCA\Files_external\NotFoundException; +use \OCA\Files_external\Lib\StorageConfig; +use \OCA\Files_External\Lib\Backend\Backend; + +/** + * User global storages controller + */ +class UserGlobalStoragesController extends StoragesController { + /** + * Creates a new user global storages controller. + * + * @param string $AppName application name + * @param IRequest $request request object + * @param IL10N $l10n l10n service + * @param UserGlobalStoragesService $userGlobalStoragesService storage service + */ + public function __construct( + $AppName, + IRequest $request, + IL10N $l10n, + UserGlobalStoragesService $userGlobalStoragesService + ) { + parent::__construct( + $AppName, + $request, + $l10n, + $userGlobalStoragesService + ); + } + + /** + * Get all storage entries + * + * @return DataResponse + * + * @NoAdminRequired + */ + public function index() { + $storages = $this->service->getUniqueStorages(); + + // remove configuration data, this must be kept private + foreach ($storages as $storage) { + $this->sanitizeStorage($storage); + } + + return new DataResponse( + $storages, + Http::STATUS_OK + ); + } + + /** + * Get an external storage entry. + * + * @param int $id storage id + * @return DataResponse + * + * @NoAdminRequired + */ + public function show($id) { + try { + $storage = $this->service->getStorage($id); + + $this->updateStorageStatus($storage); + } catch (NotFoundException $e) { + return new DataResponse( + [ + 'message' => (string)$this->l10n->t('Storage with id "%i" not found', array($id)) + ], + Http::STATUS_NOT_FOUND + ); + } + + $this->sanitizeStorage($storage); + + return new DataResponse( + $storage, + Http::STATUS_OK + ); + } + + /** + * Remove sensitive data from a StorageConfig before returning it to the user + * + * @param StorageConfig $storage + */ + protected function sanitizeStorage(StorageConfig $storage) { + $storage->setBackendOptions([]); + $storage->setMountOptions([]); + } + +} diff --git a/apps/files_external/css/settings.css b/apps/files_external/css/settings.css index 35c7a395c58..c96c0cb97b9 100644 --- a/apps/files_external/css/settings.css +++ b/apps/files_external/css/settings.css @@ -1,4 +1,10 @@ -td.status > span { +#externalStorage td.status { + /* overwrite conflicting core styles */ + display: table-cell; + vertical-align: middle; +} + +#externalStorage td.status > span { display: inline-block; height: 16px; width: 16px; diff --git a/apps/files_external/js/app.js b/apps/files_external/js/app.js index 87507f93be3..d3ce2010ecd 100644 --- a/apps/files_external/js/app.js +++ b/apps/files_external/js/app.js @@ -54,7 +54,7 @@ OCA.External.App = { // folder in the files app instead of opening it directly fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { OCA.Files.App.setActiveView('files', {silent: true}); - OCA.Files.App.fileList.changeDirectory(context.$file.attr('data-path') + '/' + filename, true, true); + OCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true); }); fileActions.setDefault('dir', 'Open'); return fileActions; diff --git a/apps/files_external/js/public_key.js b/apps/files_external/js/public_key.js index a8546067452..5f9658381f0 100644 --- a/apps/files_external/js/public_key.js +++ b/apps/files_external/js/public_key.js @@ -1,10 +1,16 @@ $(document).ready(function() { - OCA.External.Settings.mountConfig.whenSelectAuthMechanism(function($tr, authMechanism, scheme) { + OCA.External.Settings.mountConfig.whenSelectAuthMechanism(function($tr, authMechanism, scheme, onCompletion) { if (scheme === 'publickey') { var config = $tr.find('.configuration'); if ($(config).find('[name="public_key_generate"]').length === 0) { setupTableRow($tr, config); + onCompletion.then(function() { + // If there's no private key, build one + if (0 === $(config).find('[data-parameter="private_key"]').val().length) { + generateKeys($tr); + } + }); } } }); @@ -22,10 +28,6 @@ $(document).ready(function() { .attr('value', t('files_external', 'Generate keys')) .attr('name', 'public_key_generate') ); - // If there's no private key, build one - if (0 === $(config).find('[data-parameter="private_key"]').val().length) { - generateKeys(tr); - } } function generateKeys(tr) { @@ -33,7 +35,7 @@ $(document).ready(function() { $.post(OC.filePath('files_external', 'ajax', 'public_key.php'), {}, function(result) { if (result && result.status === 'success') { - $(config).find('[data-parameter="public_key"]').val(result.data.public_key); + $(config).find('[data-parameter="public_key"]').val(result.data.public_key).keyup(); $(config).find('[data-parameter="private_key"]').val(result.data.private_key); OCA.External.Settings.mountConfig.saveStorageConfig(tr, function() { // Nothing to do diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 22f18fc29e3..134db41fc32 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -460,7 +460,6 @@ MountOptionsDropdown.prototype = { var $el = $(template()); this.$el = $el; - $el.addClass('hidden'); this.setOptions(mountOptions, enabledOptions); @@ -623,36 +622,7 @@ MountConfigListView.prototype = _.extend({ this._allBackends = this.$el.find('.selectBackend').data('configurations'); this._allAuthMechanisms = this.$el.find('#addMountPoint .authentication').data('mechanisms'); - //initialize hidden input field with list of users and groups - this.$el.find('tr:not(#addMountPoint)').each(function(i,tr) { - var $tr = $(tr); - var $applicable = $tr.find('.applicable'); - if ($applicable.length > 0) { - var groups = $applicable.data('applicable-groups'); - var groupsId = []; - $.each(groups, function () { - groupsId.push(this + '(group)'); - }); - var users = $applicable.data('applicable-users'); - if (users.indexOf('all') > -1 || users === '') { - $tr.find('.applicableUsers').val(''); - } else { - $tr.find('.applicableUsers').val(groupsId.concat(users).join(',')); - } - } - }); - - addSelect2(this.$el.find('tr:not(#addMountPoint) .applicableUsers'), this._userListLimit); - this.$el.tooltip({ - selector: '.status span', - container: 'body' - }); - this._initEvents(); - - this.$el.find('tbody tr:not(#addMountPoint)').each(function(i, tr) { - self.recheckStorageConfig($(tr)); - }); }, /** @@ -661,7 +631,7 @@ MountConfigListView.prototype = _.extend({ */ whenSelectBackend: function(callback) { this.$el.find('tbody tr:not(#addMountPoint)').each(function(i, tr) { - var backend = $(tr).find('.backend').data('class'); + var backend = $(tr).find('.backend').data('identifier'); callback($(tr), backend); }); this.on('selectBackend', callback); @@ -725,65 +695,41 @@ MountConfigListView.prototype = _.extend({ _onSelectBackend: function(event) { var $target = $(event.target); - var $el = this.$el; var $tr = $target.closest('tr'); - $el.find('tbody').append($tr.clone()); - $el.find('tbody tr').last().find('.mountPoint input').val(''); - $tr.data('constructing', true); - var selected = $target.find('option:selected').text(); - var backend = $target.val(); - $tr.find('.backend').text(selected); - if ($tr.find('.mountPoint input').val() === '') { - $tr.find('.mountPoint input').val(this._suggestMountPoint(selected)); - } - $tr.addClass(backend); - $tr.find('.backend').data('class', backend); - var backendConfiguration = this._allBackends[backend]; - - var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>'); - $.each(this._allAuthMechanisms, function(authClass, authMechanism) { - if (backendConfiguration['authSchemes'][authMechanism['scheme']]) { - selectAuthMechanism.append( - $('<option value="'+authClass+'" data-scheme="'+authMechanism['scheme']+'">'+authMechanism['name']+'</option>') - ); - } - }); - $tr.find('td.authentication').append(selectAuthMechanism); - - var $td = $tr.find('td.configuration'); - $.each(backendConfiguration['configuration'], _.partial(this.writeParameterInput, $td)); - - this.trigger('selectBackend', $tr, backend); - - selectAuthMechanism.trigger('change'); // generate configuration parameters for auth mechanism - - var priorityEl = $('<input type="hidden" class="priority" value="' + backendConfiguration['priority'] + '" />'); - $tr.append(priorityEl); - $td.children().not('[type=hidden]').first().focus(); - // FIXME default backend mount options - $tr.find('input.mountOptions').val(JSON.stringify({ - 'encrypt': true, - 'previews': true, - 'filesystem_check_changes': 1 - })); + var storageConfig = new this._storageConfigClass(); + storageConfig.mountPoint = $tr.find('.mountPoint input').val(); + storageConfig.backend = $target.val(); + $tr.find('.mountPoint input').val(''); - $tr.find('td').last().attr('class', 'remove'); - $tr.find('td.mountOptionsToggle').removeClass('hidden'); - $tr.find('td').last().removeAttr('style'); - $tr.removeAttr('id'); - $target.remove(); - addSelect2($tr.find('.applicableUsers'), this._userListLimit); + var onCompletion = jQuery.Deferred(); + $tr = this.newStorage(storageConfig, onCompletion); + onCompletion.resolve(); - $tr.removeData('constructing'); + $tr.find('td.configuration').children().not('[type=hidden]').first().focus(); this.saveStorageConfig($tr); }, _onSelectAuthMechanism: function(event) { var $target = $(event.target); var $tr = $target.closest('tr'); - var authMechanism = $target.val(); + + var onCompletion = jQuery.Deferred(); + this.configureAuthMechanism($tr, authMechanism, onCompletion); + onCompletion.resolve(); + + this.saveStorageConfig($tr); + }, + + /** + * Configure the storage config with a new authentication mechanism + * + * @param {jQuery} $tr config row + * @param {string} authMechanism + * @param {jQuery.Deferred} onCompletion + */ + configureAuthMechanism: function($tr, authMechanism, onCompletion) { var authMechanismConfiguration = this._allAuthMechanisms[authMechanism]; var $td = $tr.find('td.configuration'); $td.find('.auth-param').remove(); @@ -793,15 +739,172 @@ MountConfigListView.prototype = _.extend({ )); this.trigger('selectAuthMechanism', - $tr, authMechanism, authMechanismConfiguration['scheme'] + $tr, authMechanism, authMechanismConfiguration['scheme'], onCompletion ); + }, + + /** + * Create a config row for a new storage + * + * @param {StorageConfig} storageConfig storage config to pull values from + * @param {jQuery.Deferred} onCompletion + * @return {jQuery} created row + */ + newStorage: function(storageConfig, onCompletion) { + var mountPoint = storageConfig.mountPoint; + var backend = this._allBackends[storageConfig.backend]; + + // FIXME: Replace with a proper Handlebar template + var $tr = this.$el.find('tr#addMountPoint'); + this.$el.find('tbody').append($tr.clone()); + + $tr.find('td').last().attr('class', 'remove'); + $tr.find('td.mountOptionsToggle').removeClass('hidden'); + $tr.find('td').last().removeAttr('style'); + $tr.removeAttr('id'); + $tr.find('select#selectBackend'); + addSelect2($tr.find('.applicableUsers'), this._userListLimit); + + if (storageConfig.id) { + $tr.data('id', storageConfig.id); + } + + $tr.find('.backend').text(backend.name); + if (mountPoint === '') { + mountPoint = this._suggestMountPoint(backend.name); + } + $tr.find('.mountPoint input').val(mountPoint); + $tr.addClass(backend.identifier); + $tr.find('.backend').data('identifier', backend.identifier); + + var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>'); + $.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) { + if (backend.authSchemes[authMechanism.scheme]) { + selectAuthMechanism.append( + $('<option value="'+authMechanism.identifier+'" data-scheme="'+authMechanism.scheme+'">'+authMechanism.name+'</option>') + ); + } + }); + if (storageConfig.authMechanism) { + selectAuthMechanism.val(storageConfig.authMechanism); + } else { + storageConfig.authMechanism = selectAuthMechanism.val(); + } + $tr.find('td.authentication').append(selectAuthMechanism); + + var $td = $tr.find('td.configuration'); + $.each(backend.configuration, _.partial(this.writeParameterInput, $td)); + + this.trigger('selectBackend', $tr, backend.identifier, onCompletion); + this.configureAuthMechanism($tr, storageConfig.authMechanism, onCompletion); + + if (storageConfig.backendOptions) { + $td.children().each(function() { + var input = $(this); + var val = storageConfig.backendOptions[input.data('parameter')]; + if (val !== undefined) { + input.val(storageConfig.backendOptions[input.data('parameter')]); + highlightInput(input); + } + }); + } + + var applicable = []; + if (storageConfig.applicableUsers) { + applicable = applicable.concat(storageConfig.applicableUsers); + } + if (storageConfig.applicableGroups) { + applicable = applicable.concat( + _.map(storageConfig.applicableGroups, function(group) { + return group+'(group)'; + }) + ); + } + $tr.find('.applicableUsers').val(applicable).trigger('change'); + + var priorityEl = $('<input type="hidden" class="priority" value="' + backend.priority + '" />'); + $tr.append(priorityEl); - if ($tr.data('constructing') !== true) { - // row is ready, trigger recheck - this.saveStorageConfig($tr); + if (storageConfig.mountOptions) { + $tr.find('input.mountOptions').val(JSON.stringify(storageConfig.mountOptions)); + } else { + // FIXME default backend mount options + $tr.find('input.mountOptions').val(JSON.stringify({ + 'encrypt': true, + 'previews': true, + 'filesystem_check_changes': 1 + })); } + + return $tr; }, + /** + * Load storages into config rows + */ + loadStorages: function() { + var self = this; + + if (this._isPersonal) { + // load userglobal storages + $.ajax({ + type: 'GET', + url: OC.generateUrl('apps/files_external/userglobalstorages'), + contentType: 'application/json', + success: function(result) { + var onCompletion = jQuery.Deferred(); + $.each(result, function(i, storageParams) { + storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash + var storageConfig = new self._storageConfigClass(); + _.extend(storageConfig, storageParams); + var $tr = self.newStorage(storageConfig, onCompletion); + + // userglobal storages must be at the top of the list + $tr.detach(); + self.$el.prepend($tr); + + var $authentication = $tr.find('.authentication'); + $authentication.text($authentication.find('select option:selected').text()); + + // userglobal storages do not expose configuration data + $tr.find('.configuration').text(t('files_external', 'Admin defined')); + + // disable any other inputs + $tr.find('.mountOptionsToggle, .remove').empty(); + $tr.find('input, select, button').attr('disabled', 'disabled'); + }); + onCompletion.resolve(); + } + }); + } + + var url = this._storageConfigClass.prototype._url; + + $.ajax({ + type: 'GET', + url: OC.generateUrl(url), + contentType: 'application/json', + success: function(result) { + var onCompletion = jQuery.Deferred(); + $.each(result, function(i, storageParams) { + storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash + var storageConfig = new self._storageConfigClass(); + _.extend(storageConfig, storageParams); + var $tr = self.newStorage(storageConfig, onCompletion); + self.recheckStorageConfig($tr); + }); + onCompletion.resolve(); + } + }); + }, + + /** + * @param {jQuery} $td + * @param {string} parameter + * @param {string} placeholder + * @param {Array} classes + * @return {jQuery} newly created input + */ writeParameterInput: function($td, parameter, placeholder, classes) { classes = $.isArray(classes) ? classes : []; classes.push('added'); @@ -822,6 +925,7 @@ MountConfigListView.prototype = _.extend({ } highlightInput(newElement); $td.append(newElement); + return newElement; }, /** @@ -831,14 +935,14 @@ MountConfigListView.prototype = _.extend({ * @return {OCA.External.StorageConfig} storage model instance */ getStorageConfig: function($tr) { - var storageId = parseInt($tr.attr('data-id'), 10); + var storageId = $tr.data('id'); if (!storageId) { // new entry storageId = null; } var storage = new this._storageConfigClass(storageId); storage.mountPoint = $tr.find('.mountPoint input').val(); - storage.backend = $tr.find('.backend').data('class'); + storage.backend = $tr.find('.backend').data('identifier'); storage.authMechanism = $tr.find('.selectAuthMechanism').val(); var classOptions = {}; @@ -951,8 +1055,8 @@ MountConfigListView.prototype = _.extend({ if (concurrentTimer === undefined || $tr.data('save-timer') === concurrentTimer ) { - self.updateStatus($tr, result.status, result.statusMessage); - $tr.attr('data-id', result.id); + self.updateStatus($tr, result.status); + $tr.data('id', result.id); if (_.isFunction(callback)) { callback(storage); @@ -1106,6 +1210,7 @@ $(document).ready(function() { var mountConfigListView = new MountConfigListView($('#externalStorage'), { encryptionEnabled: encryptionEnabled }); + mountConfigListView.loadStorages(); $('#sslCertificate').on('click', 'td.remove>img', function() { var $tr = $(this).closest('tr'); diff --git a/apps/files_external/l10n/ast.js b/apps/files_external/l10n/ast.js index b663657e029..f67309631e8 100644 --- a/apps/files_external/l10n/ast.js +++ b/apps/files_external/l10n/ast.js @@ -53,8 +53,8 @@ OC.L10N.register( "Folder name" : "Nome de la carpeta", "Configuration" : "Configuración", "Available for" : "Disponible pa", - "Delete" : "Desaniciar", "Add storage" : "Amestar almacenamientu", + "Delete" : "Desaniciar", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamientu esternu" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/ast.json b/apps/files_external/l10n/ast.json index 0e98fe5a24a..b4bc4355bc4 100644 --- a/apps/files_external/l10n/ast.json +++ b/apps/files_external/l10n/ast.json @@ -51,8 +51,8 @@ "Folder name" : "Nome de la carpeta", "Configuration" : "Configuración", "Available for" : "Disponible pa", - "Delete" : "Desaniciar", "Add storage" : "Amestar almacenamientu", + "Delete" : "Desaniciar", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamientu esternu" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/az.js b/apps/files_external/l10n/az.js index 700e36a4aef..42c9a496185 100644 --- a/apps/files_external/l10n/az.js +++ b/apps/files_external/l10n/az.js @@ -57,9 +57,9 @@ OC.L10N.register( "Folder name" : "Qovluq adı", "Configuration" : "Konfiqurasiya", "Available for" : "Üçün mövcuddur", + "Add storage" : "Deponu əlavə et", "Advanced settings" : "İrəliləmiş quraşdırmalar", "Delete" : "Sil", - "Add storage" : "Deponu əlavə et", "Allow users to mount the following external storage" : "Göstərilən kənar deponun bərkidilməsi üçün istifadəçilərə izin ver" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/az.json b/apps/files_external/l10n/az.json index 6cccabb2dd6..4e01cdf954c 100644 --- a/apps/files_external/l10n/az.json +++ b/apps/files_external/l10n/az.json @@ -55,9 +55,9 @@ "Folder name" : "Qovluq adı", "Configuration" : "Konfiqurasiya", "Available for" : "Üçün mövcuddur", + "Add storage" : "Deponu əlavə et", "Advanced settings" : "İrəliləmiş quraşdırmalar", "Delete" : "Sil", - "Add storage" : "Deponu əlavə et", "Allow users to mount the following external storage" : "Göstərilən kənar deponun bərkidilməsi üçün istifadəçilərə izin ver" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/bg_BG.js b/apps/files_external/l10n/bg_BG.js index f14b13d2a0e..cc52682f956 100644 --- a/apps/files_external/l10n/bg_BG.js +++ b/apps/files_external/l10n/bg_BG.js @@ -59,9 +59,9 @@ OC.L10N.register( "Folder name" : "Име на папката", "Configuration" : "Настройки", "Available for" : "Достъпно за", + "Add storage" : "Добави дисково пространство", "Advanced settings" : "Разширени настройки", "Delete" : "Изтрий", - "Add storage" : "Добави дисково пространство", "Allow users to mount the following external storage" : "Разреши на потребителите да прикачват следното външно дисково пространство" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/bg_BG.json b/apps/files_external/l10n/bg_BG.json index 6cce8fd5cfa..df3fe1c20e8 100644 --- a/apps/files_external/l10n/bg_BG.json +++ b/apps/files_external/l10n/bg_BG.json @@ -57,9 +57,9 @@ "Folder name" : "Име на папката", "Configuration" : "Настройки", "Available for" : "Достъпно за", + "Add storage" : "Добави дисково пространство", "Advanced settings" : "Разширени настройки", "Delete" : "Изтрий", - "Add storage" : "Добави дисково пространство", "Allow users to mount the following external storage" : "Разреши на потребителите да прикачват следното външно дисково пространство" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/ca.js b/apps/files_external/l10n/ca.js index b14057ea420..56c5f72abf9 100644 --- a/apps/files_external/l10n/ca.js +++ b/apps/files_external/l10n/ca.js @@ -66,9 +66,9 @@ OC.L10N.register( "Folder name" : "Nom de la carpeta", "Configuration" : "Configuració", "Available for" : "Disponible per", + "Add storage" : "Afegeix emmagatzemament", "Advanced settings" : "Configuració avançada", "Delete" : "Esborra", - "Add storage" : "Afegeix emmagatzemament", "Allow users to mount the following external storage" : "Permet als usuaris muntar els dispositius externs següents" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/ca.json b/apps/files_external/l10n/ca.json index cce51970c18..7a166c3c011 100644 --- a/apps/files_external/l10n/ca.json +++ b/apps/files_external/l10n/ca.json @@ -64,9 +64,9 @@ "Folder name" : "Nom de la carpeta", "Configuration" : "Configuració", "Available for" : "Disponible per", + "Add storage" : "Afegeix emmagatzemament", "Advanced settings" : "Configuració avançada", "Delete" : "Esborra", - "Add storage" : "Afegeix emmagatzemament", "Allow users to mount the following external storage" : "Permet als usuaris muntar els dispositius externs següents" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 3e9a14f9998..408d942a1c9 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Pokaždé když je použit souborový systém", "All users. Type to select user or group." : "Všichni uživatelé. Začněte psát pro výběr uživatelů a skupin.", "(group)" : "(skupina)", + "Admin defined" : "Nastaveno administrátorem", "Saved" : "Uloženo", "Access key" : "Přístupový klíč", "Secret key" : "Tajný klíč", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "Ověření", "Configuration" : "Nastavení", "Available for" : "Dostupné pro", + "Add storage" : "Přidat úložiště", "Advanced settings" : "Pokročilá nastavení", "Delete" : "Smazat", - "Add storage" : "Přidat úložiště", "Allow users to mount external storage" : "Povolit uživatelům připojení externího úložiště", "Allow users to mount the following external storage" : "Povolit uživatelů připojit následující externí úložiště" }, diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index 4c6f940666e..746d5b5c2e6 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Pokaždé když je použit souborový systém", "All users. Type to select user or group." : "Všichni uživatelé. Začněte psát pro výběr uživatelů a skupin.", "(group)" : "(skupina)", + "Admin defined" : "Nastaveno administrátorem", "Saved" : "Uloženo", "Access key" : "Přístupový klíč", "Secret key" : "Tajný klíč", @@ -97,9 +98,9 @@ "Authentication" : "Ověření", "Configuration" : "Nastavení", "Available for" : "Dostupné pro", + "Add storage" : "Přidat úložiště", "Advanced settings" : "Pokročilá nastavení", "Delete" : "Smazat", - "Add storage" : "Přidat úložiště", "Allow users to mount external storage" : "Povolit uživatelům připojení externího úložiště", "Allow users to mount the following external storage" : "Povolit uživatelů připojit následující externí úložiště" },"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" diff --git a/apps/files_external/l10n/da.js b/apps/files_external/l10n/da.js index ba5d572a206..dc86b6f1c06 100644 --- a/apps/files_external/l10n/da.js +++ b/apps/files_external/l10n/da.js @@ -98,9 +98,9 @@ OC.L10N.register( "Authentication" : "Godkendelse", "Configuration" : "Opsætning", "Available for" : "Tilgængelig for", + "Add storage" : "Tilføj lager", "Advanced settings" : "Avancerede indstillinger", "Delete" : "Slet", - "Add storage" : "Tilføj lager", "Allow users to mount the following external storage" : "Tillad brugere at montere følgende som eksternt lager" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/da.json b/apps/files_external/l10n/da.json index c819040bc74..bb7961fbb2b 100644 --- a/apps/files_external/l10n/da.json +++ b/apps/files_external/l10n/da.json @@ -96,9 +96,9 @@ "Authentication" : "Godkendelse", "Configuration" : "Opsætning", "Available for" : "Tilgængelig for", + "Add storage" : "Tilføj lager", "Advanced settings" : "Avancerede indstillinger", "Delete" : "Slet", - "Add storage" : "Tilføj lager", "Allow users to mount the following external storage" : "Tillad brugere at montere følgende som eksternt lager" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index c26322495d6..8fbbee567a7 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -70,6 +70,7 @@ OC.L10N.register( "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "OpenStack Object Storage" : "Openstack-Objektspeicher", + "Service name" : "Service Name", "<b>Note:</b> " : "<b>Hinweis:</b> ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", @@ -84,9 +85,10 @@ OC.L10N.register( "Authentication" : "Authentifizierung", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", - "Allow users to mount the following external storage" : "Erlaube es Benutzern, den folgenden externen Speicher einzubinden" + "Allow users to mount external storage" : "Benutzern erlauben, externen Speicher einzubinden", + "Allow users to mount the following external storage" : "Benutzern erlauben, den oder die folgenden externen Speicher einzubinden:" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index adec32d072b..02e495251a8 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -68,6 +68,7 @@ "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "OpenStack Object Storage" : "Openstack-Objektspeicher", + "Service name" : "Service Name", "<b>Note:</b> " : "<b>Hinweis:</b> ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich zur Installation an Deinen Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wende Dich sich zur Installation an Deinen Systemadministrator.", @@ -82,9 +83,10 @@ "Authentication" : "Authentifizierung", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", - "Allow users to mount the following external storage" : "Erlaube es Benutzern, den folgenden externen Speicher einzubinden" + "Allow users to mount external storage" : "Benutzern erlauben, externen Speicher einzubinden", + "Allow users to mount the following external storage" : "Benutzern erlauben, den oder die folgenden externen Speicher einzubinden:" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js index c30fcb95919..06ead3b9716 100644 --- a/apps/files_external/l10n/de_DE.js +++ b/apps/files_external/l10n/de_DE.js @@ -7,10 +7,12 @@ OC.L10N.register( "Storage with id \"%i\" not found" : "Der Speicher mit der ID „%i“ wurde nicht gefunden", "Invalid mount point" : "Ungültiger mount point", "Invalid storage backend \"%s\"" : "Ungültiges Speicher-Backend „%s“", + "Insufficient data: %s" : "Unzureichende Daten: %s", "Personal" : "Persönlich", "System" : "System", "Grant access" : "Zugriff gestatten", "Access granted" : "Zugriff gestattet", + "Error configuring OAuth1" : "Fehler beim Konfigurieren von OAuth1", "Generate keys" : "Schlüssel erzeugen", "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "Enable encryption" : "Verschlüsselung aktivieren", @@ -30,6 +32,7 @@ OC.L10N.register( "Username" : "Benutzername", "Password" : "Passwort", "API key" : "API-Schlüssel", + "Username and password" : "Benutzername und Passwort", "Public key" : "Öffentlicher Schlüssel", "Amazon S3" : "Amazon S3", "Bucket" : "Bucket", @@ -43,17 +46,23 @@ OC.L10N.register( "Remote subfolder" : "Entfernter Unterordner", "Secure https://" : "Sicheres https://", "Dropbox" : "Dropbox", + "FTP" : "FTP", "Host" : "Host", "Secure ftps://" : "Sicheres ftps://", + "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", "ownCloud" : "ownCloud", + "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", + "SMB / CIFS" : "SMB / CIFS", "Share" : "Share", + "Domain" : "Domain", "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "OpenStack Object Storage" : "Openstack-Objektspeicher", + "Service name" : "Dienst Name", "<b>Note:</b> " : "<b>Hinweis:</b> ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", @@ -67,9 +76,10 @@ OC.L10N.register( "Folder name" : "Ordnername", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", - "Allow users to mount the following external storage" : "Erlauben Sie Benutzern, folgende externe Speicher einzubinden" + "Allow users to mount external storage" : "Erlauben Sie den Benutzern externen Speicher hinzuzufügen", + "Allow users to mount the following external storage" : "Benutzern erlauben, den oder die folgenden externen Speicher einzubinden:" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json index 7fec06bf90f..8e19cb9333d 100644 --- a/apps/files_external/l10n/de_DE.json +++ b/apps/files_external/l10n/de_DE.json @@ -5,10 +5,12 @@ "Storage with id \"%i\" not found" : "Der Speicher mit der ID „%i“ wurde nicht gefunden", "Invalid mount point" : "Ungültiger mount point", "Invalid storage backend \"%s\"" : "Ungültiges Speicher-Backend „%s“", + "Insufficient data: %s" : "Unzureichende Daten: %s", "Personal" : "Persönlich", "System" : "System", "Grant access" : "Zugriff gestatten", "Access granted" : "Zugriff gestattet", + "Error configuring OAuth1" : "Fehler beim Konfigurieren von OAuth1", "Generate keys" : "Schlüssel erzeugen", "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "Enable encryption" : "Verschlüsselung aktivieren", @@ -28,6 +30,7 @@ "Username" : "Benutzername", "Password" : "Passwort", "API key" : "API-Schlüssel", + "Username and password" : "Benutzername und Passwort", "Public key" : "Öffentlicher Schlüssel", "Amazon S3" : "Amazon S3", "Bucket" : "Bucket", @@ -41,17 +44,23 @@ "Remote subfolder" : "Entfernter Unterordner", "Secure https://" : "Sicheres https://", "Dropbox" : "Dropbox", + "FTP" : "FTP", "Host" : "Host", "Secure ftps://" : "Sicheres ftps://", + "Google Drive" : "Google Drive", "Local" : "Lokal", "Location" : "Ort", "ownCloud" : "ownCloud", + "SFTP" : "SFTP", "Root" : "Root", "SFTP with secret key login" : "SFTP mit dem Login über einen geheimen Schlüssel", + "SMB / CIFS" : "SMB / CIFS", "Share" : "Share", + "Domain" : "Domain", "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "OpenStack Object Storage" : "Openstack-Objektspeicher", + "Service name" : "Dienst Name", "<b>Note:</b> " : "<b>Hinweis:</b> ", "<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die cURL-Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", "<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Hinweis:</b> Die FTP Unterstützung von PHP ist nicht aktiviert oder installiert. Das Hinzufügen von %s ist nicht möglich. Bitte wenden Sie sich zur Installation an Ihren Systemadministrator.", @@ -65,9 +74,10 @@ "Folder name" : "Ordnername", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", - "Allow users to mount the following external storage" : "Erlauben Sie Benutzern, folgende externe Speicher einzubinden" + "Allow users to mount external storage" : "Erlauben Sie den Benutzern externen Speicher hinzuzufügen", + "Allow users to mount the following external storage" : "Benutzern erlauben, den oder die folgenden externen Speicher einzubinden:" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index a83c241af7a..294ec9da6ff 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -99,9 +99,9 @@ OC.L10N.register( "Authentication" : "Πιστοποίηση", "Configuration" : "Ρυθμίσεις", "Available for" : "Διαθέσιμο για", + "Add storage" : "Προσθηκη αποθηκευσης", "Advanced settings" : "Ρυθμίσεις για προχωρημένους", "Delete" : "Διαγραφή", - "Add storage" : "Προσθηκη αποθηκευσης", "Allow users to mount external storage" : "Να επιτρέπεται στους χρήστες η σύνδεση εξωτερικού χώρου", "Allow users to mount the following external storage" : "Χορήγηση άδειας στους χρήστες να συνδέσουν τα παρακάτω εξωτερικά μέσα αποθήκευσης" }, diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index 32f223cf8c0..431e81c3d7a 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -97,9 +97,9 @@ "Authentication" : "Πιστοποίηση", "Configuration" : "Ρυθμίσεις", "Available for" : "Διαθέσιμο για", + "Add storage" : "Προσθηκη αποθηκευσης", "Advanced settings" : "Ρυθμίσεις για προχωρημένους", "Delete" : "Διαγραφή", - "Add storage" : "Προσθηκη αποθηκευσης", "Allow users to mount external storage" : "Να επιτρέπεται στους χρήστες η σύνδεση εξωτερικού χώρου", "Allow users to mount the following external storage" : "Χορήγηση άδειας στους χρήστες να συνδέσουν τα παρακάτω εξωτερικά μέσα αποθήκευσης" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_external/l10n/en_GB.js b/apps/files_external/l10n/en_GB.js index 9829bd3e8c7..9efc720eb18 100644 --- a/apps/files_external/l10n/en_GB.js +++ b/apps/files_external/l10n/en_GB.js @@ -67,9 +67,9 @@ OC.L10N.register( "Folder name" : "Folder name", "Configuration" : "Configuration", "Available for" : "Available for", + "Add storage" : "Add storage", "Advanced settings" : "Advanced settings", "Delete" : "Delete", - "Add storage" : "Add storage", "Allow users to mount the following external storage" : "Allow users to mount the following external storage" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/en_GB.json b/apps/files_external/l10n/en_GB.json index 88467528431..87deeec5989 100644 --- a/apps/files_external/l10n/en_GB.json +++ b/apps/files_external/l10n/en_GB.json @@ -65,9 +65,9 @@ "Folder name" : "Folder name", "Configuration" : "Configuration", "Available for" : "Available for", + "Add storage" : "Add storage", "Advanced settings" : "Advanced settings", "Delete" : "Delete", - "Add storage" : "Add storage", "Allow users to mount the following external storage" : "Allow users to mount the following external storage" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/eo.js b/apps/files_external/l10n/eo.js index ce3dd21c012..ddab2360a6d 100644 --- a/apps/files_external/l10n/eo.js +++ b/apps/files_external/l10n/eo.js @@ -38,8 +38,8 @@ OC.L10N.register( "Folder name" : "Dosierujnomo", "Configuration" : "Agordo", "Available for" : "Disponebla por", - "Delete" : "Forigi", "Add storage" : "Aldoni memorilon", + "Delete" : "Forigi", "Allow users to mount the following external storage" : "Permesi uzantojn munti la jenajn malenajn memorilojn" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/eo.json b/apps/files_external/l10n/eo.json index d8c620d24c2..ec91f40abac 100644 --- a/apps/files_external/l10n/eo.json +++ b/apps/files_external/l10n/eo.json @@ -36,8 +36,8 @@ "Folder name" : "Dosierujnomo", "Configuration" : "Agordo", "Available for" : "Disponebla por", - "Delete" : "Forigi", "Add storage" : "Aldoni memorilon", + "Delete" : "Forigi", "Allow users to mount the following external storage" : "Permesi uzantojn munti la jenajn malenajn memorilojn" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index 5415e8963cd..46de520f55e 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -85,9 +85,9 @@ OC.L10N.register( "Authentication" : "Autenticación", "Configuration" : "Configuración", "Available for" : "Disponible para", + "Add storage" : "Añadir almacenamiento", "Advanced settings" : "Configuración avanzada", "Delete" : "Eliminar", - "Add storage" : "Añadir almacenamiento", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamiento externo" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index 10cbf0c974a..3748040fdd4 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -83,9 +83,9 @@ "Authentication" : "Autenticación", "Configuration" : "Configuración", "Available for" : "Disponible para", + "Add storage" : "Añadir almacenamiento", "Advanced settings" : "Configuración avanzada", "Delete" : "Eliminar", - "Add storage" : "Añadir almacenamiento", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamiento externo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/es_AR.js b/apps/files_external/l10n/es_AR.js index fd242104c8c..7fb87f1a1d3 100644 --- a/apps/files_external/l10n/es_AR.js +++ b/apps/files_external/l10n/es_AR.js @@ -22,7 +22,7 @@ OC.L10N.register( "External Storage" : "Almacenamiento externo", "Folder name" : "Nombre de la carpeta", "Configuration" : "Configuración", - "Delete" : "Borrar", - "Add storage" : "Añadir almacenamiento" + "Add storage" : "Añadir almacenamiento", + "Delete" : "Borrar" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/es_AR.json b/apps/files_external/l10n/es_AR.json index d9e91a3af47..9fb735f7a3a 100644 --- a/apps/files_external/l10n/es_AR.json +++ b/apps/files_external/l10n/es_AR.json @@ -20,7 +20,7 @@ "External Storage" : "Almacenamiento externo", "Folder name" : "Nombre de la carpeta", "Configuration" : "Configuración", - "Delete" : "Borrar", - "Add storage" : "Añadir almacenamiento" + "Add storage" : "Añadir almacenamiento", + "Delete" : "Borrar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/es_MX.js b/apps/files_external/l10n/es_MX.js index 9682e360a58..c805ce16662 100644 --- a/apps/files_external/l10n/es_MX.js +++ b/apps/files_external/l10n/es_MX.js @@ -21,7 +21,7 @@ OC.L10N.register( "External Storage" : "Almacenamiento externo", "Folder name" : "Nombre de la carpeta", "Configuration" : "Configuración", - "Delete" : "Eliminar", - "Add storage" : "Añadir almacenamiento" + "Add storage" : "Añadir almacenamiento", + "Delete" : "Eliminar" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/es_MX.json b/apps/files_external/l10n/es_MX.json index 81b2f408d11..1df9bf70436 100644 --- a/apps/files_external/l10n/es_MX.json +++ b/apps/files_external/l10n/es_MX.json @@ -19,7 +19,7 @@ "External Storage" : "Almacenamiento externo", "Folder name" : "Nombre de la carpeta", "Configuration" : "Configuración", - "Delete" : "Eliminar", - "Add storage" : "Añadir almacenamiento" + "Add storage" : "Añadir almacenamiento", + "Delete" : "Eliminar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/et_EE.js b/apps/files_external/l10n/et_EE.js index ae66daa37a6..fa22b4c6591 100644 --- a/apps/files_external/l10n/et_EE.js +++ b/apps/files_external/l10n/et_EE.js @@ -77,9 +77,9 @@ OC.L10N.register( "Authentication" : "Autentimine", "Configuration" : "Seadistamine", "Available for" : "Saadaval", + "Add storage" : "Lisa andmehoidla", "Advanced settings" : "Lisavalikud", "Delete" : "Kustuta", - "Add storage" : "Lisa andmehoidla", "Allow users to mount the following external storage" : "Võimalda kasutajatel ühendada järgmist välist andmehoidlat" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/et_EE.json b/apps/files_external/l10n/et_EE.json index f2cc31e46e1..37e7cc282ce 100644 --- a/apps/files_external/l10n/et_EE.json +++ b/apps/files_external/l10n/et_EE.json @@ -75,9 +75,9 @@ "Authentication" : "Autentimine", "Configuration" : "Seadistamine", "Available for" : "Saadaval", + "Add storage" : "Lisa andmehoidla", "Advanced settings" : "Lisavalikud", "Delete" : "Kustuta", - "Add storage" : "Lisa andmehoidla", "Allow users to mount the following external storage" : "Võimalda kasutajatel ühendada järgmist välist andmehoidlat" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/eu.js b/apps/files_external/l10n/eu.js index 599229a92b3..58742552e76 100644 --- a/apps/files_external/l10n/eu.js +++ b/apps/files_external/l10n/eu.js @@ -52,8 +52,8 @@ OC.L10N.register( "Folder name" : "Karpetaren izena", "Configuration" : "Konfigurazioa", "Available for" : "Hauentzat eskuragarri", - "Delete" : "Ezabatu", "Add storage" : "Gehitu biltegiratzea", + "Delete" : "Ezabatu", "Allow users to mount the following external storage" : "Baimendu erabiltzaileak hurrengo kanpo biltegiratzeak muntatzen" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/eu.json b/apps/files_external/l10n/eu.json index 5a568893060..f039441b464 100644 --- a/apps/files_external/l10n/eu.json +++ b/apps/files_external/l10n/eu.json @@ -50,8 +50,8 @@ "Folder name" : "Karpetaren izena", "Configuration" : "Konfigurazioa", "Available for" : "Hauentzat eskuragarri", - "Delete" : "Ezabatu", "Add storage" : "Gehitu biltegiratzea", + "Delete" : "Ezabatu", "Allow users to mount the following external storage" : "Baimendu erabiltzaileak hurrengo kanpo biltegiratzeak muntatzen" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/fa.js b/apps/files_external/l10n/fa.js index a18f7cdcf5c..0c1076fc994 100644 --- a/apps/files_external/l10n/fa.js +++ b/apps/files_external/l10n/fa.js @@ -57,8 +57,8 @@ OC.L10N.register( "Authentication" : "احراز هویت", "Configuration" : "پیکربندی", "Available for" : "در دسترس برای", + "Add storage" : "اضافه کردن حافظه", "Advanced settings" : "تنظیمات پیشرفته", - "Delete" : "حذف", - "Add storage" : "اضافه کردن حافظه" + "Delete" : "حذف" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/fa.json b/apps/files_external/l10n/fa.json index 4bc16f72f54..056bad259a6 100644 --- a/apps/files_external/l10n/fa.json +++ b/apps/files_external/l10n/fa.json @@ -55,8 +55,8 @@ "Authentication" : "احراز هویت", "Configuration" : "پیکربندی", "Available for" : "در دسترس برای", + "Add storage" : "اضافه کردن حافظه", "Advanced settings" : "تنظیمات پیشرفته", - "Delete" : "حذف", - "Add storage" : "اضافه کردن حافظه" + "Delete" : "حذف" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/fi_FI.js b/apps/files_external/l10n/fi_FI.js index f91dec93310..5a2c3a9aa66 100644 --- a/apps/files_external/l10n/fi_FI.js +++ b/apps/files_external/l10n/fi_FI.js @@ -76,9 +76,9 @@ OC.L10N.register( "Authentication" : "Tunnistautuminen", "Configuration" : "Asetukset", "Available for" : "Saatavuus", + "Add storage" : "Lisää tallennustila", "Advanced settings" : "Lisäasetukset", "Delete" : "Poista", - "Add storage" : "Lisää tallennustila", "Allow users to mount external storage" : "Salli käyttäjien liittää erillisiä tallennustiloja", "Allow users to mount the following external storage" : "Salli käyttäjien liittää seuraavat erilliset tallennusvälineet" }, diff --git a/apps/files_external/l10n/fi_FI.json b/apps/files_external/l10n/fi_FI.json index a2033b4c578..d2a8cf16278 100644 --- a/apps/files_external/l10n/fi_FI.json +++ b/apps/files_external/l10n/fi_FI.json @@ -74,9 +74,9 @@ "Authentication" : "Tunnistautuminen", "Configuration" : "Asetukset", "Available for" : "Saatavuus", + "Add storage" : "Lisää tallennustila", "Advanced settings" : "Lisäasetukset", "Delete" : "Poista", - "Add storage" : "Lisää tallennustila", "Allow users to mount external storage" : "Salli käyttäjien liittää erillisiä tallennustiloja", "Allow users to mount the following external storage" : "Salli käyttäjien liittää seuraavat erilliset tallennusvälineet" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index 1389cd1233b..8ff4fcdfdd9 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Chaque fois que le système de fichiers est utilisé", "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", + "Admin defined" : "Défini par l'administrateur", "Saved" : "Sauvegardé", "Access key" : "Clé d'accès", "Secret key" : "Clé secrète", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "Authentification", "Configuration" : "Configuration", "Available for" : "Disponible pour", + "Add storage" : "Ajouter un support de stockage", "Advanced settings" : "Paramètres avancés", "Delete" : "Supprimer", - "Add storage" : "Ajouter un support de stockage", "Allow users to mount external storage" : "Autoriser les utilisateurs à monter des espaces de stockage externes", "Allow users to mount the following external storage" : "Autoriser les utilisateurs à monter les stockages externes suivants" }, diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index 9d078bf13fc..9a610bd964b 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Chaque fois que le système de fichiers est utilisé", "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", + "Admin defined" : "Défini par l'administrateur", "Saved" : "Sauvegardé", "Access key" : "Clé d'accès", "Secret key" : "Clé secrète", @@ -97,9 +98,9 @@ "Authentication" : "Authentification", "Configuration" : "Configuration", "Available for" : "Disponible pour", + "Add storage" : "Ajouter un support de stockage", "Advanced settings" : "Paramètres avancés", "Delete" : "Supprimer", - "Add storage" : "Ajouter un support de stockage", "Allow users to mount external storage" : "Autoriser les utilisateurs à monter des espaces de stockage externes", "Allow users to mount the following external storage" : "Autoriser les utilisateurs à monter les stockages externes suivants" },"pluralForm" :"nplurals=2; plural=(n > 1);" diff --git a/apps/files_external/l10n/gl.js b/apps/files_external/l10n/gl.js index 5827a6ab57f..044b7c34df1 100644 --- a/apps/files_external/l10n/gl.js +++ b/apps/files_external/l10n/gl.js @@ -67,9 +67,9 @@ OC.L10N.register( "Folder name" : "Nome do cartafol", "Configuration" : "Configuración", "Available for" : "Dispoñíbel para", + "Add storage" : "Engadir almacenamento", "Advanced settings" : "Axustes avanzados", "Delete" : "Eliminar", - "Add storage" : "Engadir almacenamento", "Allow users to mount the following external storage" : "Permitirlle aos usuarios montar o seguinte almacenamento externo" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/gl.json b/apps/files_external/l10n/gl.json index 29dde23c329..143b9a53b43 100644 --- a/apps/files_external/l10n/gl.json +++ b/apps/files_external/l10n/gl.json @@ -65,9 +65,9 @@ "Folder name" : "Nome do cartafol", "Configuration" : "Configuración", "Available for" : "Dispoñíbel para", + "Add storage" : "Engadir almacenamento", "Advanced settings" : "Axustes avanzados", "Delete" : "Eliminar", - "Add storage" : "Engadir almacenamento", "Allow users to mount the following external storage" : "Permitirlle aos usuarios montar o seguinte almacenamento externo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/hr.js b/apps/files_external/l10n/hr.js index 4ab71f76ffb..8c632eba518 100644 --- a/apps/files_external/l10n/hr.js +++ b/apps/files_external/l10n/hr.js @@ -50,8 +50,8 @@ OC.L10N.register( "Folder name" : "Naziv mape", "Configuration" : "Konfiguracija", "Available for" : "Dostupno za", - "Delete" : "Izbrišite", "Add storage" : "Dodajte spremište", + "Delete" : "Izbrišite", "Allow users to mount the following external storage" : "Dopustite korisnicima postavljanje sljedećeg vanjskog spremišta" }, "nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"); diff --git a/apps/files_external/l10n/hr.json b/apps/files_external/l10n/hr.json index e8b8dcd3f61..610a42d46e2 100644 --- a/apps/files_external/l10n/hr.json +++ b/apps/files_external/l10n/hr.json @@ -48,8 +48,8 @@ "Folder name" : "Naziv mape", "Configuration" : "Konfiguracija", "Available for" : "Dostupno za", - "Delete" : "Izbrišite", "Add storage" : "Dodajte spremište", + "Delete" : "Izbrišite", "Allow users to mount the following external storage" : "Dopustite korisnicima postavljanje sljedećeg vanjskog spremišta" },"pluralForm" :"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/hu_HU.js b/apps/files_external/l10n/hu_HU.js index 0a307f8a609..964c28285fd 100644 --- a/apps/files_external/l10n/hu_HU.js +++ b/apps/files_external/l10n/hu_HU.js @@ -39,7 +39,7 @@ OC.L10N.register( "Folder name" : "Mappanév", "Configuration" : "Beállítások", "Available for" : "Elérhető számukra", - "Delete" : "Törlés", - "Add storage" : "Tároló becsatolása" + "Add storage" : "Tároló becsatolása", + "Delete" : "Törlés" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/hu_HU.json b/apps/files_external/l10n/hu_HU.json index 4012c0eb490..7942028d038 100644 --- a/apps/files_external/l10n/hu_HU.json +++ b/apps/files_external/l10n/hu_HU.json @@ -37,7 +37,7 @@ "Folder name" : "Mappanév", "Configuration" : "Beállítások", "Available for" : "Elérhető számukra", - "Delete" : "Törlés", - "Add storage" : "Tároló becsatolása" + "Add storage" : "Tároló becsatolása", + "Delete" : "Törlés" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/hy.js b/apps/files_external/l10n/hy.js index 9996681f88b..1092d48d575 100644 --- a/apps/files_external/l10n/hy.js +++ b/apps/files_external/l10n/hy.js @@ -2,11 +2,14 @@ OC.L10N.register( "files_external", { "Personal" : "Անձնական", + "Never" : "Երբեք", + "Username" : "Օգտանուն", "Password" : "Գաղտնաբառ", "URL" : "URL", "Dropbox" : "Dropbox", "Share" : "Կիսվել", "Name" : "Անուն", + "Folder name" : "Պանակի անուն", "Delete" : "Ջնջել" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/hy.json b/apps/files_external/l10n/hy.json index ac5a0edf013..1fecd4f3da1 100644 --- a/apps/files_external/l10n/hy.json +++ b/apps/files_external/l10n/hy.json @@ -1,10 +1,13 @@ { "translations": { "Personal" : "Անձնական", + "Never" : "Երբեք", + "Username" : "Օգտանուն", "Password" : "Գաղտնաբառ", "URL" : "URL", "Dropbox" : "Dropbox", "Share" : "Կիսվել", "Name" : "Անուն", + "Folder name" : "Պանակի անուն", "Delete" : "Ջնջել" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/id.js b/apps/files_external/l10n/id.js index b01e13e6085..1029ff8e3c7 100644 --- a/apps/files_external/l10n/id.js +++ b/apps/files_external/l10n/id.js @@ -98,9 +98,9 @@ OC.L10N.register( "Authentication" : "Otentikasi", "Configuration" : "Konfigurasi", "Available for" : "Tersedia untuk", + "Add storage" : "Tambahkan penyimpanan", "Advanced settings" : "Pengaturan Lanjutan", "Delete" : "Hapus", - "Add storage" : "Tambahkan penyimpanan", "Allow users to mount the following external storage" : "Izinkan pengguna untuk mengaitkan penyimpanan eksternal berikut" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/id.json b/apps/files_external/l10n/id.json index 383850199ac..acaf37381bc 100644 --- a/apps/files_external/l10n/id.json +++ b/apps/files_external/l10n/id.json @@ -96,9 +96,9 @@ "Authentication" : "Otentikasi", "Configuration" : "Konfigurasi", "Available for" : "Tersedia untuk", + "Add storage" : "Tambahkan penyimpanan", "Advanced settings" : "Pengaturan Lanjutan", "Delete" : "Hapus", - "Add storage" : "Tambahkan penyimpanan", "Allow users to mount the following external storage" : "Izinkan pengguna untuk mengaitkan penyimpanan eksternal berikut" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index 8e126abe93b..2bc1d6db3c8 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Ogni volta che il filesystem viene utilizzato", "All users. Type to select user or group." : "Tutti gli utenti. Digita per selezionare utente o gruppo.", "(group)" : "(gruppo)", + "Admin defined" : "Definito dall'amministratore", "Saved" : "Salvato", "Access key" : "Chiave di accesso", "Secret key" : "Chiave segreta", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "Autenticazione", "Configuration" : "Configurazione", "Available for" : "Disponibile per", + "Add storage" : "Aggiungi archiviazione", "Advanced settings" : "Impostazioni avanzate", "Delete" : "Elimina", - "Add storage" : "Aggiungi archiviazione", "Allow users to mount external storage" : "Consenti agli utenti di montare archiviazioni esterne", "Allow users to mount the following external storage" : "Consenti agli utenti di montare la seguente archiviazione esterna" }, diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index e21cf5973d2..e719f29dcd4 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Ogni volta che il filesystem viene utilizzato", "All users. Type to select user or group." : "Tutti gli utenti. Digita per selezionare utente o gruppo.", "(group)" : "(gruppo)", + "Admin defined" : "Definito dall'amministratore", "Saved" : "Salvato", "Access key" : "Chiave di accesso", "Secret key" : "Chiave segreta", @@ -97,9 +98,9 @@ "Authentication" : "Autenticazione", "Configuration" : "Configurazione", "Available for" : "Disponibile per", + "Add storage" : "Aggiungi archiviazione", "Advanced settings" : "Impostazioni avanzate", "Delete" : "Elimina", - "Add storage" : "Aggiungi archiviazione", "Allow users to mount external storage" : "Consenti agli utenti di montare archiviazioni esterne", "Allow users to mount the following external storage" : "Consenti agli utenti di montare la seguente archiviazione esterna" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index 4481c7fdd2e..5518f6afa78 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "ファイルシステム利用時には毎回", "All users. Type to select user or group." : "すべてのユーザー。ユーザー、グループを追加", "(group)" : "(グループ)", + "Admin defined" : "管理者設定済", "Saved" : "保存されました", "Access key" : "アクセスキー", "Secret key" : "シークレットキー", @@ -72,7 +73,7 @@ OC.L10N.register( "Secure ftps://" : "Secure ftps://", "Google Drive" : "Google Drive", "Local" : "ローカル", - "Location" : "位置", + "Location" : "場所", "ownCloud" : "ownCloud", "SFTP" : "SFTP", "Root" : "ルート", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "認証", "Configuration" : "設定", "Available for" : "利用可能", + "Add storage" : "ストレージを追加", "Advanced settings" : "詳細設定", "Delete" : "削除", - "Add storage" : "ストレージを追加", "Allow users to mount external storage" : "ユーザーに外部ストレージの接続を許可する", "Allow users to mount the following external storage" : "ユーザーに以下の外部ストレージのマウントを許可する" }, diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index 5573c11fe84..8134ed16cd5 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "ファイルシステム利用時には毎回", "All users. Type to select user or group." : "すべてのユーザー。ユーザー、グループを追加", "(group)" : "(グループ)", + "Admin defined" : "管理者設定済", "Saved" : "保存されました", "Access key" : "アクセスキー", "Secret key" : "シークレットキー", @@ -70,7 +71,7 @@ "Secure ftps://" : "Secure ftps://", "Google Drive" : "Google Drive", "Local" : "ローカル", - "Location" : "位置", + "Location" : "場所", "ownCloud" : "ownCloud", "SFTP" : "SFTP", "Root" : "ルート", @@ -97,9 +98,9 @@ "Authentication" : "認証", "Configuration" : "設定", "Available for" : "利用可能", + "Add storage" : "ストレージを追加", "Advanced settings" : "詳細設定", "Delete" : "削除", - "Add storage" : "ストレージを追加", "Allow users to mount external storage" : "ユーザーに外部ストレージの接続を許可する", "Allow users to mount the following external storage" : "ユーザーに以下の外部ストレージのマウントを許可する" },"pluralForm" :"nplurals=1; plural=0;" diff --git a/apps/files_external/l10n/ka_GE.js b/apps/files_external/l10n/ka_GE.js index 824295cb93d..e82c778862e 100644 --- a/apps/files_external/l10n/ka_GE.js +++ b/apps/files_external/l10n/ka_GE.js @@ -21,7 +21,7 @@ OC.L10N.register( "External Storage" : "ექსტერნალ საცავი", "Folder name" : "ფოლდერის სახელი", "Configuration" : "კონფიგურაცია", - "Delete" : "წაშლა", - "Add storage" : "საცავის დამატება" + "Add storage" : "საცავის დამატება", + "Delete" : "წაშლა" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/ka_GE.json b/apps/files_external/l10n/ka_GE.json index 73ad2cfd0c5..a706d42225b 100644 --- a/apps/files_external/l10n/ka_GE.json +++ b/apps/files_external/l10n/ka_GE.json @@ -19,7 +19,7 @@ "External Storage" : "ექსტერნალ საცავი", "Folder name" : "ფოლდერის სახელი", "Configuration" : "კონფიგურაცია", - "Delete" : "წაშლა", - "Add storage" : "საცავის დამატება" + "Add storage" : "საცავის დამატება", + "Delete" : "წაშლა" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/km.js b/apps/files_external/l10n/km.js index 7a5c6cb86c8..e5aad9697ae 100644 --- a/apps/files_external/l10n/km.js +++ b/apps/files_external/l10n/km.js @@ -19,7 +19,7 @@ OC.L10N.register( "External Storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", "Folder name" : "ឈ្មោះថត", "Configuration" : "ការកំណត់សណ្ឋាន", - "Delete" : "លុប", - "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក" + "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក", + "Delete" : "លុប" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/km.json b/apps/files_external/l10n/km.json index 0375b5bfee2..71213394d53 100644 --- a/apps/files_external/l10n/km.json +++ b/apps/files_external/l10n/km.json @@ -17,7 +17,7 @@ "External Storage" : "ឃ្លាំងផ្ទុកខាងក្រៅ", "Folder name" : "ឈ្មោះថត", "Configuration" : "ការកំណត់សណ្ឋាន", - "Delete" : "លុប", - "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក" + "Add storage" : "បន្ថែមឃ្លាំងផ្ទុក", + "Delete" : "លុប" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/ko.js b/apps/files_external/l10n/ko.js index 9028a3e2986..0eaac8aee4d 100644 --- a/apps/files_external/l10n/ko.js +++ b/apps/files_external/l10n/ko.js @@ -99,9 +99,9 @@ OC.L10N.register( "Authentication" : "인증", "Configuration" : "설정", "Available for" : "다음으로 사용 가능", + "Add storage" : "저장소 추가", "Advanced settings" : "고급 설정", "Delete" : "삭제", - "Add storage" : "저장소 추가", "Allow users to mount external storage" : "사용자가 외부 저장소를 마운트하도록 허용", "Allow users to mount the following external storage" : "사용자가 다음 외부 저장소를 마운트할 수 있도록 허용" }, diff --git a/apps/files_external/l10n/ko.json b/apps/files_external/l10n/ko.json index d27fdfcae30..7f63ba793e7 100644 --- a/apps/files_external/l10n/ko.json +++ b/apps/files_external/l10n/ko.json @@ -97,9 +97,9 @@ "Authentication" : "인증", "Configuration" : "설정", "Available for" : "다음으로 사용 가능", + "Add storage" : "저장소 추가", "Advanced settings" : "고급 설정", "Delete" : "삭제", - "Add storage" : "저장소 추가", "Allow users to mount external storage" : "사용자가 외부 저장소를 마운트하도록 허용", "Allow users to mount the following external storage" : "사용자가 다음 외부 저장소를 마운트할 수 있도록 허용" },"pluralForm" :"nplurals=1; plural=0;" diff --git a/apps/files_external/l10n/lt_LT.js b/apps/files_external/l10n/lt_LT.js index b6d334d792d..0efbfa333b8 100644 --- a/apps/files_external/l10n/lt_LT.js +++ b/apps/files_external/l10n/lt_LT.js @@ -1,6 +1,7 @@ OC.L10N.register( "files_external", { + "Fetching request tokens failed. Verify that your app key and secret are correct." : "Nepavyko atsiųsti užklausos žymės. Patikrinkite savo programos raktą ir paslaptį.", "External storage" : "Išorinė saugykla", "Personal" : "Asmeniniai", "Grant access" : "Suteikti priėjimą", @@ -22,7 +23,7 @@ OC.L10N.register( "External Storage" : "Išorinės saugyklos", "Folder name" : "Katalogo pavadinimas", "Configuration" : "Konfigūracija", - "Delete" : "Ištrinti", - "Add storage" : "Pridėti saugyklą" + "Add storage" : "Pridėti saugyklą", + "Delete" : "Ištrinti" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/lt_LT.json b/apps/files_external/l10n/lt_LT.json index f1c46b145ee..13c1543748f 100644 --- a/apps/files_external/l10n/lt_LT.json +++ b/apps/files_external/l10n/lt_LT.json @@ -1,4 +1,5 @@ { "translations": { + "Fetching request tokens failed. Verify that your app key and secret are correct." : "Nepavyko atsiųsti užklausos žymės. Patikrinkite savo programos raktą ir paslaptį.", "External storage" : "Išorinė saugykla", "Personal" : "Asmeniniai", "Grant access" : "Suteikti priėjimą", @@ -20,7 +21,7 @@ "External Storage" : "Išorinės saugyklos", "Folder name" : "Katalogo pavadinimas", "Configuration" : "Konfigūracija", - "Delete" : "Ištrinti", - "Add storage" : "Pridėti saugyklą" + "Add storage" : "Pridėti saugyklą", + "Delete" : "Ištrinti" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/lv.js b/apps/files_external/l10n/lv.js index 6590706fa2a..d6733a1d9c0 100644 --- a/apps/files_external/l10n/lv.js +++ b/apps/files_external/l10n/lv.js @@ -21,7 +21,7 @@ OC.L10N.register( "External Storage" : "Ārējā krātuve", "Folder name" : "Mapes nosaukums", "Configuration" : "Konfigurācija", - "Delete" : "Dzēst", - "Add storage" : "Pievienot krātuvi" + "Add storage" : "Pievienot krātuvi", + "Delete" : "Dzēst" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); diff --git a/apps/files_external/l10n/lv.json b/apps/files_external/l10n/lv.json index 4e27db77737..57fe7cbc048 100644 --- a/apps/files_external/l10n/lv.json +++ b/apps/files_external/l10n/lv.json @@ -19,7 +19,7 @@ "External Storage" : "Ārējā krātuve", "Folder name" : "Mapes nosaukums", "Configuration" : "Konfigurācija", - "Delete" : "Dzēst", - "Add storage" : "Pievienot krātuvi" + "Add storage" : "Pievienot krātuvi", + "Delete" : "Dzēst" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/nb_NO.js b/apps/files_external/l10n/nb_NO.js index ecafac048c0..0e9e2dd24ce 100644 --- a/apps/files_external/l10n/nb_NO.js +++ b/apps/files_external/l10n/nb_NO.js @@ -98,9 +98,9 @@ OC.L10N.register( "Authentication" : "Autentisering", "Configuration" : "Konfigurasjon", "Available for" : "Tilgjengelig for", + "Add storage" : "Legg til lagringsplass", "Advanced settings" : "Avanserte innstillinger", "Delete" : "Slett", - "Add storage" : "Legg til lagringsplass", "Allow users to mount the following external storage" : "Tillat brukere å koble opp følgende eksterne lagring" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/nb_NO.json b/apps/files_external/l10n/nb_NO.json index 9a7a2ae6287..ddf5221e955 100644 --- a/apps/files_external/l10n/nb_NO.json +++ b/apps/files_external/l10n/nb_NO.json @@ -96,9 +96,9 @@ "Authentication" : "Autentisering", "Configuration" : "Konfigurasjon", "Available for" : "Tilgjengelig for", + "Add storage" : "Legg til lagringsplass", "Advanced settings" : "Avanserte innstillinger", "Delete" : "Slett", - "Add storage" : "Legg til lagringsplass", "Allow users to mount the following external storage" : "Tillat brukere å koble opp følgende eksterne lagring" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/nds.js b/apps/files_external/l10n/nds.js index f7f1da30c60..b9417b4a4d5 100644 --- a/apps/files_external/l10n/nds.js +++ b/apps/files_external/l10n/nds.js @@ -93,9 +93,9 @@ OC.L10N.register( "Authentication" : "Authentifizierung", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", "Allow users to mount the following external storage" : "Erlaube Benutzern folgenden externen Speicher einzuhängen" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/nds.json b/apps/files_external/l10n/nds.json index bfadfc0c123..dd1ca770ebd 100644 --- a/apps/files_external/l10n/nds.json +++ b/apps/files_external/l10n/nds.json @@ -91,9 +91,9 @@ "Authentication" : "Authentifizierung", "Configuration" : "Konfiguration", "Available for" : "Verfügbar für", + "Add storage" : "Speicher hinzufügen", "Advanced settings" : "Erweiterte Einstellungen", "Delete" : "Löschen", - "Add storage" : "Speicher hinzufügen", "Allow users to mount the following external storage" : "Erlaube Benutzern folgenden externen Speicher einzuhängen" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 57481ce4176..05d1a3f6de5 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Elke keer bij gebruik bestandssysteem", "All users. Type to select user or group." : "Alle gebruikers. Tikken om een gebruiker of groep te selecteren.", "(group)" : "(groep)", + "Admin defined" : "Beheerder gedefinieerd", "Saved" : "Bewaard", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "Authenticatie", "Configuration" : "Configuratie", "Available for" : "Beschikbaar voor", + "Add storage" : "Toevoegen opslag", "Advanced settings" : "Geavanceerde instellingen", "Delete" : "Verwijder", - "Add storage" : "Toevoegen opslag", "Allow users to mount external storage" : "Sta gebruikers toe om een externe opslag aan te koppelen", "Allow users to mount the following external storage" : "Sta gebruikers toe de volgende externe opslag aan te koppelen" }, diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index fc80c3bbb2c..e30870e4ae1 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Elke keer bij gebruik bestandssysteem", "All users. Type to select user or group." : "Alle gebruikers. Tikken om een gebruiker of groep te selecteren.", "(group)" : "(groep)", + "Admin defined" : "Beheerder gedefinieerd", "Saved" : "Bewaard", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", @@ -97,9 +98,9 @@ "Authentication" : "Authenticatie", "Configuration" : "Configuratie", "Available for" : "Beschikbaar voor", + "Add storage" : "Toevoegen opslag", "Advanced settings" : "Geavanceerde instellingen", "Delete" : "Verwijder", - "Add storage" : "Toevoegen opslag", "Allow users to mount external storage" : "Sta gebruikers toe om een externe opslag aan te koppelen", "Allow users to mount the following external storage" : "Sta gebruikers toe de volgende externe opslag aan te koppelen" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_external/l10n/oc.js b/apps/files_external/l10n/oc.js index a45aebf81ba..a212c9a5179 100644 --- a/apps/files_external/l10n/oc.js +++ b/apps/files_external/l10n/oc.js @@ -99,9 +99,9 @@ OC.L10N.register( "Authentication" : "Autentificacion", "Configuration" : "Configuracion", "Available for" : "Disponible per", + "Add storage" : "Apondre un supòrt d'emmagazinatge", "Advanced settings" : "Paramètres avançats", "Delete" : "Suprimir", - "Add storage" : "Apondre un supòrt d'emmagazinatge", "Allow users to mount external storage" : "Autorizar los utilizaires a montar l'espaci d'emmagazinatge extèrne", "Allow users to mount the following external storage" : "Autorizar los utilizaires a montar los emmagazinatges extèrnes seguents" }, diff --git a/apps/files_external/l10n/oc.json b/apps/files_external/l10n/oc.json index c49326a955f..a7d51dd8ad0 100644 --- a/apps/files_external/l10n/oc.json +++ b/apps/files_external/l10n/oc.json @@ -97,9 +97,9 @@ "Authentication" : "Autentificacion", "Configuration" : "Configuracion", "Available for" : "Disponible per", + "Add storage" : "Apondre un supòrt d'emmagazinatge", "Advanced settings" : "Paramètres avançats", "Delete" : "Suprimir", - "Add storage" : "Apondre un supòrt d'emmagazinatge", "Allow users to mount external storage" : "Autorizar los utilizaires a montar l'espaci d'emmagazinatge extèrne", "Allow users to mount the following external storage" : "Autorizar los utilizaires a montar los emmagazinatges extèrnes seguents" },"pluralForm" :"nplurals=2; plural=(n > 1);" diff --git a/apps/files_external/l10n/pl.js b/apps/files_external/l10n/pl.js index 1f7cc6b1979..99de2703433 100644 --- a/apps/files_external/l10n/pl.js +++ b/apps/files_external/l10n/pl.js @@ -67,9 +67,9 @@ OC.L10N.register( "Folder name" : "Nazwa folderu", "Configuration" : "Konfiguracja", "Available for" : "Dostępne przez", + "Add storage" : "Dodaj zasoby dyskowe", "Advanced settings" : "Ustawienia zaawansowane", "Delete" : "Usuń", - "Add storage" : "Dodaj zasoby dyskowe", "Allow users to mount the following external storage" : "Pozwól użytkownikom montować następujące zewnętrzne zasoby dyskowe" }, "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/pl.json b/apps/files_external/l10n/pl.json index 5b5059a5d18..258811f2d81 100644 --- a/apps/files_external/l10n/pl.json +++ b/apps/files_external/l10n/pl.json @@ -65,9 +65,9 @@ "Folder name" : "Nazwa folderu", "Configuration" : "Konfiguracja", "Available for" : "Dostępne przez", + "Add storage" : "Dodaj zasoby dyskowe", "Advanced settings" : "Ustawienia zaawansowane", "Delete" : "Usuń", - "Add storage" : "Dodaj zasoby dyskowe", "Allow users to mount the following external storage" : "Pozwól użytkownikom montować następujące zewnętrzne zasoby dyskowe" },"pluralForm" :"nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 92bc16355d3..0d4f04ae226 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Toda vez que o sistema de arquivos é usado", "All users. Type to select user or group." : "Todos os usuários. Digite para selecionar usuário ou grupo.", "(group)" : "(grupo)", + "Admin defined" : "Definido pelo administrador", "Saved" : "Salvo", "Access key" : "Chave da acesso", "Secret key" : "Chave secreta", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "Autenticação", "Configuration" : "Configuração", "Available for" : "Disponível para", + "Add storage" : "Adicionar Armazenamento", "Advanced settings" : "Configurações avançadas", "Delete" : "Excluir", - "Add storage" : "Adicionar Armazenamento", "Allow users to mount external storage" : "Permitir que usuários montem armazenamento externo", "Allow users to mount the following external storage" : "Permitir que usuários montem o seguinte armazenamento externo" }, diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index bb6e0a96cff..d49e818ea0f 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Toda vez que o sistema de arquivos é usado", "All users. Type to select user or group." : "Todos os usuários. Digite para selecionar usuário ou grupo.", "(group)" : "(grupo)", + "Admin defined" : "Definido pelo administrador", "Saved" : "Salvo", "Access key" : "Chave da acesso", "Secret key" : "Chave secreta", @@ -97,9 +98,9 @@ "Authentication" : "Autenticação", "Configuration" : "Configuração", "Available for" : "Disponível para", + "Add storage" : "Adicionar Armazenamento", "Advanced settings" : "Configurações avançadas", "Delete" : "Excluir", - "Add storage" : "Adicionar Armazenamento", "Allow users to mount external storage" : "Permitir que usuários montem armazenamento externo", "Allow users to mount the following external storage" : "Permitir que usuários montem o seguinte armazenamento externo" },"pluralForm" :"nplurals=2; plural=(n > 1);" diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js index 4e8b3245e66..f6c3254de0b 100644 --- a/apps/files_external/l10n/pt_PT.js +++ b/apps/files_external/l10n/pt_PT.js @@ -92,9 +92,9 @@ OC.L10N.register( "Authentication" : "Autenticação", "Configuration" : "Configuração", "Available for" : "Disponível para ", + "Add storage" : "Adicionar armazenamento", "Advanced settings" : "Definições avançadas", "Delete" : "Apagar", - "Add storage" : "Adicionar armazenamento", "Allow users to mount the following external storage" : "Permitir que os utilizadores montem o seguinte armazenamento externo" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json index 51333429106..ec22394470e 100644 --- a/apps/files_external/l10n/pt_PT.json +++ b/apps/files_external/l10n/pt_PT.json @@ -90,9 +90,9 @@ "Authentication" : "Autenticação", "Configuration" : "Configuração", "Available for" : "Disponível para ", + "Add storage" : "Adicionar armazenamento", "Advanced settings" : "Definições avançadas", "Delete" : "Apagar", - "Add storage" : "Adicionar armazenamento", "Allow users to mount the following external storage" : "Permitir que os utilizadores montem o seguinte armazenamento externo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/ro.js b/apps/files_external/l10n/ro.js index d8ba040824c..cc3a065a21d 100644 --- a/apps/files_external/l10n/ro.js +++ b/apps/files_external/l10n/ro.js @@ -29,8 +29,8 @@ OC.L10N.register( "External Storage" : "Stocare externă", "Folder name" : "Denumire director", "Configuration" : "Configurație", - "Delete" : "Șterge", "Add storage" : "Adauga stocare", + "Delete" : "Șterge", "Allow users to mount the following external storage" : "Permite utilizatorilor să monteze următoarea unitate de stocare" }, "nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); diff --git a/apps/files_external/l10n/ro.json b/apps/files_external/l10n/ro.json index cbe2826def4..2f1f8e32883 100644 --- a/apps/files_external/l10n/ro.json +++ b/apps/files_external/l10n/ro.json @@ -27,8 +27,8 @@ "External Storage" : "Stocare externă", "Folder name" : "Denumire director", "Configuration" : "Configurație", - "Delete" : "Șterge", "Add storage" : "Adauga stocare", + "Delete" : "Șterge", "Allow users to mount the following external storage" : "Permite utilizatorilor să monteze următoarea unitate de stocare" },"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));" }
\ No newline at end of file diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index 5550ea780ab..6fbfe273557 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -16,6 +16,7 @@ OC.L10N.register( "Not permitted to use authentication mechanism \"%s\"" : "Не допускается использование механизма авторизации \"%s\"", "Unsatisfied backend parameters" : "Недопустимые настройки бэкенда", "Unsatisfied authentication mechanism parameters" : "Недопустимые настройки механизма авторизации", + "Insufficient data: %s" : "Недостаточно данных: %s", "Personal" : "Личное", "System" : "Система", "Grant access" : "Предоставить доступ", @@ -98,9 +99,10 @@ OC.L10N.register( "Authentication" : "Авторизация", "Configuration" : "Конфигурация", "Available for" : "Доступно для", + "Add storage" : "Добавить хранилище", "Advanced settings" : "Расширенные настройки", "Delete" : "Удалить", - "Add storage" : "Добавить хранилище", + "Allow users to mount external storage" : "Разрешить пользователями монтировать внешние накопители", "Allow users to mount the following external storage" : "Разрешить пользователям монтировать следующие сервисы хранения данных" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json index 52792a3f09a..12a62259f50 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -14,6 +14,7 @@ "Not permitted to use authentication mechanism \"%s\"" : "Не допускается использование механизма авторизации \"%s\"", "Unsatisfied backend parameters" : "Недопустимые настройки бэкенда", "Unsatisfied authentication mechanism parameters" : "Недопустимые настройки механизма авторизации", + "Insufficient data: %s" : "Недостаточно данных: %s", "Personal" : "Личное", "System" : "Система", "Grant access" : "Предоставить доступ", @@ -96,9 +97,10 @@ "Authentication" : "Авторизация", "Configuration" : "Конфигурация", "Available for" : "Доступно для", + "Add storage" : "Добавить хранилище", "Advanced settings" : "Расширенные настройки", "Delete" : "Удалить", - "Add storage" : "Добавить хранилище", + "Allow users to mount external storage" : "Разрешить пользователями монтировать внешние накопители", "Allow users to mount the following external storage" : "Разрешить пользователям монтировать следующие сервисы хранения данных" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/sk_SK.js b/apps/files_external/l10n/sk_SK.js index 41f9c866196..7485625455c 100644 --- a/apps/files_external/l10n/sk_SK.js +++ b/apps/files_external/l10n/sk_SK.js @@ -97,9 +97,9 @@ OC.L10N.register( "Authentication" : "Autentifikácia", "Configuration" : "Nastavenia", "Available for" : "K dispozícii pre", + "Add storage" : "Pridať úložisko", "Advanced settings" : "Rozšírené nastavenia", "Delete" : "Zmazať", - "Add storage" : "Pridať úložisko", "Allow users to mount the following external storage" : "Povoliť používateľom pripojiť tieto externé úložiská" }, "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"); diff --git a/apps/files_external/l10n/sk_SK.json b/apps/files_external/l10n/sk_SK.json index 4072136fa53..9ed60285b2d 100644 --- a/apps/files_external/l10n/sk_SK.json +++ b/apps/files_external/l10n/sk_SK.json @@ -95,9 +95,9 @@ "Authentication" : "Autentifikácia", "Configuration" : "Nastavenia", "Available for" : "K dispozícii pre", + "Add storage" : "Pridať úložisko", "Advanced settings" : "Rozšírené nastavenia", "Delete" : "Zmazať", - "Add storage" : "Pridať úložisko", "Allow users to mount the following external storage" : "Povoliť používateľom pripojiť tieto externé úložiská" },"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/sl.js b/apps/files_external/l10n/sl.js index f9513a5f11c..846f1d0095a 100644 --- a/apps/files_external/l10n/sl.js +++ b/apps/files_external/l10n/sl.js @@ -67,9 +67,9 @@ OC.L10N.register( "Folder name" : "Ime mape", "Configuration" : "Nastavitve", "Available for" : "Na voljo za", + "Add storage" : "Dodaj shrambo", "Advanced settings" : "Napredne nastavitve", "Delete" : "Izbriši", - "Add storage" : "Dodaj shrambo", "Allow users to mount the following external storage" : "Dovoli uporabnikom priklapljanje navedenih zunanjih shramb." }, "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"); diff --git a/apps/files_external/l10n/sl.json b/apps/files_external/l10n/sl.json index ca97f27b234..aa7145180e4 100644 --- a/apps/files_external/l10n/sl.json +++ b/apps/files_external/l10n/sl.json @@ -65,9 +65,9 @@ "Folder name" : "Ime mape", "Configuration" : "Nastavitve", "Available for" : "Na voljo za", + "Add storage" : "Dodaj shrambo", "Advanced settings" : "Napredne nastavitve", "Delete" : "Izbriši", - "Add storage" : "Dodaj shrambo", "Allow users to mount the following external storage" : "Dovoli uporabnikom priklapljanje navedenih zunanjih shramb." },"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/sq.js b/apps/files_external/l10n/sq.js index f8e5c5a27dc..535831268b9 100644 --- a/apps/files_external/l10n/sq.js +++ b/apps/files_external/l10n/sq.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "Sa herë që përdoret sistemi i kartelave", "All users. Type to select user or group." : "Krejt përdoruesit. Shtypni që të përzgjidhet përdorues ose grup.", "(group)" : "(grup)", + "Admin defined" : "Përcaktuar nga përgjegjësi", "Saved" : "U ruajt", "Access key" : "Kyç hyrjesh", "Secret key" : "Kyç i fshehtë", @@ -47,6 +48,7 @@ OC.L10N.register( "OpenStack" : "OpenStack", "Username" : "Emër përdoruesi", "Password" : "Fjalëkalim", + "Tenant name" : "Emër qiraxhiu", "Rackspace" : "Rackspace", "API key" : "Kyç API", "Username and password" : "Emër përdoruesi dhe fjalëkalim", @@ -97,9 +99,9 @@ OC.L10N.register( "Authentication" : "Mirëfilltësim", "Configuration" : "Formësim", "Available for" : "E gatshme për", + "Add storage" : "Shtoni depozitë", "Advanced settings" : "Rregullime të mëtejshme", "Delete" : "Fshije", - "Add storage" : "Shtoni depozitë", "Allow users to mount external storage" : "Lejoju përdoruesve të montojnë depozita të jashtme", "Allow users to mount the following external storage" : "Lejoju përdoruesve të montojnë depozitën e jashtme vijuese" }, diff --git a/apps/files_external/l10n/sq.json b/apps/files_external/l10n/sq.json index 0da8e9406bb..2acb3cbc606 100644 --- a/apps/files_external/l10n/sq.json +++ b/apps/files_external/l10n/sq.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "Sa herë që përdoret sistemi i kartelave", "All users. Type to select user or group." : "Krejt përdoruesit. Shtypni që të përzgjidhet përdorues ose grup.", "(group)" : "(grup)", + "Admin defined" : "Përcaktuar nga përgjegjësi", "Saved" : "U ruajt", "Access key" : "Kyç hyrjesh", "Secret key" : "Kyç i fshehtë", @@ -45,6 +46,7 @@ "OpenStack" : "OpenStack", "Username" : "Emër përdoruesi", "Password" : "Fjalëkalim", + "Tenant name" : "Emër qiraxhiu", "Rackspace" : "Rackspace", "API key" : "Kyç API", "Username and password" : "Emër përdoruesi dhe fjalëkalim", @@ -95,9 +97,9 @@ "Authentication" : "Mirëfilltësim", "Configuration" : "Formësim", "Available for" : "E gatshme për", + "Add storage" : "Shtoni depozitë", "Advanced settings" : "Rregullime të mëtejshme", "Delete" : "Fshije", - "Add storage" : "Shtoni depozitë", "Allow users to mount external storage" : "Lejoju përdoruesve të montojnë depozita të jashtme", "Allow users to mount the following external storage" : "Lejoju përdoruesve të montojnë depozitën e jashtme vijuese" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_external/l10n/sr.js b/apps/files_external/l10n/sr.js index 02596d8ab22..add0cc4dab7 100644 --- a/apps/files_external/l10n/sr.js +++ b/apps/files_external/l10n/sr.js @@ -66,9 +66,9 @@ OC.L10N.register( "Folder name" : "Назив фасцикле", "Configuration" : "Подешавање", "Available for" : "Доступно за", + "Add storage" : "Додај складиште", "Advanced settings" : "Напредне поставке", "Delete" : "Обриши", - "Add storage" : "Додај складиште", "Allow users to mount the following external storage" : "Дозволи корисницима да монтирају следећа спољашња складишта" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/sr.json b/apps/files_external/l10n/sr.json index f1c12eeb0f7..3e7ac487280 100644 --- a/apps/files_external/l10n/sr.json +++ b/apps/files_external/l10n/sr.json @@ -64,9 +64,9 @@ "Folder name" : "Назив фасцикле", "Configuration" : "Подешавање", "Available for" : "Доступно за", + "Add storage" : "Додај складиште", "Advanced settings" : "Напредне поставке", "Delete" : "Обриши", - "Add storage" : "Додај складиште", "Allow users to mount the following external storage" : "Дозволи корисницима да монтирају следећа спољашња складишта" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/sr@latin.js b/apps/files_external/l10n/sr@latin.js index 880a33c1614..0420189571c 100644 --- a/apps/files_external/l10n/sr@latin.js +++ b/apps/files_external/l10n/sr@latin.js @@ -48,8 +48,8 @@ OC.L10N.register( "Folder name" : "Ime fascikle", "Configuration" : "Podešavanje", "Available for" : "Dostupno za", - "Delete" : "Obriši", "Add storage" : "Dodaj skladište", + "Delete" : "Obriši", "Allow users to mount the following external storage" : "Omogući korisnicima da namontiraju sledeće spoljašnje skladište" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/sr@latin.json b/apps/files_external/l10n/sr@latin.json index 760100867eb..3320ab2c863 100644 --- a/apps/files_external/l10n/sr@latin.json +++ b/apps/files_external/l10n/sr@latin.json @@ -46,8 +46,8 @@ "Folder name" : "Ime fascikle", "Configuration" : "Podešavanje", "Available for" : "Dostupno za", - "Delete" : "Obriši", "Add storage" : "Dodaj skladište", + "Delete" : "Obriši", "Allow users to mount the following external storage" : "Omogući korisnicima da namontiraju sledeće spoljašnje skladište" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/sv.js b/apps/files_external/l10n/sv.js index 09786533e87..f20b96caed8 100644 --- a/apps/files_external/l10n/sv.js +++ b/apps/files_external/l10n/sv.js @@ -53,8 +53,8 @@ OC.L10N.register( "Folder name" : "Mappnamn", "Configuration" : "Konfiguration", "Available for" : "Tillgänglig för", - "Delete" : "Radera", "Add storage" : "Lägg till lagring", + "Delete" : "Radera", "Allow users to mount the following external storage" : "Tillåt användare att montera följande extern lagring" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/sv.json b/apps/files_external/l10n/sv.json index ddb7439cb8d..cd3dc13296d 100644 --- a/apps/files_external/l10n/sv.json +++ b/apps/files_external/l10n/sv.json @@ -51,8 +51,8 @@ "Folder name" : "Mappnamn", "Configuration" : "Konfiguration", "Available for" : "Tillgänglig för", - "Delete" : "Radera", "Add storage" : "Lägg till lagring", + "Delete" : "Radera", "Allow users to mount the following external storage" : "Tillåt användare att montera följande extern lagring" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/th_TH.js b/apps/files_external/l10n/th_TH.js index 55611a5531d..6c1efa5aacd 100644 --- a/apps/files_external/l10n/th_TH.js +++ b/apps/files_external/l10n/th_TH.js @@ -33,6 +33,7 @@ OC.L10N.register( "Every time the filesystem is used" : "ทุกครั้งที่แฟ้มระบบถูกใช้งาน", "All users. Type to select user or group." : "ผู้ใช้ทุกคน พิมพ์เพื่อเลือกผู้ใช้หรือกลุ่ม", "(group)" : "(กลุ่ม)", + "Admin defined" : "ถูกกำหนดโดยผู้ดูแลระบบ", "Saved" : "บันทึกแล้ว", "Access key" : "คีย์การเข้าถึง", "Secret key" : "คีย์ลับ", @@ -99,9 +100,9 @@ OC.L10N.register( "Authentication" : "รับรองความถูกต้อง", "Configuration" : "การกำหนดค่า", "Available for" : "สามารถใช้ได้สำหรับ", + "Add storage" : "เพิ่มพื้นที่จัดเก็บข้อมูล", "Advanced settings" : "ตั้งค่าขั้นสูง", "Delete" : "ลบ", - "Add storage" : "เพิ่มพื้นที่จัดเก็บข้อมูล", "Allow users to mount external storage" : "อนุญาตให้ผู้ใช้ติดตั้งการจัดเก็บข้อมูลภายนอก", "Allow users to mount the following external storage" : "อนุญาตให้ผู้ใช้ติดตั้งจัดเก็บข้อมูลภายนอกต่อไปนี้" }, diff --git a/apps/files_external/l10n/th_TH.json b/apps/files_external/l10n/th_TH.json index 2db63df9df2..3de48d733d3 100644 --- a/apps/files_external/l10n/th_TH.json +++ b/apps/files_external/l10n/th_TH.json @@ -31,6 +31,7 @@ "Every time the filesystem is used" : "ทุกครั้งที่แฟ้มระบบถูกใช้งาน", "All users. Type to select user or group." : "ผู้ใช้ทุกคน พิมพ์เพื่อเลือกผู้ใช้หรือกลุ่ม", "(group)" : "(กลุ่ม)", + "Admin defined" : "ถูกกำหนดโดยผู้ดูแลระบบ", "Saved" : "บันทึกแล้ว", "Access key" : "คีย์การเข้าถึง", "Secret key" : "คีย์ลับ", @@ -97,9 +98,9 @@ "Authentication" : "รับรองความถูกต้อง", "Configuration" : "การกำหนดค่า", "Available for" : "สามารถใช้ได้สำหรับ", + "Add storage" : "เพิ่มพื้นที่จัดเก็บข้อมูล", "Advanced settings" : "ตั้งค่าขั้นสูง", "Delete" : "ลบ", - "Add storage" : "เพิ่มพื้นที่จัดเก็บข้อมูล", "Allow users to mount external storage" : "อนุญาตให้ผู้ใช้ติดตั้งการจัดเก็บข้อมูลภายนอก", "Allow users to mount the following external storage" : "อนุญาตให้ผู้ใช้ติดตั้งจัดเก็บข้อมูลภายนอกต่อไปนี้" },"pluralForm" :"nplurals=1; plural=0;" diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index 619e5975ed8..78f9df04ec6 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -16,6 +16,7 @@ OC.L10N.register( "Not permitted to use authentication mechanism \"%s\"" : "\"%s\" kimlik doğrulama mekanizmasına izin verilmiyor", "Unsatisfied backend parameters" : "Yetersiz arka uç parametreleri", "Unsatisfied authentication mechanism parameters" : "Yetersiz kimlik doğrulama mekanizması parametreleri", + "Insufficient data: %s" : "Yetersiz veri: %s", "Personal" : "Kişisel", "System" : "Sistem", "Grant access" : "Erişimi sağla", @@ -98,9 +99,10 @@ OC.L10N.register( "Authentication" : "Kimlik Doğrulama", "Configuration" : "Yapılandırma", "Available for" : "Kullanabilenler", + "Add storage" : "Depo ekle", "Advanced settings" : "Gelişmiş ayarlar", "Delete" : "Sil", - "Add storage" : "Depo ekle", + "Allow users to mount external storage" : "Kullanıcılara harici depolama bağlama izin ver", "Allow users to mount the following external storage" : "Kullanıcıların aşağıdaki harici depolamayı bağlamalarına izin ver" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index cb315a333c2..a798f4a7427 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -14,6 +14,7 @@ "Not permitted to use authentication mechanism \"%s\"" : "\"%s\" kimlik doğrulama mekanizmasına izin verilmiyor", "Unsatisfied backend parameters" : "Yetersiz arka uç parametreleri", "Unsatisfied authentication mechanism parameters" : "Yetersiz kimlik doğrulama mekanizması parametreleri", + "Insufficient data: %s" : "Yetersiz veri: %s", "Personal" : "Kişisel", "System" : "Sistem", "Grant access" : "Erişimi sağla", @@ -96,9 +97,10 @@ "Authentication" : "Kimlik Doğrulama", "Configuration" : "Yapılandırma", "Available for" : "Kullanabilenler", + "Add storage" : "Depo ekle", "Advanced settings" : "Gelişmiş ayarlar", "Delete" : "Sil", - "Add storage" : "Depo ekle", + "Allow users to mount external storage" : "Kullanıcılara harici depolama bağlama izin ver", "Allow users to mount the following external storage" : "Kullanıcıların aşağıdaki harici depolamayı bağlamalarına izin ver" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index f8ca8dc360c..702b3e328ce 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -61,9 +61,9 @@ OC.L10N.register( "Folder name" : "Ім'я теки", "Configuration" : "Налаштування", "Available for" : "Доступний для", + "Add storage" : "Додати сховище", "Advanced settings" : "Розширені налаштування", "Delete" : "Видалити", - "Add storage" : "Додати сховище", "Allow users to mount the following external storage" : "Дозволити користувачам монтувати наступні зовнішні сховища" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index c34d0d2c82f..cddda62118f 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -59,9 +59,9 @@ "Folder name" : "Ім'я теки", "Configuration" : "Налаштування", "Available for" : "Доступний для", + "Add storage" : "Додати сховище", "Advanced settings" : "Розширені налаштування", "Delete" : "Видалити", - "Add storage" : "Додати сховище", "Allow users to mount the following external storage" : "Дозволити користувачам монтувати наступні зовнішні сховища" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/vi.js b/apps/files_external/l10n/vi.js index f3fdb39136c..65b3d492429 100644 --- a/apps/files_external/l10n/vi.js +++ b/apps/files_external/l10n/vi.js @@ -21,7 +21,7 @@ OC.L10N.register( "External Storage" : "Lưu trữ ngoài", "Folder name" : "Tên thư mục", "Configuration" : "Cấu hình", - "Delete" : "Xóa", - "Add storage" : "Thêm bộ nhớ" + "Add storage" : "Thêm bộ nhớ", + "Delete" : "Xóa" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/vi.json b/apps/files_external/l10n/vi.json index fdba39fc95e..031dddee8e3 100644 --- a/apps/files_external/l10n/vi.json +++ b/apps/files_external/l10n/vi.json @@ -19,7 +19,7 @@ "External Storage" : "Lưu trữ ngoài", "Folder name" : "Tên thư mục", "Configuration" : "Cấu hình", - "Delete" : "Xóa", - "Add storage" : "Thêm bộ nhớ" + "Add storage" : "Thêm bộ nhớ", + "Delete" : "Xóa" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/zh_CN.js b/apps/files_external/l10n/zh_CN.js index 4b99fc170a2..ca35a97bb53 100644 --- a/apps/files_external/l10n/zh_CN.js +++ b/apps/files_external/l10n/zh_CN.js @@ -40,8 +40,8 @@ OC.L10N.register( "Folder name" : "目录名称", "Configuration" : "配置", "Available for" : "可用于", - "Delete" : "删除", "Add storage" : "增加存储", + "Delete" : "删除", "Allow users to mount the following external storage" : "允许用户挂载以下外部存储" }, "nplurals=1; plural=0;"); diff --git a/apps/files_external/l10n/zh_CN.json b/apps/files_external/l10n/zh_CN.json index fddc688c5c2..53c1df78899 100644 --- a/apps/files_external/l10n/zh_CN.json +++ b/apps/files_external/l10n/zh_CN.json @@ -38,8 +38,8 @@ "Folder name" : "目录名称", "Configuration" : "配置", "Available for" : "可用于", - "Delete" : "删除", "Add storage" : "增加存储", + "Delete" : "删除", "Allow users to mount the following external storage" : "允许用户挂载以下外部存储" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_external/l10n/zh_TW.js b/apps/files_external/l10n/zh_TW.js index 61f224e4ffe..56182dc68c2 100644 --- a/apps/files_external/l10n/zh_TW.js +++ b/apps/files_external/l10n/zh_TW.js @@ -93,9 +93,9 @@ OC.L10N.register( "Authentication" : "驗證", "Configuration" : "設定", "Available for" : "可用的", + "Add storage" : "增加儲存區", "Advanced settings" : "進階設定", "Delete" : "刪除", - "Add storage" : "增加儲存區", "Allow users to mount external storage" : "允許使用者能自行掛載外部儲存", "Allow users to mount the following external storage" : "允許使用者自行掛載以下的外部儲存" }, diff --git a/apps/files_external/l10n/zh_TW.json b/apps/files_external/l10n/zh_TW.json index b9aa234e89e..629544bdaaf 100644 --- a/apps/files_external/l10n/zh_TW.json +++ b/apps/files_external/l10n/zh_TW.json @@ -91,9 +91,9 @@ "Authentication" : "驗證", "Configuration" : "設定", "Available for" : "可用的", + "Add storage" : "增加儲存區", "Advanced settings" : "進階設定", "Delete" : "刪除", - "Add storage" : "增加儲存區", "Allow users to mount external storage" : "允許使用者能自行掛載外部儲存", "Allow users to mount the following external storage" : "允許使用者自行掛載以下的外部儲存" },"pluralForm" :"nplurals=1; plural=0;" diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 6c900f0f224..7a869847a63 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -33,10 +33,10 @@ use phpseclib\Crypt\AES; use \OCA\Files_External\Appinfo\Application; -use \OCA\Files_External\Lib\BackendConfig; -use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Backend\LegacyBackend; use \OCA\Files_External\Lib\StorageConfig; +use \OCA\Files_External\Lib\Backend\Backend; +use \OCP\Files\StorageNotAvailableException; /** * Class to configure mount.json globally and for users @@ -49,11 +49,6 @@ class OC_Mount_Config { const MOUNT_TYPE_USER = 'user'; const MOUNT_TYPE_PERSONAL = 'personal'; - // getBackendStatus return types - const STATUS_SUCCESS = 0; - const STATUS_ERROR = 1; - const STATUS_INDETERMINATE = 2; - // whether to skip backend test (for unit tests, as this static class is not mockable) public static $skipTest = false; @@ -75,36 +70,6 @@ class OC_Mount_Config { return true; } - /* - * Hook that mounts the given user's visible mount points - * - * @param array $data - */ - public static function initMountPointsHook($data) { - if ($data['user']) { - $user = \OC::$server->getUserManager()->get($data['user']); - if (!$user) { - \OC::$server->getLogger()->warning( - 'Cannot init external mount points for non-existant user "' . $data['user'] . '".', - ['app' => 'files_external'] - ); - return; - } - $userView = new \OC\Files\View('/' . $user->getUID() . '/files'); - $changePropagator = new \OC\Files\Cache\ChangePropagator($userView); - $etagPropagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, \OC::$server->getConfig()); - $etagPropagator->propagateDirtyMountPoints(); - \OCP\Util::connectHook( - \OC\Files\Filesystem::CLASSNAME, - \OC\Files\Filesystem::signal_create_mount, - $etagPropagator, 'updateHook'); - \OCP\Util::connectHook( - \OC\Files\Filesystem::CLASSNAME, - \OC\Files\Filesystem::signal_delete_mount, - $etagPropagator, 'updateHook'); - } - } - /** * Returns the mount points for the given user. * The mount point is relative to the data directory. @@ -244,24 +209,27 @@ class OC_Mount_Config { * * @param string $class backend class name * @param array $options backend configuration options + * @param boolean $isPersonal * @return int see self::STATUS_* + * @throws Exception */ public static function getBackendStatus($class, $options, $isPersonal) { if (self::$skipTest) { - return self::STATUS_SUCCESS; + return StorageNotAvailableException::STATUS_SUCCESS; } foreach ($options as &$option) { $option = self::setUserVars(OCP\User::getUser(), $option); } if (class_exists($class)) { try { + /** @var \OC\Files\Storage\Common $storage */ $storage = new $class($options); try { $result = $storage->test($isPersonal); $storage->setAvailability($result); if ($result) { - return self::STATUS_SUCCESS; + return StorageNotAvailableException::STATUS_SUCCESS; } } catch (\Exception $e) { $storage->setAvailability(false); @@ -272,7 +240,7 @@ class OC_Mount_Config { throw $exception; } } - return self::STATUS_ERROR; + return StorageNotAvailableException::STATUS_ERROR; } /** @@ -322,7 +290,7 @@ class OC_Mount_Config { * Get backend dependency message * TODO: move into AppFramework along with templates * - * @param BackendConfig[] $backends + * @param Backend[] $backends * @return string */ public static function dependencyMessage($backends) { @@ -361,11 +329,11 @@ class OC_Mount_Config { private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) { switch (strtolower($module)) { case 'curl': - return $l->t('<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); + return (string)$l->t('<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); case 'ftp': - return $l->t('<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); + return (string)$l->t('<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend); default: - return $l->t('<b>Note:</b> "%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend)); + return (string)$l->t('<b>Note:</b> "%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend)); } } diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php index 3a04512e8a8..f9640d53377 100644 --- a/apps/files_external/lib/config/configadapter.php +++ b/apps/files_external/lib/config/configadapter.php @@ -32,7 +32,6 @@ use OCP\IUser; use OCA\Files_external\Service\UserStoragesService; use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Lib\StorageConfig; -use OCP\Files\StorageNotAvailableException; use OCA\Files_External\Lib\FailedStorage; /** diff --git a/apps/files_external/lib/etagpropagator.php b/apps/files_external/lib/etagpropagator.php deleted file mode 100644 index 772a11ea36f..00000000000 --- a/apps/files_external/lib/etagpropagator.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -/** - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <icewind@owncloud.com> - * @author Vincent Petry <pvince81@owncloud.com> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace OCA\Files_External; - -use OC\Files\Filesystem; - -/** - * Updates the etag of parent folders whenever a new external storage mount - * point has been created or deleted. Updates need to be triggered using - * the updateHook() method. - * - * There are two modes of operation: - * - for personal mount points, the etag is propagated directly - * - for system mount points, a dirty flag is saved in the configuration and - * the etag will be updated the next time propagateDirtyMountPoints() is called - */ -class EtagPropagator { - /** - * @var \OCP\IUser - */ - protected $user; - - /** - * @var \OC\Files\Cache\ChangePropagator - */ - protected $changePropagator; - - /** - * @var \OCP\IConfig - */ - protected $config; - - /** - * @param \OCP\IUser $user current user, must match the propagator's - * user - * @param \OC\Files\Cache\ChangePropagator $changePropagator change propagator - * initialized with a view for $user - * @param \OCP\IConfig $config - */ - public function __construct($user, $changePropagator, $config) { - $this->user = $user; - $this->changePropagator = $changePropagator; - $this->config = $config; - } - - /** - * Propagate the etag changes for all mountpoints marked as dirty and mark the mountpoints as clean - * - * @param int $time - */ - public function propagateDirtyMountPoints($time = null) { - if ($time === null) { - $time = time(); - } - $mountPoints = $this->getDirtyMountPoints(); - foreach ($mountPoints as $mountPoint) { - $this->changePropagator->addChange($mountPoint); - $this->config->setUserValue($this->user->getUID(), 'files_external', $mountPoint, $time); - } - if (count($mountPoints)) { - $this->changePropagator->propagateChanges($time); - } - } - - /** - * Get all mountpoints we need to update the etag for - * - * @return string[] - */ - protected function getDirtyMountPoints() { - $dirty = array(); - $mountPoints = $this->config->getAppKeys('files_external'); - foreach ($mountPoints as $mountPoint) { - if (substr($mountPoint, 0, 1) === '/') { - $updateTime = $this->config->getAppValue('files_external', $mountPoint); - $userTime = $this->config->getUserValue($this->user->getUID(), 'files_external', $mountPoint); - if ($updateTime > $userTime) { - $dirty[] = $mountPoint; - } - } - } - return $dirty; - } - - /** - * @param string $mountPoint - * @param int $time - */ - protected function markDirty($mountPoint, $time = null) { - if ($time === null) { - $time = time(); - } - $this->config->setAppValue('files_external', $mountPoint, $time); - } - - /** - * Update etags for mount points for known user - * For global or group mount points, updating the etag for every user is not feasible - * instead we mark the mount point as dirty and update the etag when the filesystem is loaded for the user - * For personal mount points, the change is propagated directly - * - * @param array $params hook parameters - * @param int $time update time to use when marking a mount point as dirty - */ - public function updateHook($params, $time = null) { - if ($time === null) { - $time = time(); - } - $users = $params[Filesystem::signal_param_users]; - $type = $params[Filesystem::signal_param_mount_type]; - $mountPoint = $params[Filesystem::signal_param_path]; - $mountPoint = Filesystem::normalizePath($mountPoint); - if ($type === \OC_Mount_Config::MOUNT_TYPE_GROUP or $users === 'all') { - $this->markDirty($mountPoint, $time); - } else { - $this->changePropagator->addChange($mountPoint); - $this->changePropagator->propagateChanges($time); - } - } -} diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index 5dcc7686ca3..bcf3143736e 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -52,27 +52,37 @@ class SFTP extends \OC\Files\Storage\Common { protected $client; /** + * @param string $host protocol://server:port + * @return array [$server, $port] + */ + private function splitHost($host) { + $input = $host; + if (strpos($host, '://') === false) { + // add a protocol to fix parse_url behavior with ipv6 + $host = 'http://' . $host; + } + + $parsed = parse_url($host); + if(is_array($parsed) && isset($parsed['port'])) { + return [$parsed['host'], $parsed['port']]; + } else if (is_array($parsed)) { + return [$parsed['host'], 22]; + } else { + return [$input, 22]; + } + } + + /** * {@inheritdoc} */ public function __construct($params) { // Register sftp:// Stream::register(); - $this->host = $params['host']; + $parsedHost = $this->splitHost($params['host']); - //deals with sftp://server example - $proto = strpos($this->host, '://'); - if ($proto != false) { - $this->host = substr($this->host, $proto+3); - } - - //deals with server:port - $hasPort = strpos($this->host,':'); - if($hasPort != false) { - $pieces = explode(":", $this->host); - $this->host = $pieces[0]; - $this->port = $pieces[1]; - } + $this->host = $parsedHost[0]; + $this->port = $parsedHost[1]; $this->user = $params['user']; @@ -185,7 +195,7 @@ class SFTP extends \OC\Files\Storage\Common { } /** - * @return bool|string + * @return string|false */ private function hostKeysPath() { try { diff --git a/apps/files_external/lib/storageconfig.php b/apps/files_external/lib/storageconfig.php index 86a7e6ffa12..97e0386be73 100644 --- a/apps/files_external/lib/storageconfig.php +++ b/apps/files_external/lib/storageconfig.php @@ -302,6 +302,25 @@ class StorageConfig implements \JsonSerializable { } /** + * @param string $key + * @return mixed + */ + public function getMountOption($key) { + if (isset($this->mountOptions[$key])) { + return $this->mountOptions[$key]; + } + return null; + } + + /** + * @param string $key + * @param mixed $value + */ + public function setMountOption($key, $value) { + $this->mountOptions[$key] = $value; + } + + /** * Gets the storage status, whether the config worked last time * * @return int $status status diff --git a/apps/files_external/personal.php b/apps/files_external/personal.php index df15c3bd258..05196a58905 100644 --- a/apps/files_external/personal.php +++ b/apps/files_external/personal.php @@ -32,31 +32,11 @@ $appContainer = \OC_Mount_Config::$app->getContainer(); $backendService = $appContainer->query('OCA\Files_External\Service\BackendService'); $userStoragesService = $appContainer->query('OCA\Files_external\Service\UserStoragesService'); -OCP\Util::addScript('files_external', 'settings'); -OCP\Util::addStyle('files_external', 'settings'); - -$backends = array_filter($backendService->getAvailableBackends(), function($backend) { - return $backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL); -}); -$authMechanisms = array_filter($backendService->getAuthMechanisms(), function($authMechanism) { - return $authMechanism->isVisibleFor(BackendService::VISIBILITY_PERSONAL); -}); -foreach ($backends as $backend) { - if ($backend->getCustomJs()) { - \OCP\Util::addScript('files_external', $backend->getCustomJs()); - } -} -foreach ($authMechanisms as $authMechanism) { - if ($authMechanism->getCustomJs()) { - \OCP\Util::addScript('files_external', $authMechanism->getCustomJs()); - } -} - $tmpl = new OCP\Template('files_external', 'settings'); $tmpl->assign('encryptionEnabled', \OC::$server->getEncryptionManager()->isEnabled()); -$tmpl->assign('isAdminPage', false); +$tmpl->assign('visibilityType', BackendService::VISIBILITY_PERSONAL); $tmpl->assign('storages', $userStoragesService->getStorages()); $tmpl->assign('dependencies', OC_Mount_Config::dependencyMessage($backendService->getBackends())); -$tmpl->assign('backends', $backends); -$tmpl->assign('authMechanisms', $authMechanisms); +$tmpl->assign('backends', $backendService->getAvailableBackends()); +$tmpl->assign('authMechanisms', $backendService->getAuthMechanisms()); return $tmpl->fetchPage(); diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php index 41bb0ca9b80..c847930ba2d 100644 --- a/apps/files_external/service/storagesservice.php +++ b/apps/files_external/service/storagesservice.php @@ -31,6 +31,7 @@ use \OCA\Files_external\NotFoundException; use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Backend\Backend; use \OCA\Files_External\Lib\Auth\AuthMechanism; +use \OCP\Files\StorageNotAvailableException; /** * Service class to manage external storages @@ -221,17 +222,26 @@ abstract class StoragesService { $currentStorage->setMountPoint($relativeMountPath); } - $this->populateStorageConfigWithLegacyOptions( - $currentStorage, - $mountType, - $applicable, - $storageOptions - ); + try { + $this->populateStorageConfigWithLegacyOptions( + $currentStorage, + $mountType, + $applicable, + $storageOptions + ); - if ($hasId) { - $storages[$configId] = $currentStorage; - } else { - $storagesWithConfigHash[$configId] = $currentStorage; + if ($hasId) { + $storages[$configId] = $currentStorage; + } else { + $storagesWithConfigHash[$configId] = $currentStorage; + } + } catch (\UnexpectedValueException $e) { + // dont die if a storage backend doesn't exist + \OCP\Util::writeLog( + 'files_external', + 'Could not load storage: "' . $e->getMessage() . '"', + \OCP\Util::ERROR + ); } } } @@ -402,7 +412,7 @@ abstract class StoragesService { $this->triggerHooks($newStorage, Filesystem::signal_create_mount); - $newStorage->setStatus(\OC_Mount_Config::STATUS_SUCCESS); + $newStorage->setStatus(StorageNotAvailableException::STATUS_SUCCESS); return $newStorage; } diff --git a/apps/files_external/settings.php b/apps/files_external/settings.php index 03ed363bdb2..50d47d667fd 100644 --- a/apps/files_external/settings.php +++ b/apps/files_external/settings.php @@ -35,40 +35,15 @@ $appContainer = \OC_Mount_Config::$app->getContainer(); $backendService = $appContainer->query('OCA\Files_External\Service\BackendService'); $globalStoragesService = $appContainer->query('OCA\Files_external\Service\GlobalStoragesService'); -OCP\Util::addScript('files_external', 'settings'); -OCP\Util::addStyle('files_external', 'settings'); - \OC_Util::addVendorScript('select2/select2'); \OC_Util::addVendorStyle('select2/select2'); -$backends = array_filter($backendService->getAvailableBackends(), function($backend) { - return $backend->isVisibleFor(BackendService::VISIBILITY_ADMIN); -}); -$authMechanisms = array_filter($backendService->getAuthMechanisms(), function($authMechanism) { - return $authMechanism->isVisibleFor(BackendService::VISIBILITY_ADMIN); -}); -foreach ($backends as $backend) { - if ($backend->getCustomJs()) { - \OCP\Util::addScript('files_external', $backend->getCustomJs()); - } -} -foreach ($authMechanisms as $authMechanism) { - if ($authMechanism->getCustomJs()) { - \OCP\Util::addScript('files_external', $authMechanism->getCustomJs()); - } -} - -$userBackends = array_filter($backendService->getAvailableBackends(), function($backend) { - return $backend->isAllowedVisibleFor(BackendService::VISIBILITY_PERSONAL); -}); - $tmpl = new OCP\Template('files_external', 'settings'); $tmpl->assign('encryptionEnabled', \OC::$server->getEncryptionManager()->isEnabled()); -$tmpl->assign('isAdminPage', true); +$tmpl->assign('visibilityType', BackendService::VISIBILITY_ADMIN); $tmpl->assign('storages', $globalStoragesService->getStorages()); -$tmpl->assign('backends', $backends); -$tmpl->assign('authMechanisms', $authMechanisms); -$tmpl->assign('userBackends', $userBackends); +$tmpl->assign('backends', $backendService->getAvailableBackends()); +$tmpl->assign('authMechanisms', $backendService->getAuthMechanisms()); $tmpl->assign('dependencies', OC_Mount_Config::dependencyMessage($backendService->getBackends())); $tmpl->assign('allowUserMounting', $backendService->isUserMountingAllowed()); return $tmpl->fetchPage(); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index cebf6cc4de0..f7caf3d2caa 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -3,6 +3,21 @@ use \OCA\Files_External\Lib\DefinitionParameter; use \OCA\Files_External\Service\BackendService; + script('files_external', 'settings'); + style('files_external', 'settings'); + + // load custom JS + foreach ($_['backends'] as $backend) { + if ($backend->getCustomJs()) { + script('files_external', $backend->getCustomJs()); + } + } + foreach ($_['authMechanisms'] as $authMechanism) { + if ($authMechanism->getCustomJs()) { + script('files_external', $authMechanism->getCustomJs()); + } + } + function writeParameterInput($parameter, $options, $classes = []) { $value = ''; if (isset($options[$parameter->getName()])) { @@ -56,7 +71,7 @@ <form id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <h2><?php p($l->t('External Storage')); ?></h2> <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?> - <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'> + <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'> <thead> <tr> <th></th> @@ -64,79 +79,12 @@ <th><?php p($l->t('External storage')); ?></th> <th><?php p($l->t('Authentication')); ?></th> <th><?php p($l->t('Configuration')); ?></th> - <?php if ($_['isAdminPage']) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?> + <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?> <th> </th> <th> </th> </tr> </thead> <tbody> - <?php foreach ($_['storages'] as $storage): ?> - <tr class="<?php p($storage->getBackend()->getIdentifier()); ?>" data-id="<?php p($storage->getId()); ?>"> - <td class="status"> - <span></span> - </td> - <td class="mountPoint"><input type="text" name="mountPoint" - value="<?php p(ltrim($storage->getMountPoint(), '/')); ?>" - data-mountpoint="<?php p(ltrim($storage->getMountPoint(), '/')); ?>" - placeholder="<?php p($l->t('Folder name')); ?>" /> - </td> - <td class="backend" data-class="<?php p($storage->getBackend()->getIdentifier()); ?>"><?php p($storage->getBackend()->getText()); ?> - </td> - <td class="authentication"> - <select class="selectAuthMechanism"> - <?php - $authSchemes = $storage->getBackend()->getAuthSchemes(); - $authMechanisms = array_filter($_['authMechanisms'], function($mech) use ($authSchemes) { - return isset($authSchemes[$mech->getScheme()]); - }); - ?> - <?php foreach ($authMechanisms as $mech): ?> - <option value="<?php p($mech->getIdentifier()); ?>" data-scheme="<?php p($mech->getScheme());?>" - <?php if ($mech->getIdentifier() === $storage->getAuthMechanism()->getIdentifier()): ?>selected<?php endif; ?> - ><?php p($mech->getText()); ?></option> - <?php endforeach; ?> - </select> - </td> - <td class="configuration"> - <?php - $options = $storage->getBackendOptions(); - foreach ($storage->getBackend()->getParameters() as $parameter) { - writeParameterInput($parameter, $options); - } - foreach ($storage->getAuthMechanism()->getParameters() as $parameter) { - writeParameterInput($parameter, $options, ['auth-param']); - } - ?> - </td> - <?php if ($_['isAdminPage']): ?> - <td class="applicable" - align="right" - data-applicable-groups='<?php print_unescaped(json_encode($storage->getApplicableGroups())); ?>' - data-applicable-users='<?php print_unescaped(json_encode($storage->getApplicableUsers())); ?>'> - <input type="hidden" class="applicableUsers" style="width:20em;" value=""/> - </td> - <?php endif; ?> - <td class="mountOptionsToggle"> - <img - class="svg action" - title="<?php p($l->t('Advanced settings')); ?>" - alt="<?php p($l->t('Advanced settings')); ?>" - src="<?php print_unescaped(image_path('core', 'actions/settings.svg')); ?>" - /> - <input type="hidden" class="mountOptions" value="<?php p(json_encode($storage->getMountOptions())); ?>" /> - <?php if ($_['isAdminPage']): ?> - <input type="hidden" class="priority" value="<?php p($storage->getPriority()); ?>" /> - <?php endif; ?> - </td> - <td class="remove"> - <img alt="<?php p($l->t('Delete')); ?>" - title="<?php p($l->t('Delete')); ?>" - class="svg action" - src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>" - /> - </td> - </tr> - <?php endforeach; ?> <tr id="addMountPoint"> <td class="status"> <span></span> @@ -151,7 +99,9 @@ <?php p($l->t('Add storage')); ?> </option> <?php - $sortedBackends = $_['backends']; + $sortedBackends = array_filter($_['backends'], function($backend) use ($_) { + return $backend->isVisibleFor($_['visibilityType']); + }); uasort($sortedBackends, function($a, $b) { return strcasecmp($a->getText(), $b->getText()); }); @@ -164,7 +114,7 @@ </td> <td class="authentication" data-mechanisms='<?php p(json_encode($_['authMechanisms'])); ?>'></td> <td class="configuration"></td> - <?php if ($_['isAdminPage']): ?> + <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?> <td class="applicable" align="right"> <input type="hidden" class="applicableUsers" style="width:20em;" value="" /> </td> @@ -189,7 +139,7 @@ </table> <br /> - <?php if ($_['isAdminPage']): ?> + <?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?> <br /> <input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox" value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> /> @@ -197,7 +147,12 @@ <p id="userMountingBackends"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>> <?php p($l->t('Allow users to mount the following external storage')); ?><br /> - <?php $i = 0; foreach ($_['userBackends'] as $backend): ?> + <?php + $userBackends = array_filter($_['backends'], function($backend) { + return $backend->isAllowedVisibleFor(BackendService::VISIBILITY_PERSONAL); + }); + ?> + <?php $i = 0; foreach ($userBackends as $backend): ?> <?php if ($deprecateTo = $backend->getDeprecateTo()): ?> <input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" /> <?php else: ?> diff --git a/apps/files_external/tests/amazons3migration.php b/apps/files_external/tests/amazons3migration.php index 3eba5bca644..33fb6119a92 100644 --- a/apps/files_external/tests/amazons3migration.php +++ b/apps/files_external/tests/amazons3migration.php @@ -25,6 +25,13 @@ namespace Test\Files\Storage; +/** + * Class AmazonS3Migration + * + * @group DB + * + * @package Test\Files\Storage + */ class AmazonS3Migration extends \Test\TestCase { /** diff --git a/apps/files_external/tests/backends/amazons3.php b/apps/files_external/tests/backends/amazons3.php index c16581a4495..e1465b51125 100644 --- a/apps/files_external/tests/backends/amazons3.php +++ b/apps/files_external/tests/backends/amazons3.php @@ -25,6 +25,13 @@ namespace Test\Files\Storage; +/** + * Class AmazonS3 + * + * @group DB + * + * @package Test\Files\Storage + */ class AmazonS3 extends Storage { private $config; diff --git a/apps/files_external/tests/backends/dropbox.php b/apps/files_external/tests/backends/dropbox.php index 8765011532c..8dd0e58adc1 100644 --- a/apps/files_external/tests/backends/dropbox.php +++ b/apps/files_external/tests/backends/dropbox.php @@ -25,6 +25,13 @@ namespace Test\Files\Storage; +/** + * Class Dropbox + * + * @group DB + * + * @package Test\Files\Storage + */ class Dropbox extends Storage { private $config; diff --git a/apps/files_external/tests/backends/ftp.php b/apps/files_external/tests/backends/ftp.php index 20a5c275d29..b715f0f780d 100644 --- a/apps/files_external/tests/backends/ftp.php +++ b/apps/files_external/tests/backends/ftp.php @@ -26,6 +26,13 @@ namespace Test\Files\Storage; +/** + * Class FTP + * + * @group DB + * + * @package Test\Files\Storage + */ class FTP extends Storage { private $config; diff --git a/apps/files_external/tests/backends/google.php b/apps/files_external/tests/backends/google.php index 6ff235ac6af..c9a5d48382c 100644 --- a/apps/files_external/tests/backends/google.php +++ b/apps/files_external/tests/backends/google.php @@ -28,6 +28,13 @@ namespace Test\Files\Storage; require_once 'files_external/lib/google.php'; +/** + * Class Google + * + * @group DB + * + * @package Test\Files\Storage + */ class Google extends Storage { private $config; diff --git a/apps/files_external/tests/backends/owncloud.php b/apps/files_external/tests/backends/owncloud.php index 47e27870be2..d51fa638c50 100644 --- a/apps/files_external/tests/backends/owncloud.php +++ b/apps/files_external/tests/backends/owncloud.php @@ -23,6 +23,13 @@ namespace Test\Files\Storage; +/** + * Class OwnCloud + * + * @group DB + * + * @package Test\Files\Storage + */ class OwnCloud extends Storage { private $config; diff --git a/apps/files_external/tests/backends/sftp.php b/apps/files_external/tests/backends/sftp.php index da2c0ac6ba2..03f2dcc0d77 100644 --- a/apps/files_external/tests/backends/sftp.php +++ b/apps/files_external/tests/backends/sftp.php @@ -25,7 +25,19 @@ namespace Test\Files\Storage; +/** + * Class SFTP + * + * @group DB + * + * @package Test\Files\Storage + */ class SFTP extends Storage { + /** + * @var \OC\Files\Storage\SFTP instance + */ + protected $instance; + private $config; protected function setUp() { @@ -103,6 +115,39 @@ class SFTP extends Storage { ], 'sftp::someuser@somehost:8822//remotedir/subdir/', ], + [ + // ipv6 with port + [ + 'run' => true, + 'host' => 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329', + 'user' => 'someuser', + 'password' => 'somepassword', + 'root' => 'remotedir/subdir/', + ], + 'sftp::someuser@FE80:0000:0000:0000:0202:B3FF:FE1E:8329//remotedir/subdir/', + ], + [ + // ipv6 without port + [ + 'run' => true, + 'host' => 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329:8822', + 'user' => 'someuser', + 'password' => 'somepassword', + 'root' => 'remotedir/subdir/', + ], + 'sftp::someuser@FE80:0000:0000:0000:0202:B3FF:FE1E:8329:8822//remotedir/subdir/', + ], + [ + // collapsed ipv6 with port + [ + 'run' => true, + 'host' => 'FE80::0202:B3FF:FE1E:8329:8822', + 'user' => 'someuser', + 'password' => 'somepassword', + 'root' => 'remotedir/subdir/', + ], + 'sftp::someuser@FE80::0202:B3FF:FE1E:8329:8822//remotedir/subdir/', + ], ]; } } diff --git a/apps/files_external/tests/backends/sftp_key.php b/apps/files_external/tests/backends/sftp_key.php index 6e8ac9f7239..762cb0887c1 100644 --- a/apps/files_external/tests/backends/sftp_key.php +++ b/apps/files_external/tests/backends/sftp_key.php @@ -23,6 +23,13 @@ namespace Test\Files\Storage; +/** + * Class SFTP_Key + * + * @group DB + * + * @package Test\Files\Storage + */ class SFTP_Key extends Storage { private $config; diff --git a/apps/files_external/tests/backends/smb.php b/apps/files_external/tests/backends/smb.php index 0da86cb824f..0c43aba24dd 100644 --- a/apps/files_external/tests/backends/smb.php +++ b/apps/files_external/tests/backends/smb.php @@ -24,6 +24,13 @@ namespace Test\Files\Storage; +/** + * Class SMB + * + * @group DB + * + * @package Test\Files\Storage + */ class SMB extends Storage { protected function setUp() { diff --git a/apps/files_external/tests/backends/swift.php b/apps/files_external/tests/backends/swift.php index 2e6670f84f8..b71b4f77add 100644 --- a/apps/files_external/tests/backends/swift.php +++ b/apps/files_external/tests/backends/swift.php @@ -25,6 +25,13 @@ namespace Test\Files\Storage; +/** + * Class Swift + * + * @group DB + * + * @package Test\Files\Storage + */ class Swift extends Storage { private $config; @@ -32,28 +39,35 @@ class Swift extends Storage { protected function setUp() { parent::setUp(); - $this->config = include('files_external/tests/config.php'); - if (!is_array($this->config) or !isset($this->config['swift']) - or !$this->config['swift']['run']) { + $this->config = include('files_external/tests/config.swift.php'); + if (!is_array($this->config) or !$this->config['run']) { $this->markTestSkipped('OpenStack Object Storage backend not configured'); } - $this->instance = new \OC\Files\Storage\Swift($this->config['swift']); + $this->instance = new \OC\Files\Storage\Swift($this->config); } protected function tearDown() { if ($this->instance) { - $connection = $this->instance->getConnection(); - $container = $connection->getContainer($this->config['swift']['bucket']); + try { + $connection = $this->instance->getConnection(); + $container = $connection->getContainer($this->config['bucket']); - $objects = $container->objectList(); - while($object = $objects->next()) { - $object->setName(str_replace('#','%23',$object->getName())); - $object->delete(); - } + $objects = $container->objectList(); + while($object = $objects->next()) { + $object->setName(str_replace('#','%23',$object->getName())); + $object->delete(); + } - $container->delete(); + $container->delete(); + } catch (\Guzzle\Http\Exception\ClientErrorResponseException $e) { + // container didn't exist, so we don't need to delete it + } } parent::tearDown(); } + + public function testStat() { + $this->markTestSkipped('Swift doesn\'t update the parents folder mtime'); + } } diff --git a/apps/files_external/tests/backends/webdav.php b/apps/files_external/tests/backends/webdav.php index e2020da7c72..130e0c99cb3 100644 --- a/apps/files_external/tests/backends/webdav.php +++ b/apps/files_external/tests/backends/webdav.php @@ -24,6 +24,13 @@ namespace Test\Files\Storage; +/** + * Class DAV + * + * @group DB + * + * @package Test\Files\Storage + */ class DAV extends Storage { protected function setUp() { diff --git a/apps/files_external/tests/env/start-amazons3-ceph.sh b/apps/files_external/tests/env/start-amazons3-ceph.sh index 3b4a15da92a..20fa7e7bb2b 100755 --- a/apps/files_external/tests/env/start-amazons3-ceph.sh +++ b/apps/files_external/tests/env/start-amazons3-ceph.sh @@ -49,9 +49,12 @@ echo "${docker_image} container: $container" # put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.amazons3 -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 20 seconds for ceph initialization ... " -sleep 20 +echo -n "Waiting for ceph initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} ${port} 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +sleep 1 echo "Create ceph user" docker exec $container radosgw-admin user create \ diff --git a/apps/files_external/tests/env/start-ftp-morrisjobke.sh b/apps/files_external/tests/env/start-ftp-morrisjobke.sh index f1ab7f69952..3a5f6ffcb67 100755 --- a/apps/files_external/tests/env/start-ftp-morrisjobke.sh +++ b/apps/files_external/tests/env/start-ftp-morrisjobke.sh @@ -54,12 +54,16 @@ echo "ftp container: $container" # put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) echo $container >> $thisFolder/dockerContainerMorrisJobke.$EXECUTOR_NUMBER.ftp +echo -n "Waiting for ftp initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} 21 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +sleep 1 + if [ -n "$DEBUG" ]; then cat $thisFolder/config.ftp.php cat $thisFolder/dockerContainerMorrisJobke.$EXECUTOR_NUMBER.ftp fi -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 5 seconds for ftp initialization ... " -sleep 5 diff --git a/apps/files_external/tests/env/start-sftp-atmoz.sh b/apps/files_external/tests/env/start-sftp-atmoz.sh index bebc7289250..0fc0c5c427f 100755 --- a/apps/files_external/tests/env/start-sftp-atmoz.sh +++ b/apps/files_external/tests/env/start-sftp-atmoz.sh @@ -54,15 +54,18 @@ echo "sftp container: $container" # put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) echo $container >> $thisFolder/dockerContainerAtmoz.$EXECUTOR_NUMBER.sftp +echo -n "Waiting for sftp initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} 22 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +sleep 1 + if [ -n "$DEBUG" ]; then cat $thisFolder/config.sftp.php cat $thisFolder/dockerContainerAtmoz.$EXECUTOR_NUMBER.sftp fi -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 5 seconds for sftp initialization ... " -sleep 5 - # create folder "upload" with correct permissions docker exec $container bash -c "mkdir /home/$user/upload && chown $user:users /home/$user/upload" diff --git a/apps/files_external/tests/env/start-smb-silvershell.sh b/apps/files_external/tests/env/start-smb-silvershell.sh index 41ba3b11a70..a7ff3f71eb1 100755 --- a/apps/files_external/tests/env/start-smb-silvershell.sh +++ b/apps/files_external/tests/env/start-smb-silvershell.sh @@ -52,12 +52,16 @@ echo "samba container: $container" # put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) echo $container >> $thisFolder/dockerContainerSilvershell.$EXECUTOR_NUMBER.smb +echo -n "Waiting for samba initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} 445 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +sleep 1 + if [ -n "$DEBUG" ]; then cat $thisFolder/config.smb.php cat $thisFolder/dockerContainerSilvershell.$EXECUTOR_NUMBER.smb fi -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 5 seconds for smbd initialization ... " -sleep 5 diff --git a/apps/files_external/tests/env/start-smb-windows.sh b/apps/files_external/tests/env/start-smb-windows.sh index 2143d7e7499..9453b4eb3e7 100755 --- a/apps/files_external/tests/env/start-smb-windows.sh +++ b/apps/files_external/tests/env/start-smb-windows.sh @@ -19,6 +19,11 @@ user=smb-test password=!owncloud123 host=WIN-9GTFAS08C15 +if ! "$thisFolder"/env/wait-for-connection ${host} 445 0; then + echo "[ERROR] Server not reachable" >&2 + exit 1 +fi + cat > $thisFolder/config.smb.php <<DELIM <?php diff --git a/apps/files_external/tests/env/start-swift-ceph.sh b/apps/files_external/tests/env/start-swift-ceph.sh new file mode 100755 index 00000000000..936bb667e94 --- /dev/null +++ b/apps/files_external/tests/env/start-swift-ceph.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# +# ownCloud +# +# This script start a docker container to test the files_external tests +# against. It will also change the files_external config to use the docker +# container as testing environment. This is reverted in the stop step.W +# +# Set environment variable DEBUG to print config file +# +# @author Morris Jobke +# @author Robin McCorkell +# @copyright 2015 ownCloud + +if ! command -v docker >/dev/null 2>&1; then + echo "No docker executable found - skipped docker setup" + exit 0; +fi + +echo "Docker executable found - setup docker" + +docker_image=xenopathic/ceph-keystone + +echo "Fetch recent ${docker_image} docker image" +docker pull ${docker_image} + +# retrieve current folder to place the config in the parent folder +thisFolder=`echo $0 | replace "env/start-swift-ceph.sh" ""` + +if [ -z "$thisFolder" ]; then + thisFolder="." +fi; + +port=5001 + +user=test +pass=testing +tenant=testenant +region=testregion +service=testceph + +container=`docker run -d \ + -e KEYSTONE_PUBLIC_PORT=${port} \ + -e KEYSTONE_ADMIN_USER=${user} \ + -e KEYSTONE_ADMIN_PASS=${pass} \ + -e KEYSTONE_ADMIN_TENANT=${tenant} \ + -e KEYSTONE_ENDPOINT_REGION=${region} \ + -e KEYSTONE_SERVICE=${service} \ + ${docker_image}` + +host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container` + + +echo "${docker_image} container: $container" + +# put container IDs into a file to drop them after the test run (keep in mind that multiple tests run in parallel on the same host) +echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift + +echo -n "Waiting for ceph initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +sleep 1 + +cat > $thisFolder/config.swift.php <<DELIM +<?php + +return array( + 'run'=>true, + 'url'=>'http://$host:$port/v2.0', + 'user'=>'$user', + 'tenant'=>'$tenant', + 'password'=>'$pass', + 'service_name'=>'$service', + 'bucket'=>'swift', + 'region' => '$region', +); + +DELIM + +if [ -n "$DEBUG" ]; then + cat $thisFolder/config.swift.php + cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift +fi diff --git a/apps/files_external/tests/env/start-webdav-ownCloud.sh b/apps/files_external/tests/env/start-webdav-ownCloud.sh index 6bf9142ee53..d992516d7b1 100755 --- a/apps/files_external/tests/env/start-webdav-ownCloud.sh +++ b/apps/files_external/tests/env/start-webdav-ownCloud.sh @@ -46,20 +46,23 @@ fi container=`docker run -P $parameter -d -e ADMINLOGIN=test -e ADMINPWD=test morrisjobke/owncloud` -# TODO find a way to determine the successful initialization inside the docker container -echo "Waiting 30 seconds for ownCloud initialization ... " -sleep 30 +host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container` -# get mapped port on host for internal port 80 - output is IP:PORT - we need to extract the port with 'cut' -port=`docker port $container 80 | cut -f 2 -d :` +echo -n "Waiting for ownCloud initialization" +if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 +fi +# wait at least 5 more seconds - sometimes the webserver still needs some additional time +sleep 5 cat > $thisFolder/config.webdav.php <<DELIM <?php return array( 'run'=>true, - 'host'=>'localhost:$port/owncloud/remote.php/webdav/', + 'host'=>'${host}:80/owncloud/remote.php/webdav/', 'user'=>'test', 'password'=>'test', 'root'=>'', diff --git a/apps/files_external/tests/env/stop-swift-ceph.sh b/apps/files_external/tests/env/stop-swift-ceph.sh new file mode 100755 index 00000000000..edac1389a78 --- /dev/null +++ b/apps/files_external/tests/env/stop-swift-ceph.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# ownCloud +# +# This script stops the docker container the files_external tests were run +# against. It will also revert the config changes done in start step. +# +# @author Morris Jobke +# @author Robin McCorkell +# @copyright 2015 ownCloud + +if ! command -v docker >/dev/null 2>&1; then + echo "No docker executable found - skipped docker stop" + exit 0; +fi + +echo "Docker executable found - stop and remove docker containers" + +# retrieve current folder to remove the config from the parent folder +thisFolder=`echo $0 | replace "env/stop-swift-ceph.sh" ""` + +if [ -z "$thisFolder" ]; then + thisFolder="." +fi; + +# stopping and removing docker containers +for container in `cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift`; do + echo "Stopping and removing docker container $container" + # kills running container and removes it + docker rm -f $container +done; + +# cleanup +rm $thisFolder/config.swift.php +rm $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift + diff --git a/apps/files_external/tests/env/wait-for-connection b/apps/files_external/tests/env/wait-for-connection new file mode 100755 index 00000000000..2c480fb733e --- /dev/null +++ b/apps/files_external/tests/env/wait-for-connection @@ -0,0 +1,45 @@ +#!/usr/bin/php +<?php + +$timeout = 60; + +switch ($argc) { +case 4: + $timeout = (float)$argv[3]; +case 3: + $host = $argv[1]; + $port = (int)$argv[2]; + break; +default: + fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n"); + exit(2); +} + +if ($timeout < 0) { + fwrite(STDERR, 'Timeout must be greater than zero'."\n"); + exit(2); +} +if ($port < 1) { + fwrite(STDERR, 'Port must be an integer greater than zero'."\n"); + exit(2); +} + +$socketTimeout = (float)ini_get('default_socket_timeout'); +if ($socketTimeout > $timeout) { + $socketTimeout = $timeout; +} + +$stopTime = time() + $timeout; +do { + $sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout); + if ($sock !== false) { + fclose($sock); + fwrite(STDOUT, "\n"); + exit(0); + } + sleep(1); + fwrite(STDOUT, '.'); +} while (time() < $stopTime); + +fwrite(STDOUT, "\n"); +exit(1); diff --git a/apps/files_external/tests/etagpropagator.php b/apps/files_external/tests/etagpropagator.php deleted file mode 100644 index d45982cb40c..00000000000 --- a/apps/files_external/tests/etagpropagator.php +++ /dev/null @@ -1,343 +0,0 @@ -<?php -/** - * @author Joas Schilling <nickvergessen@owncloud.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <icewind@owncloud.com> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -namespace Tests\Files_External; - -use OC\Files\Filesystem; -use OC\User\User; - -class EtagPropagator extends \Test\TestCase { - protected function getUser() { - return new User($this->getUniqueID(), null); - } - - /** - * @return \PHPUnit_Framework_MockObject_MockObject | \OC\Files\Cache\ChangePropagator - */ - protected function getChangePropagator() { - return $this->getMockBuilder('\OC\Files\Cache\ChangePropagator') - ->disableOriginalConstructor() - ->getMock(); - } - - /** - * @return \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig - */ - protected function getConfig() { - $appConfig = array(); - $userConfig = array(); - $mock = $this->getMockBuilder('\OCP\IConfig') - ->disableOriginalConstructor() - ->getMock(); - - $mock->expects($this->any()) - ->method('getAppValue') - ->will($this->returnCallback(function ($appId, $key, $default = null) use (&$appConfig) { - if (isset($appConfig[$appId]) and isset($appConfig[$appId][$key])) { - return $appConfig[$appId][$key]; - } else { - return $default; - } - })); - $mock->expects($this->any()) - ->method('setAppValue') - ->will($this->returnCallback(function ($appId, $key, $value) use (&$appConfig) { - if (!isset($appConfig[$appId])) { - $appConfig[$appId] = array(); - } - $appConfig[$appId][$key] = $value; - })); - $mock->expects($this->any()) - ->method('getAppKeys') - ->will($this->returnCallback(function ($appId) use (&$appConfig) { - if (!isset($appConfig[$appId])) { - $appConfig[$appId] = array(); - } - return array_keys($appConfig[$appId]); - })); - - $mock->expects($this->any()) - ->method('getUserValue') - ->will($this->returnCallback(function ($userId, $appId, $key, $default = null) use (&$userConfig) { - if (isset($userConfig[$userId]) and isset($userConfig[$userId][$appId]) and isset($userConfig[$userId][$appId][$key])) { - return $userConfig[$userId][$appId][$key]; - } else { - return $default; - } - })); - $mock->expects($this->any()) - ->method('setUserValue') - ->will($this->returnCallback(function ($userId, $appId, $key, $value) use (&$userConfig) { - if (!isset($userConfig[$userId])) { - $userConfig[$userId] = array(); - } - if (!isset($userConfig[$userId][$appId])) { - $userConfig[$userId][$appId] = array(); - } - $userConfig[$userId][$appId][$key] = $value; - })); - - return $mock; - } - - public function testSingleUserMount() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $changePropagator->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator->updateHook(array( - Filesystem::signal_param_path => '/test', - Filesystem::signal_param_mount_type => \OC_Mount_Config::MOUNT_TYPE_USER, - Filesystem::signal_param_users => $user->getUID(), - ), $time); - } - - public function testGlobalMountNoDirectUpdate() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - // not updated directly - $changePropagator->expects($this->never()) - ->method('addChange'); - $changePropagator->expects($this->never()) - ->method('propagateChanges'); - - $propagator->updateHook(array( - Filesystem::signal_param_path => '/test', - Filesystem::signal_param_mount_type => \OC_Mount_Config::MOUNT_TYPE_USER, - Filesystem::signal_param_users => 'all', - ), $time); - - // mount point marked as dirty - $this->assertEquals(array('/test'), $config->getAppKeys('files_external')); - $this->assertEquals($time, $config->getAppValue('files_external', '/test')); - } - - public function testGroupMountNoDirectUpdate() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - // not updated directly - $changePropagator->expects($this->never()) - ->method('addChange'); - $changePropagator->expects($this->never()) - ->method('propagateChanges'); - - $propagator->updateHook(array( - Filesystem::signal_param_path => '/test', - Filesystem::signal_param_mount_type => \OC_Mount_Config::MOUNT_TYPE_GROUP, - Filesystem::signal_param_users => 'test', - ), $time); - - // mount point marked as dirty - $this->assertEquals(array('/test'), $config->getAppKeys('files_external')); - $this->assertEquals($time, $config->getAppValue('files_external', '/test')); - } - - public function testGlobalMountNoDirtyMountPoint() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $changePropagator->expects($this->never()) - ->method('addChange'); - $changePropagator->expects($this->never()) - ->method('propagateChanges'); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals(0, $config->getUserValue($user->getUID(), 'files_external', '/test', 0)); - } - - public function testGlobalMountDirtyMountPointFirstTime() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - - $changePropagator->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user->getUID(), 'files_external', '/test')); - } - - public function testGlobalMountNonDirtyMountPoint() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - $config->setUserValue($user->getUID(), 'files_external', '/test', $time - 10); - - $changePropagator->expects($this->never()) - ->method('addChange'); - $changePropagator->expects($this->never()) - ->method('propagateChanges'); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals($time - 10, $config->getUserValue($user->getUID(), 'files_external', '/test')); - } - - public function testGlobalMountNonDirtyMountPointOtherUser() { - $time = time(); - $user = $this->getUser(); - $user2 = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - $config->setUserValue($user2->getUID(), 'files_external', '/test', $time - 10); - - $changePropagator->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user->getUID(), 'files_external', '/test')); - } - - public function testGlobalMountDirtyMountPointSecondTime() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - $config->setUserValue($user->getUID(), 'files_external', '/test', $time - 20); - - $changePropagator->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user->getUID(), 'files_external', '/test')); - } - - public function testGlobalMountMultipleUsers() { - $time = time(); - $config = $this->getConfig(); - $user1 = $this->getUser(); - $user2 = $this->getUser(); - $user3 = $this->getUser(); - $changePropagator1 = $this->getChangePropagator(); - $changePropagator2 = $this->getChangePropagator(); - $changePropagator3 = $this->getChangePropagator(); - $propagator1 = new \OCA\Files_External\EtagPropagator($user1, $changePropagator1, $config); - $propagator2 = new \OCA\Files_External\EtagPropagator($user2, $changePropagator2, $config); - $propagator3 = new \OCA\Files_External\EtagPropagator($user3, $changePropagator3, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - - $changePropagator1->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator1->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator1->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user1->getUID(), 'files_external', '/test')); - $this->assertEquals(0, $config->getUserValue($user2->getUID(), 'files_external', '/test', 0)); - $this->assertEquals(0, $config->getUserValue($user3->getUID(), 'files_external', '/test', 0)); - - $changePropagator2->expects($this->once()) - ->method('addChange') - ->with('/test'); - $changePropagator2->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator2->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user1->getUID(), 'files_external', '/test')); - $this->assertEquals($time, $config->getUserValue($user2->getUID(), 'files_external', '/test', 0)); - $this->assertEquals(0, $config->getUserValue($user3->getUID(), 'files_external', '/test', 0)); - } - - public function testGlobalMountMultipleDirtyMountPoints() { - $time = time(); - $user = $this->getUser(); - $config = $this->getConfig(); - $changePropagator = $this->getChangePropagator(); - $propagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, $config); - - $config->setAppValue('files_external', '/test', $time - 10); - $config->setAppValue('files_external', '/foo', $time - 50); - $config->setAppValue('files_external', '/bar', $time - 70); - - $config->setUserValue($user->getUID(), 'files_external', '/foo', $time - 70); - $config->setUserValue($user->getUID(), 'files_external', '/bar', $time - 70); - - $changePropagator->expects($this->exactly(2)) - ->method('addChange'); - $changePropagator->expects($this->once()) - ->method('propagateChanges') - ->with($time); - - $propagator->propagateDirtyMountPoints($time); - - $this->assertEquals($time, $config->getUserValue($user->getUID(), 'files_external', '/test')); - $this->assertEquals($time, $config->getUserValue($user->getUID(), 'files_external', '/foo')); - $this->assertEquals($time - 70, $config->getUserValue($user->getUID(), 'files_external', '/bar')); - } -} diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index 67a81277124..3d0168898ca 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -54,7 +54,8 @@ describe('OCA.External.Settings tests', function() { // within the DOM by the server template $('#externalStorage .selectBackend:first').data('configurations', { '\\OC\\TestBackend': { - 'backend': 'Test Backend Name', + 'identifier': '\\OC\\TestBackend', + 'name': 'Test Backend', 'configuration': { 'field1': 'Display Name 1', 'field2': '&Display Name 2' @@ -65,7 +66,8 @@ describe('OCA.External.Settings tests', function() { 'priority': 11 }, '\\OC\\AnotherTestBackend': { - 'backend': 'Another Test Backend Name', + 'identifier': '\\OC\\AnotherTestBackend', + 'name': 'Another Test Backend', 'configuration': { 'field1': 'Display Name 1', 'field2': '&Display Name 2' @@ -80,6 +82,7 @@ describe('OCA.External.Settings tests', function() { $('#externalStorage #addMountPoint .authentication:first').data('mechanisms', { 'mechanism1': { + 'identifier': 'mechanism1', 'name': 'Mechanism 1', 'configuration': { }, diff --git a/apps/files_external/tests/owncloudfunctions.php b/apps/files_external/tests/owncloudfunctions.php index 4cfe83db950..887dd91539b 100644 --- a/apps/files_external/tests/owncloudfunctions.php +++ b/apps/files_external/tests/owncloudfunctions.php @@ -24,6 +24,13 @@ namespace Test\Files\Storage; +/** + * Class OwnCloudFunctions + * + * @group DB + * + * @package Test\Files\Storage + */ class OwnCloudFunctions extends \Test\TestCase { function configUrlProvider() { |