diff options
Diffstat (limited to 'apps/files_external')
64 files changed, 763 insertions, 99 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php index 9b5994338a1..70f6b0159a6 100644 --- a/apps/files_external/appinfo/app.php +++ b/apps/files_external/appinfo/app.php @@ -18,6 +18,7 @@ OC::$CLASSPATH['OC\Files\Storage\SMB_OC'] = 'files_external/lib/smb_oc.php'; OC::$CLASSPATH['OC\Files\Storage\AmazonS3'] = 'files_external/lib/amazons3.php'; OC::$CLASSPATH['OC\Files\Storage\Dropbox'] = 'files_external/lib/dropbox.php'; OC::$CLASSPATH['OC\Files\Storage\SFTP'] = 'files_external/lib/sftp.php'; +OC::$CLASSPATH['OC\Files\Storage\SFTP_Key'] = 'files_external/lib/sftp_key.php'; OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php'; OC::$CLASSPATH['OCA\Files\External\Api'] = 'files_external/lib/api.php'; @@ -26,39 +27,41 @@ if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == ' OCP\App::registerPersonal('files_external', 'personal'); } -\OCA\Files\App::getNavigationManager()->add( - array( - "id" => 'extstoragemounts', - "appname" => 'files_external', - "script" => 'list.php', - "order" => 30, - "name" => $l->t('External storage') - ) -); +\OCA\Files\App::getNavigationManager()->add([ + "id" => 'extstoragemounts', + "appname" => 'files_external', + "script" => 'list.php', + "order" => 30, + "name" => $l->t('External storage') +]); // connecting hooks OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OC_Mount_Config', 'initMountPointsHook'); OCP\Util::connectHook('OC_User', 'post_login', 'OC\Files\Storage\SMB_OC', 'login'); -OC_Mount_Config::registerBackend('\OC\Files\Storage\Local', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\Local', [ 'backend' => (string)$l->t('Local'), 'priority' => 150, - 'configuration' => array( - 'datadir' => (string)$l->t('Location')))); + 'configuration' => [ + 'datadir' => (string)$l->t('Location') + ], +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', [ 'backend' => (string)$l->t('Amazon S3'), 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'key' => (string)$l->t('Key'), 'secret' => '*'.$l->t('Secret'), - 'bucket' => (string)$l->t('Bucket')), - 'has_dependencies' => true)); + 'bucket' => (string)$l->t('Bucket'), + ], + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', [ 'backend' => (string)$l->t('Amazon S3 and compliant'), 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'key' => (string)$l->t('Access Key'), 'secret' => '*'.$l->t('Secret Key'), 'bucket' => (string)$l->t('Bucket'), @@ -66,48 +69,56 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\AmazonS3', array( 'port' => '&'.$l->t('Port'), 'region' => '&'.$l->t('Region'), 'use_ssl' => '!'.$l->t('Enable SSL'), - 'use_path_style' => '!'.$l->t('Enable Path Style')), - 'has_dependencies' => true)); + 'use_path_style' => '!'.$l->t('Enable Path Style') + ], + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\Dropbox', [ 'backend' => 'Dropbox', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'configured' => '#configured', 'app_key' => (string)$l->t('App key'), 'app_secret' => '*'.$l->t('App secret'), 'token' => '#token', - 'token_secret' => '#token_secret'), + 'token_secret' => '#token_secret' + ], 'custom' => 'dropbox', - 'has_dependencies' => true)); + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\FTP', [ 'backend' => 'FTP', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('Host'), 'user' => (string)$l->t('Username'), 'password' => '*'.$l->t('Password'), 'root' => '&'.$l->t('Remote subfolder'), - 'secure' => '!'.$l->t('Secure ftps://')), - 'has_dependencies' => true)); + 'secure' => '!'.$l->t('Secure ftps://') + ], + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\Google', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\Google', [ 'backend' => 'Google Drive', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'configured' => '#configured', 'client_id' => (string)$l->t('Client ID'), 'client_secret' => '*'.$l->t('Client secret'), - 'token' => '#token'), + 'token' => '#token', + ], 'custom' => 'google', - 'has_dependencies' => true)); + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\Swift', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\Swift', [ 'backend' => (string)$l->t('OpenStack Object Storage'), 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'user' => (string)$l->t('Username'), 'bucket' => (string)$l->t('Bucket'), 'region' => '&'.$l->t('Region (optional for OpenStack Object Storage)'), @@ -117,63 +128,86 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\Swift', array( 'service_name' => '&'.$l->t('Service Name (required for OpenStack Object Storage)'), 'url' => '&'.$l->t('URL of identity endpoint (required for OpenStack Object Storage)'), 'timeout' => '&'.$l->t('Timeout of HTTP requests in seconds'), - ), - 'has_dependencies' => true)); + ], + 'has_dependencies' => true, +]); if (!OC_Util::runningOnWindows()) { - OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', array( + OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB', [ 'backend' => 'SMB / CIFS', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('Host'), 'user' => (string)$l->t('Username'), 'password' => '*'.$l->t('Password'), 'share' => (string)$l->t('Share'), - 'root' => '&'.$l->t('Remote subfolder')), - 'has_dependencies' => true)); + 'root' => '&'.$l->t('Remote subfolder'), + ], + 'has_dependencies' => true, + ]); - OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB_OC', array( + OC_Mount_Config::registerBackend('\OC\Files\Storage\SMB_OC', [ 'backend' => (string)$l->t('SMB / CIFS using OC login'), 'priority' => 90, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('Host'), 'username_as_share' => '!'.$l->t('Username as share'), 'share' => '&'.$l->t('Share'), - 'root' => '&'.$l->t('Remote subfolder')), - 'has_dependencies' => true)); + 'root' => '&'.$l->t('Remote subfolder'), + ], + 'has_dependencies' => true, + ]); } -OC_Mount_Config::registerBackend('\OC\Files\Storage\DAV', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\DAV', [ 'backend' => 'WebDAV', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('URL'), 'user' => (string)$l->t('Username'), 'password' => '*'.$l->t('Password'), 'root' => '&'.$l->t('Remote subfolder'), - 'secure' => '!'.$l->t('Secure https://')), - 'has_dependencies' => true)); + 'secure' => '!'.$l->t('Secure https://'), + ], + 'has_dependencies' => true, +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\OwnCloud', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\OwnCloud', [ 'backend' => 'ownCloud', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('URL'), 'user' => (string)$l->t('Username'), 'password' => '*'.$l->t('Password'), 'root' => '&'.$l->t('Remote subfolder'), - 'secure' => '!'.$l->t('Secure https://')))); + 'secure' => '!'.$l->t('Secure https://'), + ], +]); -OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP', array( +OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP', [ 'backend' => 'SFTP', 'priority' => 100, - 'configuration' => array( + 'configuration' => [ 'host' => (string)$l->t('Host'), 'user' => (string)$l->t('Username'), 'password' => '*'.$l->t('Password'), - 'root' => '&'.$l->t('Remote subfolder')))); + 'root' => '&'.$l->t('Remote subfolder'), + ], +]); +OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP_Key', [ + 'backend' => 'SFTP with secret key login', + 'priority' => 100, + 'configuration' => array( + 'host' => (string)$l->t('Host'), + 'user' => (string)$l->t('Username'), + 'public_key' => (string)$l->t('Public key'), + 'private_key' => '#private_key', + 'root' => '&'.$l->t('Remote subfolder')), + 'custom' => 'sftp_key', + ] +); $mountProvider = new \OCA\Files_External\Config\ConfigAdapter(); \OC::$server->getMountProviderCollection()->registerProvider($mountProvider); diff --git a/apps/files_external/appinfo/application.php b/apps/files_external/appinfo/application.php new file mode 100644 index 00000000000..b1605bb98a8 --- /dev/null +++ b/apps/files_external/appinfo/application.php @@ -0,0 +1,33 @@ +<?php +/** + * Copyright (c) 2015 University of Edinburgh <Ross.Nicoll@ed.ac.uk> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\Files_External\Appinfo; + +use \OCA\Files_External\Controller\AjaxController; +use \OCP\AppFramework\App; +use \OCP\IContainer; + + /** + * @package OCA\Files_External\Appinfo + */ +class Application extends App { + public function __construct(array $urlParams=array()) { + parent::__construct('files_external', $urlParams); + $container = $this->getContainer(); + + /** + * Controllers + */ + $container->registerService('AjaxController', function (IContainer $c) { + return new AjaxController( + $c->query('AppName'), + $c->query('Request') + ); + }); + } +} diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index b852b34c5d3..5c7c4eca909 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -20,6 +20,23 @@ * */ +namespace OCA\Files_External\Appinfo; + +$application = new Application(); +$application->registerRoutes( + $this, + array( + 'routes' => array( + array( + 'name' => 'Ajax#getSshKeys', + 'url' => '/ajax/sftp_key.php', + 'verb' => 'POST', + 'requirements' => array() + ) + ) + ) +); + /** @var $this OC\Route\Router */ $this->create('files_external_add_mountpoint', 'ajax/addMountPoint.php') @@ -37,10 +54,11 @@ $this->create('files_external_dropbox', 'ajax/dropbox.php') $this->create('files_external_google', 'ajax/google.php') ->actionInclude('files_external/ajax/google.php'); + $this->create('files_external_list_applicable', '/applicable') ->actionInclude('files_external/ajax/applicable.php'); -OC_API::register('get', +\OC_API::register('get', '/apps/files_external/api/v1/mounts', array('\OCA\Files\External\Api', 'getUserMounts'), 'files_external'); diff --git a/apps/files_external/controller/ajaxcontroller.php b/apps/files_external/controller/ajaxcontroller.php new file mode 100644 index 00000000000..141fc7817d2 --- /dev/null +++ b/apps/files_external/controller/ajaxcontroller.php @@ -0,0 +1,48 @@ +<?php +/** + * Copyright (c) 2015 University of Edinburgh <Ross.Nicoll@ed.ac.uk> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\Files_External\Controller; + +use OCP\AppFramework\Controller; +use OCP\IRequest; +use OCP\AppFramework\Http\JSONResponse; + +class AjaxController extends Controller { + public function __construct($appName, IRequest $request) { + parent::__construct($appName, $request); + } + + private function generateSshKeys() { + $rsa = new \Crypt_RSA(); + $rsa->setPublicKeyFormat(CRYPT_RSA_PUBLIC_FORMAT_OPENSSH); + $rsa->setPassword(\OC::$server->getConfig()->getSystemValue('secret', '')); + + $key = $rsa->createKey(); + // Replace the placeholder label with a more meaningful one + $key['publicKey'] = str_replace('phpseclib-generated-key', gethostname(), $key['publickey']); + + return $key; + } + + /** + * Generates an SSH public/private key pair. + * + * @NoAdminRequired + */ + public function getSshKeys() { + $key = $this->generateSshKeys(); + return new JSONResponse( + array('data' => array( + 'private_key' => $key['privatekey'], + 'public_key' => $key['publickey'] + ), + 'status' => 'success' + )); + } + +} diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js index 6baaabe11b6..2880e910f2c 100644 --- a/apps/files_external/js/dropbox.js +++ b/apps/files_external/js/dropbox.js @@ -65,7 +65,10 @@ $(document).ready(function() { || $(tr).find('.chzn-select').val() != null)) { if ($(tr).find('.dropbox').length == 0) { - $(config).append('<a class="button dropbox">'+t('files_external', 'Grant access')+'</a>'); + $(config).append($(document.createElement('input')) + .addClass('button dropbox') + .attr('type', 'button') + .attr('value', t('files_external', 'Grant access'))); } else { $(tr).find('.dropbox').show(); } diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js index 068c2c13c66..b9a5e66b800 100644 --- a/apps/files_external/js/google.js +++ b/apps/files_external/js/google.js @@ -85,8 +85,9 @@ $(document).ready(function() { || $(tr).find('.chzn-select').val() != null)) { if ($(tr).find('.google').length == 0) { - $(config).append($('<a/>').addClass('button google') - .text(t('files_external', 'Grant access'))); + $(config).append($(document.createElement('input')).addClass('button google') + .attr('type', 'button') + .attr('value', t('files_external', 'Grant access'))); } else { $(tr).find('.google').show(); } diff --git a/apps/files_external/js/sftp_key.js b/apps/files_external/js/sftp_key.js new file mode 100644 index 00000000000..2b39628247c --- /dev/null +++ b/apps/files_external/js/sftp_key.js @@ -0,0 +1,53 @@ +$(document).ready(function() { + + $('#externalStorage tbody tr.\\\\OC\\\\Files\\\\Storage\\\\SFTP_Key').each(function() { + var tr = $(this); + var config = $(tr).find('.configuration'); + if ($(config).find('.sftp_key').length === 0) { + setupTableRow(tr, config); + } + }); + + // We can't catch the DOM elements being added, but we can pick up when + // they receive focus + $('#externalStorage').on('focus', 'tbody tr.\\\\OC\\\\Files\\\\Storage\\\\SFTP_Key', function() { + var tr = $(this); + var config = $(tr).find('.configuration'); + + if ($(config).find('.sftp_key').length === 0) { + setupTableRow(tr, config); + } + }); + + $('#externalStorage').on('click', '.sftp_key', function(event) { + event.preventDefault(); + var tr = $(this).parent().parent(); + generateKeys(tr); + }); + + function setupTableRow(tr, config) { + $(config).append($(document.createElement('input')).addClass('button sftp_key') + .attr('type', 'button') + .attr('value', t('files_external', 'Generate keys'))); + // If there's no private key, build one + if (0 === $(config).find('[data-parameter="private_key"]').val().length) { + generateKeys(tr); + } + } + + function generateKeys(tr) { + var config = $(tr).find('.configuration'); + + $.post(OC.filePath('files_external', 'ajax', 'sftp_key.php'), {}, function(result) { + if (result && result.status === 'success') { + $(config).find('[data-parameter="public_key"]').val(result.data.public_key); + $(config).find('[data-parameter="private_key"]').val(result.data.private_key); + OC.MountConfig.saveStorage(tr, function() { + // Nothing to do + }); + } else { + OC.dialogs.alert(result.data.message, t('files_external', 'Error generating key pair') ); + } + }); + } +}); diff --git a/apps/files_external/l10n/bg_BG.js b/apps/files_external/l10n/bg_BG.js index dabf8715e82..f1a773b21f9 100644 --- a/apps/files_external/l10n/bg_BG.js +++ b/apps/files_external/l10n/bg_BG.js @@ -56,6 +56,8 @@ OC.L10N.register( "<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>Note:</b> PHP подръжката на cURL не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<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>Note:</b> PHP подръжката на FTP не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" не е инсталиран. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", + "No external storage configured" : "Няма настроено външно дисково пространство", + "You can configure external storages in the personal settings" : "Можеш да промениш виншните дискови пространства в личните си настройки", "Name" : "Име", "Storage type" : "Тип дисково пространство", "Scope" : "Обхват", diff --git a/apps/files_external/l10n/bg_BG.json b/apps/files_external/l10n/bg_BG.json index 5dc9e8d60a2..b404afdae5e 100644 --- a/apps/files_external/l10n/bg_BG.json +++ b/apps/files_external/l10n/bg_BG.json @@ -54,6 +54,8 @@ "<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>Note:</b> PHP подръжката на cURL не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<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>Note:</b> PHP подръжката на FTP не е включена или инсталирана. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Note:</b> \"%s\" не е инсталиран. Прикачването на %s не е възможно. Моля, поискай системния администратор да я инсталира.", + "No external storage configured" : "Няма настроено външно дисково пространство", + "You can configure external storages in the personal settings" : "Можеш да промениш виншните дискови пространства в личните си настройки", "Name" : "Име", "Storage type" : "Тип дисково пространство", "Scope" : "Обхват", diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 561dbc3d29e..52e9217a601 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Uživatelské jméno jako sdílený adresář", "URL" : "URL", "Secure https://" : "Zabezpečené https://", + "Public key" : "Veřejný klíč", "Access granted" : "Přístup povolen", "Error configuring Dropbox storage" : "Chyba při nastavení úložiště Dropbox", "Grant access" : "Povolit přístup", diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index 1af24e3c410..6b7ea9460a7 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -41,6 +41,7 @@ "Username as share" : "Uživatelské jméno jako sdílený adresář", "URL" : "URL", "Secure https://" : "Zabezpečené https://", + "Public key" : "Veřejný klíč", "Access granted" : "Přístup povolen", "Error configuring Dropbox storage" : "Chyba při nastavení úložiště Dropbox", "Grant access" : "Povolit přístup", diff --git a/apps/files_external/l10n/da.js b/apps/files_external/l10n/da.js index 00ccc703ffc..964fd4333c5 100644 --- a/apps/files_external/l10n/da.js +++ b/apps/files_external/l10n/da.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Brugernavn som deling", "URL" : "URL", "Secure https://" : "Sikker https://", + "Public key" : "Offentlig nøgle", "Access granted" : "Adgang godkendt", "Error configuring Dropbox storage" : "Fejl ved konfiguration af Dropbox plads", "Grant access" : "Godkend adgang", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Alle brugere. Indtast for at vælge bruger eller gruppe.", "(group)" : "(gruppe)", "Saved" : "Gemt", + "Generate keys" : "Opret nøgler.", + "Error generating key pair" : "Fejl under oprettelse af nøglepar", "<b>Note:</b> " : "<b>Note:</b> ", "and" : "og", "<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>Bemærk:</b> cURL-understøttelsen i PHP er enten ikke aktiveret eller installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", diff --git a/apps/files_external/l10n/da.json b/apps/files_external/l10n/da.json index 60ca2a33c97..33c487caa3e 100644 --- a/apps/files_external/l10n/da.json +++ b/apps/files_external/l10n/da.json @@ -41,6 +41,7 @@ "Username as share" : "Brugernavn som deling", "URL" : "URL", "Secure https://" : "Sikker https://", + "Public key" : "Offentlig nøgle", "Access granted" : "Adgang godkendt", "Error configuring Dropbox storage" : "Fejl ved konfiguration af Dropbox plads", "Grant access" : "Godkend adgang", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "Alle brugere. Indtast for at vælge bruger eller gruppe.", "(group)" : "(gruppe)", "Saved" : "Gemt", + "Generate keys" : "Opret nøgler.", + "Error generating key pair" : "Fejl under oprettelse af nøglepar", "<b>Note:</b> " : "<b>Note:</b> ", "and" : "og", "<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>Bemærk:</b> cURL-understøttelsen i PHP er enten ikke aktiveret eller installeret. Monteringen af %s er ikke mulig. Anmod din systemadministrator om at installere det.", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index f188e8dc9fe..f840bbbd0b5 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -27,7 +27,7 @@ OC.L10N.register( "Username" : "Benutzername", "Password" : "Passwort", "Remote subfolder" : "Remote subfolder", - "Secure ftps://" : "Sicherer FTPS://", + "Secure ftps://" : "Sicherer ftps://", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack Object Storage" : "Openstack-Objektspeicher", @@ -43,15 +43,18 @@ OC.L10N.register( "Username as share" : "Benutzername als Freigabe", "URL" : "URL", "Secure https://" : "Sicherer HTTPS://", + "Public key" : "Öffentlicher Schlüssel", "Access granted" : "Zugriff gestattet", "Error configuring Dropbox storage" : "Fehler beim Einrichten von Dropbox", "Grant access" : "Zugriff gestatten", "Error configuring Google Drive storage" : "Fehler beim Einrichten von Google Drive", "Personal" : "Persönlich", "System" : "System", - "All users. Type to select user or group." : "Alle Nutzer. Nutzer oder Gruppe zur Auswahl eingeben.", + "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", "Saved" : "Gespeichert", + "Generate keys" : "Schlüssel erzeugen", + "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "<b>Note:</b> " : "<b>Hinweis:</b> ", "and" : "und", "<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.", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index d9d8bd70c77..7382a19fe1e 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -25,7 +25,7 @@ "Username" : "Benutzername", "Password" : "Passwort", "Remote subfolder" : "Remote subfolder", - "Secure ftps://" : "Sicherer FTPS://", + "Secure ftps://" : "Sicherer ftps://", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack Object Storage" : "Openstack-Objektspeicher", @@ -41,15 +41,18 @@ "Username as share" : "Benutzername als Freigabe", "URL" : "URL", "Secure https://" : "Sicherer HTTPS://", + "Public key" : "Öffentlicher Schlüssel", "Access granted" : "Zugriff gestattet", "Error configuring Dropbox storage" : "Fehler beim Einrichten von Dropbox", "Grant access" : "Zugriff gestatten", "Error configuring Google Drive storage" : "Fehler beim Einrichten von Google Drive", "Personal" : "Persönlich", "System" : "System", - "All users. Type to select user or group." : "Alle Nutzer. Nutzer oder Gruppe zur Auswahl eingeben.", + "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", "Saved" : "Gespeichert", + "Generate keys" : "Schlüssel erzeugen", + "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "<b>Note:</b> " : "<b>Hinweis:</b> ", "and" : "und", "<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.", diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js index 17061d5bdbd..422ce3df5d2 100644 --- a/apps/files_external/l10n/de_DE.js +++ b/apps/files_external/l10n/de_DE.js @@ -27,7 +27,7 @@ OC.L10N.register( "Username" : "Benutzername", "Password" : "Passwort", "Remote subfolder" : "Entfernter Unterordner:", - "Secure ftps://" : "Sicherer FTPS://", + "Secure ftps://" : "Sicheres ftps://", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack Object Storage" : "Openstack-Objektspeicher", @@ -42,16 +42,19 @@ OC.L10N.register( "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "URL" : "Adresse", - "Secure https://" : "Sicherer HTTPS://", + "Secure https://" : "Sicheres https://", + "Public key" : "Öffentlicher Schlüssel", "Access granted" : "Zugriff gestattet", "Error configuring Dropbox storage" : "Fehler beim Einrichten von Dropbox", "Grant access" : "Zugriff gestatten", "Error configuring Google Drive storage" : "Fehler beim Einrichten von Google Drive", "Personal" : "Persönlich", "System" : "System", - "All users. Type to select user or group." : "Alle Nutzer. Nutzer oder Gruppe zur Auswahl eingeben.", + "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", "Saved" : "Gespeichert", + "Generate keys" : "Schlüssel erzeugen", + "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "<b>Note:</b> " : "<b>Hinweis:</b> ", "and" : "und", "<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.", diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json index 77bb3b19c49..c783b0ab78f 100644 --- a/apps/files_external/l10n/de_DE.json +++ b/apps/files_external/l10n/de_DE.json @@ -25,7 +25,7 @@ "Username" : "Benutzername", "Password" : "Passwort", "Remote subfolder" : "Entfernter Unterordner:", - "Secure ftps://" : "Sicherer FTPS://", + "Secure ftps://" : "Sicheres ftps://", "Client ID" : "Client-ID", "Client secret" : "Geheime Zeichenkette des Client", "OpenStack Object Storage" : "Openstack-Objektspeicher", @@ -40,16 +40,19 @@ "SMB / CIFS using OC login" : "SMB / CIFS mit OC-Login", "Username as share" : "Benutzername als Freigabe", "URL" : "Adresse", - "Secure https://" : "Sicherer HTTPS://", + "Secure https://" : "Sicheres https://", + "Public key" : "Öffentlicher Schlüssel", "Access granted" : "Zugriff gestattet", "Error configuring Dropbox storage" : "Fehler beim Einrichten von Dropbox", "Grant access" : "Zugriff gestatten", "Error configuring Google Drive storage" : "Fehler beim Einrichten von Google Drive", "Personal" : "Persönlich", "System" : "System", - "All users. Type to select user or group." : "Alle Nutzer. Nutzer oder Gruppe zur Auswahl eingeben.", + "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", "Saved" : "Gespeichert", + "Generate keys" : "Schlüssel erzeugen", + "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", "<b>Note:</b> " : "<b>Hinweis:</b> ", "and" : "und", "<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.", diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index 1000a6d9303..c48830d9bc6 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Όνομα χρήστη ως διαμοιραζόμενος φάκελος", "URL" : "URL", "Secure https://" : "Ασφαλής σύνδεση https://", + "Public key" : "Δημόσιο κλειδί", "Access granted" : "Πρόσβαση παρασχέθηκε", "Error configuring Dropbox storage" : "Σφάλμα ρυθμίζωντας αποθήκευση Dropbox ", "Grant access" : "Παροχή πρόσβασης", diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index b38b81c86d2..89019fca587 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -41,6 +41,7 @@ "Username as share" : "Όνομα χρήστη ως διαμοιραζόμενος φάκελος", "URL" : "URL", "Secure https://" : "Ασφαλής σύνδεση https://", + "Public key" : "Δημόσιο κλειδί", "Access granted" : "Πρόσβαση παρασχέθηκε", "Error configuring Dropbox storage" : "Σφάλμα ρυθμίζωντας αποθήκευση Dropbox ", "Grant access" : "Παροχή πρόσβασης", diff --git a/apps/files_external/l10n/en_GB.js b/apps/files_external/l10n/en_GB.js index a3772abdfd5..2ccf775f0be 100644 --- a/apps/files_external/l10n/en_GB.js +++ b/apps/files_external/l10n/en_GB.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Username as share", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Public key", "Access granted" : "Access granted", "Error configuring Dropbox storage" : "Error configuring Dropbox storage", "Grant access" : "Grant access", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "All users. Type to select user or group.", "(group)" : "(group)", "Saved" : "Saved", + "Generate keys" : "Generate keys", + "Error generating key pair" : "Error generating key pair", "<b>Note:</b> " : "<b>Note:</b> ", "and" : "and", "<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>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.", diff --git a/apps/files_external/l10n/en_GB.json b/apps/files_external/l10n/en_GB.json index 21a5881c94e..7e4415dbf7f 100644 --- a/apps/files_external/l10n/en_GB.json +++ b/apps/files_external/l10n/en_GB.json @@ -41,6 +41,7 @@ "Username as share" : "Username as share", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Public key", "Access granted" : "Access granted", "Error configuring Dropbox storage" : "Error configuring Dropbox storage", "Grant access" : "Grant access", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "All users. Type to select user or group.", "(group)" : "(group)", "Saved" : "Saved", + "Generate keys" : "Generate keys", + "Error generating key pair" : "Error generating key pair", "<b>Note:</b> " : "<b>Note:</b> ", "and" : "and", "<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>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.", diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index bb1631d7ead..6c5a8f90217 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -43,15 +43,18 @@ OC.L10N.register( "Username as share" : "Nombre de usuario como compartir", "URL" : "URL", "Secure https://" : "—Seguro— https://", + "Public key" : "Clave pública", "Access granted" : "Acceso concedido", - "Error configuring Dropbox storage" : "Error configurando el almacenamiento de Dropbox", + "Error configuring Dropbox storage" : "Error al configurar el almacenamiento de Dropbox", "Grant access" : "Conceder acceso", - "Error configuring Google Drive storage" : "Error configurando el almacenamiento de Google Drive", + "Error configuring Google Drive storage" : "Error al configurar el almacenamiento de Google Drive", "Personal" : "Personal", "System" : "Sistema", "All users. Type to select user or group." : "Todos los usuarios. Teclee para seleccionar un usuario o grupo.", "(group)" : "(grupo)", "Saved" : "Guardado", + "Generate keys" : "Generar claves", + "Error generating key pair" : "Error al generar el par de claves", "<b>Note:</b> " : "<b>Nota:</b> ", "and" : "y", "<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>Nota:</b> El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador del sistema que lo instale.", diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index 7c86b244c32..dadfd7b983c 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -41,15 +41,18 @@ "Username as share" : "Nombre de usuario como compartir", "URL" : "URL", "Secure https://" : "—Seguro— https://", + "Public key" : "Clave pública", "Access granted" : "Acceso concedido", - "Error configuring Dropbox storage" : "Error configurando el almacenamiento de Dropbox", + "Error configuring Dropbox storage" : "Error al configurar el almacenamiento de Dropbox", "Grant access" : "Conceder acceso", - "Error configuring Google Drive storage" : "Error configurando el almacenamiento de Google Drive", + "Error configuring Google Drive storage" : "Error al configurar el almacenamiento de Google Drive", "Personal" : "Personal", "System" : "Sistema", "All users. Type to select user or group." : "Todos los usuarios. Teclee para seleccionar un usuario o grupo.", "(group)" : "(grupo)", "Saved" : "Guardado", + "Generate keys" : "Generar claves", + "Error generating key pair" : "Error al generar el par de claves", "<b>Note:</b> " : "<b>Nota:</b> ", "and" : "y", "<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>Nota:</b> El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador del sistema que lo instale.", diff --git a/apps/files_external/l10n/eu.js b/apps/files_external/l10n/eu.js index 8da8ca68263..d3e664e7b82 100644 --- a/apps/files_external/l10n/eu.js +++ b/apps/files_external/l10n/eu.js @@ -42,6 +42,7 @@ OC.L10N.register( "Username as share" : "Erabiltzaile izena elkarbanaketa bezala", "URL" : "URL", "Secure https://" : "https:// segurua", + "Public key" : "Gako publikoa", "Access granted" : "Sarrera baimendua", "Error configuring Dropbox storage" : "Errore bat egon da Dropbox biltegiratzea konfiguratzean", "Grant access" : "Baimendu sarrera", @@ -52,9 +53,12 @@ OC.L10N.register( "(group)" : "(taldea)", "Saved" : "Gordeta", "<b>Note:</b> " : "<b>Oharra:</b>", + "and" : "eta", "<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>Oharra:</b> :PHPko cURL euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<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>Oharra:</b> :PHPko FTP euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b>\"%s\" euskarria ez dago instalatuta Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", + "No external storage configured" : "Ez da kanpo biltegiratzerik konfiguratu", + "You can configure external storages in the personal settings" : "Ezarpen pertsonaletan kanpo biltegiratzeak konfigura ditzazkezu", "Name" : "Izena", "Storage type" : "Biltegiratze mota", "External Storage" : "Kanpoko biltegiratzea", diff --git a/apps/files_external/l10n/eu.json b/apps/files_external/l10n/eu.json index 7ae84c8dbd3..3b817cebd97 100644 --- a/apps/files_external/l10n/eu.json +++ b/apps/files_external/l10n/eu.json @@ -40,6 +40,7 @@ "Username as share" : "Erabiltzaile izena elkarbanaketa bezala", "URL" : "URL", "Secure https://" : "https:// segurua", + "Public key" : "Gako publikoa", "Access granted" : "Sarrera baimendua", "Error configuring Dropbox storage" : "Errore bat egon da Dropbox biltegiratzea konfiguratzean", "Grant access" : "Baimendu sarrera", @@ -50,9 +51,12 @@ "(group)" : "(taldea)", "Saved" : "Gordeta", "<b>Note:</b> " : "<b>Oharra:</b>", + "and" : "eta", "<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>Oharra:</b> :PHPko cURL euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<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>Oharra:</b> :PHPko FTP euskarria ez dago instalatuta edo gaitua. Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Oharra:</b>\"%s\" euskarria ez dago instalatuta Ezinezko da %s muntatzea. Mesedez eskatu sistema administratzaleari instala dezan. ", + "No external storage configured" : "Ez da kanpo biltegiratzerik konfiguratu", + "You can configure external storages in the personal settings" : "Ezarpen pertsonaletan kanpo biltegiratzeak konfigura ditzazkezu", "Name" : "Izena", "Storage type" : "Biltegiratze mota", "External Storage" : "Kanpoko biltegiratzea", diff --git a/apps/files_external/l10n/fi_FI.js b/apps/files_external/l10n/fi_FI.js index c446c50b41c..291077b3533 100644 --- a/apps/files_external/l10n/fi_FI.js +++ b/apps/files_external/l10n/fi_FI.js @@ -37,6 +37,7 @@ OC.L10N.register( "Username as share" : "Käyttäjänimi jakona", "URL" : "Verkko-osoite", "Secure https://" : "Salattu https://", + "Public key" : "Julkinen avain", "Access granted" : "Pääsy sallittu", "Error configuring Dropbox storage" : "Virhe Dropbox levyn asetuksia tehtäessä", "Grant access" : "Salli pääsy", @@ -46,6 +47,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Kaikki käyttäjät. Kirjoita valitaksesi käyttäjän tai ryhmän.", "(group)" : "(ryhmä)", "Saved" : "Tallennettu", + "Generate keys" : "Luo avaimet", + "Error generating key pair" : "Virhe luotaessa avainparia", "<b>Note:</b> " : "<b>Huomio:</b> ", "and" : "ja", "<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>Huomio:</b> PHP:n cURL-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan cURL-tuki käyttöön.", diff --git a/apps/files_external/l10n/fi_FI.json b/apps/files_external/l10n/fi_FI.json index c09b8bda1ba..2b8ba851f37 100644 --- a/apps/files_external/l10n/fi_FI.json +++ b/apps/files_external/l10n/fi_FI.json @@ -35,6 +35,7 @@ "Username as share" : "Käyttäjänimi jakona", "URL" : "Verkko-osoite", "Secure https://" : "Salattu https://", + "Public key" : "Julkinen avain", "Access granted" : "Pääsy sallittu", "Error configuring Dropbox storage" : "Virhe Dropbox levyn asetuksia tehtäessä", "Grant access" : "Salli pääsy", @@ -44,6 +45,8 @@ "All users. Type to select user or group." : "Kaikki käyttäjät. Kirjoita valitaksesi käyttäjän tai ryhmän.", "(group)" : "(ryhmä)", "Saved" : "Tallennettu", + "Generate keys" : "Luo avaimet", + "Error generating key pair" : "Virhe luotaessa avainparia", "<b>Note:</b> " : "<b>Huomio:</b> ", "and" : "ja", "<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>Huomio:</b> PHP:n cURL-tuki ei ole käytössä tai sitä ei ole asennettu. Kohteen %s liittäminen ei ole mahdollista. Pyydä järjestelmän ylläpitäjää ottamaan cURL-tuki käyttöön.", diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index 23c31636fce..09231d6aebc 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Nom d'utilisateur comme nom de partage", "URL" : "URL", "Secure https://" : "Sécurisation https://", + "Public key" : "Clef publique", "Access granted" : "Accès autorisé", "Error configuring Dropbox storage" : "Erreur lors de la configuration du support de stockage Dropbox", "Grant access" : "Autoriser l'accès", @@ -52,13 +53,15 @@ OC.L10N.register( "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", "Saved" : "Sauvegarder", + "Generate keys" : "Génération des clés", + "Error generating key pair" : "Erreur lors de la génération des clés", "<b>Note:</b> " : "<b>Attention :</b>", "and" : " et ", "<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>Attention :</b> La prise en charge de cURL par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<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>Attention : </b> La prise en charge du FTP par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> \"%s\" n'est pas installé. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "No external storage configured" : "Aucun stockage externe configuré", - "You can configure external storages in the personal settings" : "Vous pouvez configurer vos stockages externes dans les paramètres personnels.", + "You can configure external storages in the personal settings" : "Vous pouvez configurer des stockages externes dans vos paramètres personnels", "Name" : "Nom", "Storage type" : "Type de support de stockage", "Scope" : "Portée", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index e29f032fc4e..01a68810e03 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -41,6 +41,7 @@ "Username as share" : "Nom d'utilisateur comme nom de partage", "URL" : "URL", "Secure https://" : "Sécurisation https://", + "Public key" : "Clef publique", "Access granted" : "Accès autorisé", "Error configuring Dropbox storage" : "Erreur lors de la configuration du support de stockage Dropbox", "Grant access" : "Autoriser l'accès", @@ -50,13 +51,15 @@ "All users. Type to select user or group." : "Tous les utilisateurs. Cliquez ici pour restreindre.", "(group)" : "(groupe)", "Saved" : "Sauvegarder", + "Generate keys" : "Génération des clés", + "Error generating key pair" : "Erreur lors de la génération des clés", "<b>Note:</b> " : "<b>Attention :</b>", "and" : " et ", "<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>Attention :</b> La prise en charge de cURL par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<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>Attention : </b> La prise en charge du FTP par PHP n'est pas activée ou installée. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Attention : </b> \"%s\" n'est pas installé. Le montage de %s n'est pas possible. Contactez votre administrateur système pour l'installer.", "No external storage configured" : "Aucun stockage externe configuré", - "You can configure external storages in the personal settings" : "Vous pouvez configurer vos stockages externes dans les paramètres personnels.", + "You can configure external storages in the personal settings" : "Vous pouvez configurer des stockages externes dans vos paramètres personnels", "Name" : "Nom", "Storage type" : "Type de support de stockage", "Scope" : "Portée", diff --git a/apps/files_external/l10n/gl.js b/apps/files_external/l10n/gl.js index 8cfb4c39da3..5b9d8f4b29b 100644 --- a/apps/files_external/l10n/gl.js +++ b/apps/files_external/l10n/gl.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Nome de usuario como compartición", "URL" : "URL", "Secure https://" : "https:// seguro", + "Public key" : "Chave pública", "Access granted" : "Concedeuse acceso", "Error configuring Dropbox storage" : "Produciuse un erro ao configurar o almacenamento en Dropbox", "Grant access" : "Permitir o acceso", diff --git a/apps/files_external/l10n/gl.json b/apps/files_external/l10n/gl.json index b58107282f9..1aa49ee2b6b 100644 --- a/apps/files_external/l10n/gl.json +++ b/apps/files_external/l10n/gl.json @@ -41,6 +41,7 @@ "Username as share" : "Nome de usuario como compartición", "URL" : "URL", "Secure https://" : "https:// seguro", + "Public key" : "Chave pública", "Access granted" : "Concedeuse acceso", "Error configuring Dropbox storage" : "Produciuse un erro ao configurar o almacenamento en Dropbox", "Grant access" : "Permitir o acceso", diff --git a/apps/files_external/l10n/id.js b/apps/files_external/l10n/id.js index 590bc3b34d5..c4b262945ea 100644 --- a/apps/files_external/l10n/id.js +++ b/apps/files_external/l10n/id.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Nama pengguna berbagi", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Kunci Public", "Access granted" : "Akses diberikan", "Error configuring Dropbox storage" : "Kesalahan dalam mengonfigurasi penyimpanan Dropbox", "Grant access" : "Berikan hak akses", diff --git a/apps/files_external/l10n/id.json b/apps/files_external/l10n/id.json index f77d87cacb2..da9f676d772 100644 --- a/apps/files_external/l10n/id.json +++ b/apps/files_external/l10n/id.json @@ -41,6 +41,7 @@ "Username as share" : "Nama pengguna berbagi", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Kunci Public", "Access granted" : "Akses diberikan", "Error configuring Dropbox storage" : "Kesalahan dalam mengonfigurasi penyimpanan Dropbox", "Grant access" : "Berikan hak akses", diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index af26cabed76..b80378b31ea 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Nome utente come condivisione", "URL" : "URL", "Secure https://" : "Sicuro https://", + "Public key" : "Chiave pubblica", "Access granted" : "Accesso consentito", "Error configuring Dropbox storage" : "Errore durante la configurazione dell'archivio Dropbox", "Grant access" : "Concedi l'accesso", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Tutti gli utenti. Digita per selezionare utente o gruppo.", "(group)" : "(gruppo)", "Saved" : "Salvato", + "Generate keys" : "Genera la chiavi", + "Error generating key pair" : "Errore durante la generazione della coppia di chiavi", "<b>Note:</b> " : "<b>Nota:</b>", "and" : "e", "<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>Nota:</b> il supporto a cURL di PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index 678eb4c4b10..721a2a31d72 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -41,6 +41,7 @@ "Username as share" : "Nome utente come condivisione", "URL" : "URL", "Secure https://" : "Sicuro https://", + "Public key" : "Chiave pubblica", "Access granted" : "Accesso consentito", "Error configuring Dropbox storage" : "Errore durante la configurazione dell'archivio Dropbox", "Grant access" : "Concedi l'accesso", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "Tutti gli utenti. Digita per selezionare utente o gruppo.", "(group)" : "(gruppo)", "Saved" : "Salvato", + "Generate keys" : "Genera la chiavi", + "Error generating key pair" : "Errore durante la generazione della coppia di chiavi", "<b>Note:</b> " : "<b>Nota:</b>", "and" : "e", "<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>Nota:</b> il supporto a cURL di PHP non è abilitato o installato. Impossibile montare %s. Chiedi al tuo amministratore di sistema di installarlo.", diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index 17d9b9b56a7..492b0fb7336 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -13,7 +13,7 @@ OC.L10N.register( "Key" : "キー", "Secret" : "シークレットキー", "Bucket" : "バケット名", - "Amazon S3 and compliant" : "Amazon S3 と互換ストレージ", + "Amazon S3 and compliant" : "Amazon S3や互換ストレージ", "Access Key" : "アクセスキー", "Secret Key" : "シークレットキー", "Hostname" : "ホスト名", @@ -39,10 +39,11 @@ OC.L10N.register( "URL of identity endpoint (required for OpenStack Object Storage)" : "識別用エンドポイントURL (OpenStack ObjectStorage)", "Timeout of HTTP requests in seconds" : "HTTP接続タイムアウト秒数", "Share" : "共有", - "SMB / CIFS using OC login" : "ownCloudログインで SMB/CIFSを使用", + "SMB / CIFS using OC login" : "ownCloudログインを利用したSMB / CIFS", "Username as share" : "共有名", "URL" : "URL", "Secure https://" : "セキュア https://", + "Public key" : "公開鍵", "Access granted" : "アクセスは許可されました", "Error configuring Dropbox storage" : "Dropboxストレージの設定エラー", "Grant access" : "アクセスを許可", @@ -65,7 +66,7 @@ OC.L10N.register( "External Storage" : "外部ストレージ", "Folder name" : "フォルダー名", "Configuration" : "設定", - "Available for" : "以下が利用可能", + "Available for" : "利用可能", "Add storage" : "ストレージを追加", "Delete" : "削除", "Enable User External Storage" : "ユーザーの外部ストレージを有効にする", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index 34d44504c0e..5ef73a75c77 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -11,7 +11,7 @@ "Key" : "キー", "Secret" : "シークレットキー", "Bucket" : "バケット名", - "Amazon S3 and compliant" : "Amazon S3 と互換ストレージ", + "Amazon S3 and compliant" : "Amazon S3や互換ストレージ", "Access Key" : "アクセスキー", "Secret Key" : "シークレットキー", "Hostname" : "ホスト名", @@ -37,10 +37,11 @@ "URL of identity endpoint (required for OpenStack Object Storage)" : "識別用エンドポイントURL (OpenStack ObjectStorage)", "Timeout of HTTP requests in seconds" : "HTTP接続タイムアウト秒数", "Share" : "共有", - "SMB / CIFS using OC login" : "ownCloudログインで SMB/CIFSを使用", + "SMB / CIFS using OC login" : "ownCloudログインを利用したSMB / CIFS", "Username as share" : "共有名", "URL" : "URL", "Secure https://" : "セキュア https://", + "Public key" : "公開鍵", "Access granted" : "アクセスは許可されました", "Error configuring Dropbox storage" : "Dropboxストレージの設定エラー", "Grant access" : "アクセスを許可", @@ -63,7 +64,7 @@ "External Storage" : "外部ストレージ", "Folder name" : "フォルダー名", "Configuration" : "設定", - "Available for" : "以下が利用可能", + "Available for" : "利用可能", "Add storage" : "ストレージを追加", "Delete" : "削除", "Enable User External Storage" : "ユーザーの外部ストレージを有効にする", diff --git a/apps/files_external/l10n/ko.js b/apps/files_external/l10n/ko.js index f51456a099c..52c6eae4d66 100644 --- a/apps/files_external/l10n/ko.js +++ b/apps/files_external/l10n/ko.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "사용자 이름으로 공유", "URL" : "URL", "Secure https://" : "보안 https://", + "Public key" : "공개 키", "Access granted" : "접근 허가됨", "Error configuring Dropbox storage" : "Dropbox 저장소 설정 오류", "Grant access" : "접근 권한 부여", diff --git a/apps/files_external/l10n/ko.json b/apps/files_external/l10n/ko.json index 7e1797cffc3..56192997590 100644 --- a/apps/files_external/l10n/ko.json +++ b/apps/files_external/l10n/ko.json @@ -41,6 +41,7 @@ "Username as share" : "사용자 이름으로 공유", "URL" : "URL", "Secure https://" : "보안 https://", + "Public key" : "공개 키", "Access granted" : "접근 허가됨", "Error configuring Dropbox storage" : "Dropbox 저장소 설정 오류", "Grant access" : "접근 권한 부여", diff --git a/apps/files_external/l10n/nb_NO.js b/apps/files_external/l10n/nb_NO.js index 19e0051e1e3..a54327c8bfd 100644 --- a/apps/files_external/l10n/nb_NO.js +++ b/apps/files_external/l10n/nb_NO.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Brukernavn som share", "URL" : "URL", "Secure https://" : "Sikker https://", + "Public key" : "Offentlig nøkkel", "Access granted" : "Tilgang innvilget", "Error configuring Dropbox storage" : "Feil ved konfigurering av Dropbox-lagring", "Grant access" : "Gi tilgang", @@ -57,6 +58,7 @@ OC.L10N.register( "<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>Merk:</b> Støtte for cURL i PHP er ikke aktivert eller installert. Oppkobling av %s er ikke mulig. Be systemadministratoren om å installere det.", "<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>Merk:</b> FTP-støtte i PHP er ikke slått på eller installert. Kan ikke koble opp %s. Ta kontakt med systemadministratoren for å installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> \"%s\" er ikke installert. Oppkobling av %s er ikke mulig. Spør systemadministratoren om å installere det.", + "No external storage configured" : "Eksternt lager er ikke konfigurert", "You can configure external storages in the personal settings" : "Du kan konfigurerer eksterne lagre i personlige innstillinger", "Name" : "Navn", "Storage type" : "Lagringstype", diff --git a/apps/files_external/l10n/nb_NO.json b/apps/files_external/l10n/nb_NO.json index 0b707decbea..3af5e7a6320 100644 --- a/apps/files_external/l10n/nb_NO.json +++ b/apps/files_external/l10n/nb_NO.json @@ -41,6 +41,7 @@ "Username as share" : "Brukernavn som share", "URL" : "URL", "Secure https://" : "Sikker https://", + "Public key" : "Offentlig nøkkel", "Access granted" : "Tilgang innvilget", "Error configuring Dropbox storage" : "Feil ved konfigurering av Dropbox-lagring", "Grant access" : "Gi tilgang", @@ -55,6 +56,7 @@ "<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>Merk:</b> Støtte for cURL i PHP er ikke aktivert eller installert. Oppkobling av %s er ikke mulig. Be systemadministratoren om å installere det.", "<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>Merk:</b> FTP-støtte i PHP er ikke slått på eller installert. Kan ikke koble opp %s. Ta kontakt med systemadministratoren for å installere det.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Merk:</b> \"%s\" er ikke installert. Oppkobling av %s er ikke mulig. Spør systemadministratoren om å installere det.", + "No external storage configured" : "Eksternt lager er ikke konfigurert", "You can configure external storages in the personal settings" : "Du kan konfigurerer eksterne lagre i personlige innstillinger", "Name" : "Navn", "Storage type" : "Lagringstype", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index e50b5eb5a39..fc155288f1e 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Gebruikersnaam als share", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Publieke sleutel", "Access granted" : "Toegang toegestaan", "Error configuring Dropbox storage" : "Fout tijdens het configureren van Dropbox opslag", "Grant access" : "Sta toegang toe", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Alle gebruikers. Tikken om een gebruiker of groep te selecteren.", "(group)" : "(groep)", "Saved" : "Bewaard", + "Generate keys" : "Genereer sleutels", + "Error generating key pair" : "Fout bij genereren sleutelpaar", "<b>Note:</b> " : "<b>Let op:</b> ", "and" : "en", "<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>Let op:</b> Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw systeembeheerder dit te installeren.", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index d6851215c59..ece7db68987 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -41,6 +41,7 @@ "Username as share" : "Gebruikersnaam als share", "URL" : "URL", "Secure https://" : "Secure https://", + "Public key" : "Publieke sleutel", "Access granted" : "Toegang toegestaan", "Error configuring Dropbox storage" : "Fout tijdens het configureren van Dropbox opslag", "Grant access" : "Sta toegang toe", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "Alle gebruikers. Tikken om een gebruiker of groep te selecteren.", "(group)" : "(groep)", "Saved" : "Bewaard", + "Generate keys" : "Genereer sleutels", + "Error generating key pair" : "Fout bij genereren sleutelpaar", "<b>Note:</b> " : "<b>Let op:</b> ", "and" : "en", "<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>Let op:</b> Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw systeembeheerder dit te installeren.", diff --git a/apps/files_external/l10n/pl.js b/apps/files_external/l10n/pl.js index d1e330912cc..6aa5491fd8f 100644 --- a/apps/files_external/l10n/pl.js +++ b/apps/files_external/l10n/pl.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Użytkownik jako zasób", "URL" : "URL", "Secure https://" : "Bezpieczny https://", + "Public key" : "Klucz publiczny", "Access granted" : "Dostęp do", "Error configuring Dropbox storage" : "Wystąpił błąd podczas konfigurowania zasobu Dropbox", "Grant access" : "Udziel dostępu", @@ -52,11 +53,14 @@ OC.L10N.register( "All users. Type to select user or group." : "Wszyscy użytkownicy. Zacznij pisać, aby wybrać użytkownika lub grupę.", "(group)" : "(grupa)", "Saved" : "Zapisano", + "Generate keys" : "Wygeneruj klucze", + "Error generating key pair" : "Błąd podczas generowania pary kluczy", "<b>Note:</b> " : "<b>Uwaga:</b> ", "and" : "i", "<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>Uwaga:</b> Wsparcie dla cURL w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<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>Uwaga:</b> Wsparcie dla FTP w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> \"%s\" nie jest zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", + "No external storage configured" : "Nie skonfigurowano żadnego zewnętrznego nośnika", "You can configure external storages in the personal settings" : "Możesz skonfigurować zewnętrzne zasoby w ustawieniach personalnych", "Name" : "Nazwa", "Storage type" : "Typ magazynu", diff --git a/apps/files_external/l10n/pl.json b/apps/files_external/l10n/pl.json index 41800919db8..8d3c5502a63 100644 --- a/apps/files_external/l10n/pl.json +++ b/apps/files_external/l10n/pl.json @@ -41,6 +41,7 @@ "Username as share" : "Użytkownik jako zasób", "URL" : "URL", "Secure https://" : "Bezpieczny https://", + "Public key" : "Klucz publiczny", "Access granted" : "Dostęp do", "Error configuring Dropbox storage" : "Wystąpił błąd podczas konfigurowania zasobu Dropbox", "Grant access" : "Udziel dostępu", @@ -50,11 +51,14 @@ "All users. Type to select user or group." : "Wszyscy użytkownicy. Zacznij pisać, aby wybrać użytkownika lub grupę.", "(group)" : "(grupa)", "Saved" : "Zapisano", + "Generate keys" : "Wygeneruj klucze", + "Error generating key pair" : "Błąd podczas generowania pary kluczy", "<b>Note:</b> " : "<b>Uwaga:</b> ", "and" : "i", "<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>Uwaga:</b> Wsparcie dla cURL w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<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>Uwaga:</b> Wsparcie dla FTP w PHP nie zostało włączone lub zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Uwaga:</b> \"%s\" nie jest zainstalowane. Zamontowanie %s nie jest możliwe. Proszę poproś Twojego administratora o zainstalowanie go.", + "No external storage configured" : "Nie skonfigurowano żadnego zewnętrznego nośnika", "You can configure external storages in the personal settings" : "Możesz skonfigurować zewnętrzne zasoby w ustawieniach personalnych", "Name" : "Nazwa", "Storage type" : "Typ magazynu", diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 6a46c8778d6..d4d7e582849 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Nome de usuário como compartilhado", "URL" : "URL", "Secure https://" : "https:// segura", + "Public key" : "Chave pública", "Access granted" : "Acesso concedido", "Error configuring Dropbox storage" : "Erro ao configurar armazenamento do Dropbox", "Grant access" : "Permitir acesso", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Todos os usuários. Digite para selecionar usuário ou grupo.", "(group)" : "(grupo)", "Saved" : "Salvo", + "Generate keys" : "Gerar chaves", + "Error generating key pair" : "Erro ao gerar um par de chaves", "<b>Note:</b> " : "<b>Nota:</b>", "and" : "e", "<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>Nota:</b> O suporte cURL do PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 52b1827e1e7..006314eb034 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -41,6 +41,7 @@ "Username as share" : "Nome de usuário como compartilhado", "URL" : "URL", "Secure https://" : "https:// segura", + "Public key" : "Chave pública", "Access granted" : "Acesso concedido", "Error configuring Dropbox storage" : "Erro ao configurar armazenamento do Dropbox", "Grant access" : "Permitir acesso", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "Todos os usuários. Digite para selecionar usuário ou grupo.", "(group)" : "(grupo)", "Saved" : "Salvo", + "Generate keys" : "Gerar chaves", + "Error generating key pair" : "Erro ao gerar um par de chaves", "<b>Note:</b> " : "<b>Nota:</b>", "and" : "e", "<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>Nota:</b> O suporte cURL do PHP não está habilitado ou instalado. Montagem de %s não é possível. Por favor, solicite ao seu administrador do sistema para instalá-lo.", diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js index 05c41ad4c7e..fe1472741db 100644 --- a/apps/files_external/l10n/pt_PT.js +++ b/apps/files_external/l10n/pt_PT.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Utilizar nome de utilizador como partilha", "URL" : "URL", "Secure https://" : "https:// Seguro", + "Public key" : "Chave pública", "Access granted" : "Acesso autorizado", "Error configuring Dropbox storage" : "Erro ao configurar o armazenamento do Dropbox", "Grant access" : "Conceder acesso", @@ -52,6 +53,8 @@ OC.L10N.register( "All users. Type to select user or group." : "Todos os utilizadores. Digite para selecionar o utilizador ou grupo.", "(group)" : "(grupo)", "Saved" : "Guardado", + "Generate keys" : "Gerar chaves", + "Error generating key pair" : "Erro ao gerar chave par", "<b>Note:</b> " : "<b>Nota:</b> ", "and" : "e", "<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>Aviso:</b> O suporte cURL no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json index 12ea0ce4655..b5a08ccd654 100644 --- a/apps/files_external/l10n/pt_PT.json +++ b/apps/files_external/l10n/pt_PT.json @@ -41,6 +41,7 @@ "Username as share" : "Utilizar nome de utilizador como partilha", "URL" : "URL", "Secure https://" : "https:// Seguro", + "Public key" : "Chave pública", "Access granted" : "Acesso autorizado", "Error configuring Dropbox storage" : "Erro ao configurar o armazenamento do Dropbox", "Grant access" : "Conceder acesso", @@ -50,6 +51,8 @@ "All users. Type to select user or group." : "Todos os utilizadores. Digite para selecionar o utilizador ou grupo.", "(group)" : "(grupo)", "Saved" : "Guardado", + "Generate keys" : "Gerar chaves", + "Error generating key pair" : "Erro ao gerar chave par", "<b>Note:</b> " : "<b>Nota:</b> ", "and" : "e", "<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>Aviso:</b> O suporte cURL no PHP não está activo ou instalado. Não é possível montar %s. Peça ao seu administrador para instalar.", diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index b1e9f0812f5..483aa71e708 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -1,9 +1,9 @@ OC.L10N.register( "files_external", { - "Fetching request tokens failed. Verify that your Dropbox app key and secret are correct." : "Ошибка при получении токенов. Проверьте правильность вашего ключа приложения и секретного ключа.", - "Fetching access tokens failed. Verify that your Dropbox app key and secret are correct." : "Ошибка при получении токена доступа. Проверьте правильность вашего ключа приложения и секретного ключа.", - "Please provide a valid Dropbox app key and secret." : "Укажите действительные ключ и пароль для Dropbox.", + "Fetching request tokens failed. Verify that your Dropbox app key and secret are correct." : "Получение токенов запроса прошло не успешно. Проверьте правильность вашего ключа и секрета Dropbox.", + "Fetching access tokens failed. Verify that your Dropbox app key and secret are correct." : "Получение токенов доступа прошло не успешно. Проверьте правильность вашего ключа и секрета Dropbox.", + "Please provide a valid Dropbox app key and secret." : "Укажите действительные ключ и секрет для Dropbox.", "Step 1 failed. Exception: %s" : "Шаг 1 неудачен. Исключение: %s", "Step 2 failed. Exception: %s" : "Шаг 2 неудачен. Исключение: %s", "External storage" : "Внешнее хранилище", @@ -38,11 +38,12 @@ OC.L10N.register( "Service Name (required for OpenStack Object Storage)" : "Имя Службы (обяз. для Хранилища объектов OpenStack)", "URL of identity endpoint (required for OpenStack Object Storage)" : "URL для удостоверения конечной точки (обяз. для Хранилища объектов OpenStack)", "Timeout of HTTP requests in seconds" : "Тайм-аут HTTP-запросов в секундах", - "Share" : "Поделиться", + "Share" : "Общий доступ", "SMB / CIFS using OC login" : "SMB / CIFS с ипользованием логина OC", "Username as share" : "Имя пользователя в качестве имени общего ресурса", "URL" : "Ссылка", "Secure https://" : "Безопасный https://", + "Public key" : "Открытый ключ", "Access granted" : "Доступ предоставлен", "Error configuring Dropbox storage" : "Ошибка при настройке хранилища Dropbox", "Grant access" : "Предоставить доступ", @@ -52,13 +53,15 @@ OC.L10N.register( "All users. Type to select user or group." : "Все пользователи. Введите имя пользователя или группы.", "(group)" : "(группа)", "Saved" : "Сохранено", + "Generate keys" : "Создать ключи", + "Error generating key pair" : "Ошибка создания ключевой пары", "<b>Note:</b> " : "<b>Примечание:</b> ", "and" : "и", "<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>Примечание:</b> Поддержка cURL в PHP не включена или не установлена. Монтирование %s невозможно. Обратитесь к вашему системному администратору.", "<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>Примечание:</b> Поддержка FTP в PHP не включена или не установлена. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> \"%s\" не установлен. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", - "No external storage configured" : "Нет внешних носителей", - "You can configure external storages in the personal settings" : "Вы можете изменить параметры внешних носителей в личных настройках", + "No external storage configured" : "Нет внешних хранилищ", + "You can configure external storages in the personal settings" : "Вы можете изменить параметры внешних хранилищ в личных настройках", "Name" : "Имя", "Storage type" : "Тип хранилища", "Scope" : "Область", @@ -68,7 +71,7 @@ OC.L10N.register( "Available for" : "Доступно для", "Add storage" : "Добавить хранилище", "Delete" : "Удалить", - "Enable User External Storage" : "Включить пользовательские внешние носители", + "Enable User External 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/ru.json b/apps/files_external/l10n/ru.json index 7a0e9aa95ca..75705093a6e 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -1,7 +1,7 @@ { "translations": { - "Fetching request tokens failed. Verify that your Dropbox app key and secret are correct." : "Ошибка при получении токенов. Проверьте правильность вашего ключа приложения и секретного ключа.", - "Fetching access tokens failed. Verify that your Dropbox app key and secret are correct." : "Ошибка при получении токена доступа. Проверьте правильность вашего ключа приложения и секретного ключа.", - "Please provide a valid Dropbox app key and secret." : "Укажите действительные ключ и пароль для Dropbox.", + "Fetching request tokens failed. Verify that your Dropbox app key and secret are correct." : "Получение токенов запроса прошло не успешно. Проверьте правильность вашего ключа и секрета Dropbox.", + "Fetching access tokens failed. Verify that your Dropbox app key and secret are correct." : "Получение токенов доступа прошло не успешно. Проверьте правильность вашего ключа и секрета Dropbox.", + "Please provide a valid Dropbox app key and secret." : "Укажите действительные ключ и секрет для Dropbox.", "Step 1 failed. Exception: %s" : "Шаг 1 неудачен. Исключение: %s", "Step 2 failed. Exception: %s" : "Шаг 2 неудачен. Исключение: %s", "External storage" : "Внешнее хранилище", @@ -36,11 +36,12 @@ "Service Name (required for OpenStack Object Storage)" : "Имя Службы (обяз. для Хранилища объектов OpenStack)", "URL of identity endpoint (required for OpenStack Object Storage)" : "URL для удостоверения конечной точки (обяз. для Хранилища объектов OpenStack)", "Timeout of HTTP requests in seconds" : "Тайм-аут HTTP-запросов в секундах", - "Share" : "Поделиться", + "Share" : "Общий доступ", "SMB / CIFS using OC login" : "SMB / CIFS с ипользованием логина OC", "Username as share" : "Имя пользователя в качестве имени общего ресурса", "URL" : "Ссылка", "Secure https://" : "Безопасный https://", + "Public key" : "Открытый ключ", "Access granted" : "Доступ предоставлен", "Error configuring Dropbox storage" : "Ошибка при настройке хранилища Dropbox", "Grant access" : "Предоставить доступ", @@ -50,13 +51,15 @@ "All users. Type to select user or group." : "Все пользователи. Введите имя пользователя или группы.", "(group)" : "(группа)", "Saved" : "Сохранено", + "Generate keys" : "Создать ключи", + "Error generating key pair" : "Ошибка создания ключевой пары", "<b>Note:</b> " : "<b>Примечание:</b> ", "and" : "и", "<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>Примечание:</b> Поддержка cURL в PHP не включена или не установлена. Монтирование %s невозможно. Обратитесь к вашему системному администратору.", "<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>Примечание:</b> Поддержка FTP в PHP не включена или не установлена. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", "<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "<b>Примечание:</b> \"%s\" не установлен. Монтирование %s невозможно. Пожалуйста, обратитесь к системному администратору.", - "No external storage configured" : "Нет внешних носителей", - "You can configure external storages in the personal settings" : "Вы можете изменить параметры внешних носителей в личных настройках", + "No external storage configured" : "Нет внешних хранилищ", + "You can configure external storages in the personal settings" : "Вы можете изменить параметры внешних хранилищ в личных настройках", "Name" : "Имя", "Storage type" : "Тип хранилища", "Scope" : "Область", @@ -66,7 +69,7 @@ "Available for" : "Доступно для", "Add storage" : "Добавить хранилище", "Delete" : "Удалить", - "Enable User External Storage" : "Включить пользовательские внешние носители", + "Enable User External 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/sk_SK.js b/apps/files_external/l10n/sk_SK.js index e48c31008b7..63f2644fde0 100644 --- a/apps/files_external/l10n/sk_SK.js +++ b/apps/files_external/l10n/sk_SK.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Používateľské meno ako zdieľaný priečinok", "URL" : "URL", "Secure https://" : "Zabezpečené https://", + "Public key" : "Verejný kľúč", "Access granted" : "Prístup povolený", "Error configuring Dropbox storage" : "Chyba pri konfigurácii úložiska Dropbox", "Grant access" : "Povoliť prístup", diff --git a/apps/files_external/l10n/sk_SK.json b/apps/files_external/l10n/sk_SK.json index e0d6c41b066..843d42f96b2 100644 --- a/apps/files_external/l10n/sk_SK.json +++ b/apps/files_external/l10n/sk_SK.json @@ -41,6 +41,7 @@ "Username as share" : "Používateľské meno ako zdieľaný priečinok", "URL" : "URL", "Secure https://" : "Zabezpečené https://", + "Public key" : "Verejný kľúč", "Access granted" : "Prístup povolený", "Error configuring Dropbox storage" : "Chyba pri konfigurácii úložiska Dropbox", "Grant access" : "Povoliť prístup", diff --git a/apps/files_external/l10n/sv.js b/apps/files_external/l10n/sv.js index a4cbdd5b7a0..ea1dfe20c78 100644 --- a/apps/files_external/l10n/sv.js +++ b/apps/files_external/l10n/sv.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Användarnamn till utdelning", "URL" : "URL", "Secure https://" : "Säker https://", + "Public key" : "Publik nyckel", "Access granted" : "Åtkomst beviljad", "Error configuring Dropbox storage" : "Fel vid konfigurering av Dropbox", "Grant access" : "Bevilja åtkomst", diff --git a/apps/files_external/l10n/sv.json b/apps/files_external/l10n/sv.json index c2bc9e07305..42cd0251a3e 100644 --- a/apps/files_external/l10n/sv.json +++ b/apps/files_external/l10n/sv.json @@ -41,6 +41,7 @@ "Username as share" : "Användarnamn till utdelning", "URL" : "URL", "Secure https://" : "Säker https://", + "Public key" : "Publik nyckel", "Access granted" : "Åtkomst beviljad", "Error configuring Dropbox storage" : "Fel vid konfigurering av Dropbox", "Grant access" : "Bevilja åtkomst", diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index 012e0651f8a..a48cc788d2f 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Paylaşım olarak kullanıcı adı", "URL" : "URL", "Secure https://" : "Güvenli https://", + "Public key" : "Ortak anahtar", "Access granted" : "Giriş kabul edildi", "Error configuring Dropbox storage" : "Dropbox depo yapılandırma hatası", "Grant access" : "Erişimi sağla", diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index 68aed802f7e..b3c4b94bc89 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -41,6 +41,7 @@ "Username as share" : "Paylaşım olarak kullanıcı adı", "URL" : "URL", "Secure https://" : "Güvenli https://", + "Public key" : "Ortak anahtar", "Access granted" : "Giriş kabul edildi", "Error configuring Dropbox storage" : "Dropbox depo yapılandırma hatası", "Grant access" : "Erişimi sağla", diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index 2b1cf3e0ee3..438359cd979 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -43,6 +43,7 @@ OC.L10N.register( "Username as share" : "Ім'я для відкритого доступу", "URL" : "URL", "Secure https://" : "Захищений https://", + "Public key" : "Відкритий ключ", "Access granted" : "Доступ дозволено", "Error configuring Dropbox storage" : "Помилка при налаштуванні сховища Dropbox", "Grant access" : "Дозволити доступ", diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index 55469685ac9..2df70501365 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -41,6 +41,7 @@ "Username as share" : "Ім'я для відкритого доступу", "URL" : "URL", "Secure https://" : "Захищений https://", + "Public key" : "Відкритий ключ", "Access granted" : "Доступ дозволено", "Error configuring Dropbox storage" : "Помилка при налаштуванні сховища Dropbox", "Grant access" : "Дозволити доступ", diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php index f6c56669734..2a762ad068f 100644 --- a/apps/files_external/lib/sftp.php +++ b/apps/files_external/lib/sftp.php @@ -20,7 +20,7 @@ class SFTP extends \OC\Files\Storage\Common { /** * @var \Net_SFTP */ - private $client; + protected $client; private static $tempFiles = array(); @@ -42,7 +42,8 @@ class SFTP extends \OC\Files\Storage\Common { $this->host = substr($this->host, $proto+3); } $this->user = $params['user']; - $this->password = $params['password']; + $this->password + = isset($params['password']) ? $params['password'] : ''; $this->root = isset($params['root']) ? $this->cleanPath($params['root']) : '/'; @@ -101,6 +102,18 @@ class SFTP extends \OC\Files\Storage\Common { return 'sftp::' . $this->user . '@' . $this->host . '/' . $this->root; } + public function getHost() { + return $this->host; + } + + public function getRoot() { + return $this->root; + } + + public function getUser() { + return $this->user; + } + /** * @param string $path */ @@ -121,7 +134,7 @@ class SFTP extends \OC\Files\Storage\Common { return false; } - private function writeHostKeys($keys) { + protected function writeHostKeys($keys) { try { $keyPath = $this->hostKeysPath(); if ($keyPath && file_exists($keyPath)) { @@ -137,7 +150,7 @@ class SFTP extends \OC\Files\Storage\Common { return false; } - private function readHostKeys() { + protected function readHostKeys() { try { $keyPath = $this->hostKeysPath(); if (file_exists($keyPath)) { diff --git a/apps/files_external/lib/sftp_key.php b/apps/files_external/lib/sftp_key.php new file mode 100644 index 00000000000..6113f88a8ff --- /dev/null +++ b/apps/files_external/lib/sftp_key.php @@ -0,0 +1,194 @@ +<?php +/** + * Copyright (c) 2014, 2015 University of Edinburgh <Ross.Nicoll@ed.ac.uk> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +namespace OC\Files\Storage; + +/** +* Uses phpseclib's Net_SFTP class and the Net_SFTP_Stream stream wrapper to +* provide access to SFTP servers. +*/ +class SFTP_Key extends \OC\Files\Storage\SFTP { + private $publicKey; + private $privateKey; + + public function __construct($params) { + parent::__construct($params); + $this->publicKey = $params['public_key']; + $this->privateKey = $params['private_key']; + } + + /** + * Returns the connection. + * + * @return \Net_SFTP connected client instance + * @throws \Exception when the connection failed + */ + public function getConnection() { + if (!is_null($this->client)) { + return $this->client; + } + + $hostKeys = $this->readHostKeys(); + $this->client = new \Net_SFTP($this->getHost()); + + // The SSH Host Key MUST be verified before login(). + $currentHostKey = $this->client->getServerPublicHostKey(); + if (array_key_exists($this->getHost(), $hostKeys)) { + if ($hostKeys[$this->getHost()] !== $currentHostKey) { + throw new \Exception('Host public key does not match known key'); + } + } else { + $hostKeys[$this->getHost()] = $currentHostKey; + $this->writeHostKeys($hostKeys); + } + + $key = $this->getPrivateKey(); + if (is_null($key)) { + throw new \Exception('Secret key could not be loaded'); + } + if (!$this->client->login($this->getUser(), $key)) { + throw new \Exception('Login failed'); + } + return $this->client; + } + + /** + * Returns the private key to be used for authentication to the remote server. + * + * @return \Crypt_RSA instance or null in case of a failure to load the key. + */ + private function getPrivateKey() { + $key = new \Crypt_RSA(); + $key->setPassword(\OC::$server->getConfig()->getSystemValue('secret', '')); + if (!$key->loadKey($this->privateKey)) { + // Should this exception rather than return null? + return null; + } + return $key; + } + + /** + * Throws an exception if the provided host name/address is invalid (cannot be resolved + * and is not an IPv4 address). + * + * @return true; never returns in case of a problem, this return value is used just to + * make unit tests happy. + */ + public function assertHostAddressValid($hostname) { + // TODO: Should handle IPv6 addresses too + if (!preg_match('/^\d+\.\d+\.\d+\.\d+$/', $hostname) && gethostbyname($hostname) === $hostname) { + // Hostname is not an IPv4 address and cannot be resolved via DNS + throw new \InvalidArgumentException('Cannot resolve hostname.'); + } + return true; + } + + /** + * Throws an exception if the provided port number is invalid (cannot be resolved + * and is not an IPv4 address). + * + * @return true; never returns in case of a problem, this return value is used just to + * make unit tests happy. + */ + public function assertPortNumberValid($port) { + if (!preg_match('/^\d+$/', $port)) { + throw new \InvalidArgumentException('Port number must be a number.'); + } + if ($port < 0 || $port > 65535) { + throw new \InvalidArgumentException('Port number must be between 0 and 65535 inclusive.'); + } + return true; + } + + /** + * Replaces anything that's not an alphanumeric character or "." in a hostname + * with "_", to make it safe for use as part of a file name. + */ + protected function sanitizeHostName($name) { + return preg_replace('/[^\d\w\._]/', '_', $name); + } + + /** + * Replaces anything that's not an alphanumeric character or "_" in a username + * with "_", to make it safe for use as part of a file name. + */ + protected function sanitizeUserName($name) { + return preg_replace('/[^\d\w_]/', '_', $name); + } + + public function test() { + if (empty($this->getHost())) { + \OC::$server->getLogger()->warning('Hostname has not been specified'); + return false; + } + if (empty($this->getUser())) { + \OC::$server->getLogger()->warning('Username has not been specified'); + return false; + } + if (!isset($this->privateKey)) { + \OC::$server->getLogger()->warning('Private key was missing from the request'); + return false; + } + + // Sanity check the host + $hostParts = explode(':', $this->getHost()); + try { + if (count($hostParts) == 1) { + $hostname = $hostParts[0]; + $this->assertHostAddressValid($hostname); + } else if (count($hostParts) == 2) { + $hostname = $hostParts[0]; + $this->assertHostAddressValid($hostname); + $this->assertPortNumberValid($hostParts[1]); + } else { + throw new \Exception('Host connection string is invalid.'); + } + } catch(\Exception $e) { + \OC::$server->getLogger()->warning($e->getMessage()); + return false; + } + + // Validate the key + $key = $this->getPrivateKey(); + if (is_null($key)) { + \OC::$server->getLogger()->warning('Secret key could not be loaded'); + return false; + } + + try { + if ($this->getConnection()->nlist() === false) { + return false; + } + } catch(\Exception $e) { + // We should be throwing a more specific error, so we're not just catching + // Exception here + \OC::$server->getLogger()->warning($e->getMessage()); + return false; + } + + // Save the key somewhere it can easily be extracted later + if (\OC::$server->getUserSession()->getUser()) { + $view = new \OC\Files\View('/'.\OC::$server->getUserSession()->getUser()->getUId().'/files_external/sftp_keys'); + if (!$view->is_dir('')) { + if (!$view->mkdir('')) { + \OC::$server->getLogger()->warning('Could not create secret key directory.'); + return false; + } + } + $key_filename = $this->sanitizeUserName($this->getUser()).'@'.$this->sanitizeHostName($hostname).'.pub'; + $key_file = $view->fopen($key_filename, "w"); + if ($key_file) { + fwrite($key_file, $this->publicKey); + fclose($key_file); + } else { + \OC::$server->getLogger()->warning('Could not write secret key file.'); + } + } + + return true; + } +} diff --git a/apps/files_external/tests/README.md b/apps/files_external/tests/README.md new file mode 100644 index 00000000000..35a0232434e --- /dev/null +++ b/apps/files_external/tests/README.md @@ -0,0 +1,58 @@ +# How to run the files external unit tests + +## Components + +The files_external relies - as the name already says - on external file system +providers. To test easily against such a provider we use some scripts to setup +a provider (and of course also cleanup that provider). Those scripts can be +found in the `tests/env` folder of the files_external app. + +### Naming Conventions + +The current implementation supports a script that starts with `start-` for the +setup step which is executed before the PHPUnit run and an optional script +starting with `stop-` (and have the same ending as the start script) to cleanup +the provider. For example: `start-webdav-ownCloud.sh` and +`stop-webdav-ownCloud.sh`. As a second requirement after this prefix there has +to be the name of the backend test suite. In the above example the test suite +`tests/backends/webdav.php` is used. The last part is a name that can be chosen +freely. + +## Hands-on way of unit test execution + +Run all files_external unit tests by invoking the following in the ownCloud +core root folder: + + ./autotest-external.sh + +This script supports to get passed a database as first argument: + + ./autotest-external.sh sqlite + +You can also pass the name of the external file system provider as a second +argument that should be executed. This is the name of the script without the +prefix `start-` (or `stop-`) and without the extension `.sh` from the above +mentioned components in `test/env`. So if you want to start the WebDAV backend +tests against an ownCloud instance you can run following: + + ./autotest-external.sh sqlite webdav-ownCloud + +This runs the script `start-webdav-ownCloud.sh` from the `tests/env` folder, +then runs the unit test suite from `backends/webdav.php` (because the middle part of +the name of the script is `webdav`) and finally tries to call +`stop-webdav-ownCloud.sh` for cleanup purposes. + +## The more manual way of unit test execution + +If you want to debug your external storage provider, you maybe don't want to +fire it up, execute the unit tests and clean everything up for each debugging +step. In this case you can simply start the external storage provider instance +and run the unit test multiple times against the instance for debugging purposes. +To do this you just need to follow these steps (from within +`apps/files_external/tests`): + + 1. run the start step (`env/start-BACKEND-NAME.sh`) or start the environment by + hand (i.e. setting up an instance manually in a virtual box) + 2. run the unit tests with following command (you can repeat that step multiple times): + `phpunit --configuration ../../../tests/phpunit-autotest-external.xml backends/BACKEND.php` + 3. call the cleanup script (`env/stop-BACKEND-NAME.sh`) or cleanup by hand diff --git a/apps/files_external/tests/backends/sftp_key.php b/apps/files_external/tests/backends/sftp_key.php new file mode 100644 index 00000000000..4e55cc37ca3 --- /dev/null +++ b/apps/files_external/tests/backends/sftp_key.php @@ -0,0 +1,85 @@ +<?php + +/** + * ownCloud + * + * @author Henrik Kjölhede + * @copyright 2013 Henrik Kjölhede hkjolhede@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Test\Files\Storage; + +class SFTP_Key extends Storage { + private $config; + + protected function setUp() { + parent::setUp(); + + $id = $this->getUniqueID(); + $this->config = include('files_external/tests/config.php'); + if ( ! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) { + $this->markTestSkipped('SFTP with key backend not configured'); + } + $this->config['sftp_key']['root'] .= '/' . $id; //make sure we have an new empty folder to work in + $this->instance = new \OC\Files\Storage\SFTP_Key($this->config['sftp_key']); + $this->instance->mkdir('/'); + } + + protected function tearDown() { + if ($this->instance) { + $this->instance->rmdir('/'); + } + + parent::tearDown(); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testInvalidAddressShouldThrowException() { + # I'd use example.com for this, but someone decided to break the spec and make it resolve + $this->instance->assertHostAddressValid('notarealaddress...'); + } + + public function testValidAddressShouldPass() { + $this->assertTrue($this->instance->assertHostAddressValid('localhost')); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testNegativePortNumberShouldThrowException() { + $this->instance->assertPortNumberValid('-1'); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testNonNumericalPortNumberShouldThrowException() { + $this->instance->assertPortNumberValid('a'); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testHighPortNumberShouldThrowException() { + $this->instance->assertPortNumberValid('65536'); + } + + public function testValidPortNumberShouldPass() { + $this->assertTrue($this->instance->assertPortNumberValid('22222')); + } +} diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php index 62aff4d1bc1..cf9cdfeead8 100644 --- a/apps/files_external/tests/config.php +++ b/apps/files_external/tests/config.php @@ -88,5 +88,13 @@ return array( 'user'=>'test', 'password'=>'test', 'root'=>'/test' - ) + ), + 'sftp_key' => array ( + 'run'=>false, + 'host'=>'localhost', + 'user'=>'test', + 'public_key'=>'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDJPTvz3OLonF2KSGEKP/nd4CPmRYvemG2T4rIiNYjDj0U5y+2sKEWbjiUlQl2bsqYuVoJ+/UNJlGQbbZ08kQirFeo1GoWBzqioaTjUJfbLN6TzVVKXxR9YIVmH7Ajg2iEeGCndGgbmnPfj+kF9TR9IH8vMVvtubQwf7uEwB0ALhw== phpseclib-generated-key', + 'private_key'=>'test', + 'root'=>'/test' + ), ); |