diff options
181 files changed, 1869 insertions, 643 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php index 5d0fe2c9184..243e227b6bb 100644 --- a/apps/encryption/appinfo/application.php +++ b/apps/encryption/appinfo/application.php @@ -171,6 +171,20 @@ class Application extends \OCP\AppFramework\App { ); }); + $container->registerService('SettingsController', function (IAppContainer $c) { + $server = $c->getServer(); + return new \OCA\Encryption\Controller\SettingsController( + $c->getAppName(), + $server->getRequest(), + $server->getL10N($c->getAppName()), + $server->getUserManager(), + $server->getUserSession(), + $c->query('KeyManager'), + $c->query('Crypt'), + $c->query('Session') + ); + }); + $container->registerService('UserSetup', function (IAppContainer $c) { $server = $c->getServer(); diff --git a/apps/encryption/appinfo/routes.php b/apps/encryption/appinfo/routes.php index 4194308a0ce..8fa163d0751 100644 --- a/apps/encryption/appinfo/routes.php +++ b/apps/encryption/appinfo/routes.php @@ -31,6 +31,11 @@ namespace OCA\Encryption\AppInfo; 'verb' => 'POST' ], [ + 'name' => 'Settings#updatePrivateKeyPassword', + 'url' => '/ajax/updatePrivateKeyPassword', + 'verb' => 'POST' + ], + [ 'name' => 'Recovery#changeRecoveryPassword', 'url' => '/ajax/changeRecoveryPassword', 'verb' => 'POST' diff --git a/apps/encryption/controller/settingscontroller.php b/apps/encryption/controller/settingscontroller.php new file mode 100644 index 00000000000..7fa3f469a14 --- /dev/null +++ b/apps/encryption/controller/settingscontroller.php @@ -0,0 +1,131 @@ +<?php +/** + * @author Björn Schießle <schiessle@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Encryption\Controller; + +use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\KeyManager; +use OCA\Encryption\Session; +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\DataResponse; +use OCP\IL10N; +use OCP\IRequest; +use OCP\IUserManager; +use OCP\IUserSession; + +class SettingsController extends Controller { + + /** @var IL10N */ + private $l; + + /** @var IUserManager */ + private $userManager; + + /** @var IUserSession */ + private $userSession; + + /** @var KeyManager */ + private $keyManager; + + /** @var Crypt */ + private $crypt; + + /** @var Session */ + private $session; + + /** + * @param string $AppName + * @param IRequest $request + * @param IL10N $l10n + * @param IUserManager $userManager + * @param IUserSession $userSession + * @param KeyManager $keyManager + * @param Crypt $crypt + * @param Session $session + */ + public function __construct($AppName, + IRequest $request, + IL10N $l10n, + IUserManager $userManager, + IUserSession $userSession, + KeyManager $keyManager, + Crypt $crypt, + Session $session) { + parent::__construct($AppName, $request); + $this->l = $l10n; + $this->userSession = $userSession; + $this->userManager = $userManager; + $this->keyManager = $keyManager; + $this->crypt = $crypt; + $this->session = $session; + } + + + /** + * @NoAdminRequired + * @UseSession + * + * @param string $oldPassword + * @param string $newPassword + * @return DataResponse + */ + public function updatePrivateKeyPassword($oldPassword, $newPassword) { + $result = false; + $uid = $this->userSession->getUser()->getUID(); + $errorMessage = $this->l->t('Could not update the private key password.'); + + //check if password is correct + $passwordCorrect = $this->userManager->checkPassword($uid, $newPassword); + + if ($passwordCorrect !== false) { + $encryptedKey = $this->keyManager->getPrivateKey($uid); + $decryptedKey = $this->crypt->decryptPrivateKey($encryptedKey, $oldPassword); + + if ($decryptedKey) { + $encryptedKey = $this->crypt->symmetricEncryptFileContent($decryptedKey, $newPassword); + $header = $this->crypt->generateHeader(); + if ($encryptedKey) { + $this->keyManager->setPrivateKey($uid, $header . $encryptedKey); + $this->session->setPrivateKey($decryptedKey); + $result = true; + } + } else { + $errorMessage = $this->l->t('The old password was not correct, please try again.'); + } + } else { + $errorMessage = $this->l->t('The current log-in password was not correct, please try again.'); + } + + if ($result === true) { + $this->session->setStatus(Session::INIT_SUCCESSFUL); + return new DataResponse( + ['message' => (string) $this->l->t('Private key password successfully updated.')] + ); + } else { + return new DataResponse( + ['message' => (string) $errorMessage], + Http::STATUS_BAD_REQUEST + ); + } + + } +} diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js index c02b4d74ae8..7ed49f77311 100644 --- a/apps/encryption/js/encryption.js +++ b/apps/encryption/js/encryption.js @@ -5,25 +5,23 @@ * See the COPYING-README file. */ +if (!OC.Encryption) { + OC.Encryption = {}; +} + /** * @namespace * @memberOf OC */ -OC.Encryption= { - MIGRATION_OPEN: 0, - MIGRATION_COMPLETED: 1, - MIGRATION_IN_PROGRESS: -1, - - +OC.Encryption = { displayEncryptionWarning: function () { - if (!OC.Notification.isHidden()) { return; } $.get( - OC.generateUrl('/apps/encryption/ajax/getStatus') - , function( result ) { + OC.generateUrl('/apps/encryption/ajax/getStatus'), + function (result) { if (result.status === "success") { OC.Notification.show(result.data.message); } @@ -31,7 +29,6 @@ OC.Encryption= { ); } }; - $(document).ready(function() { // wait for other apps/extensions to register their event handlers and file actions // in the "ready" clause diff --git a/apps/encryption/js/settings-admin.js b/apps/encryption/js/settings-admin.js index 36765adf3e4..bb539f6a4e2 100644 --- a/apps/encryption/js/settings-admin.js +++ b/apps/encryption/js/settings-admin.js @@ -12,17 +12,20 @@ $(document).ready(function(){ $( 'input:radio[name="adminEnableRecovery"]' ).change( function() { var recoveryStatus = $( this ).val(); - var oldStatus = (1+parseInt(recoveryStatus)) % 2; + var oldStatus = (1+parseInt(recoveryStatus, 10)) % 2; var recoveryPassword = $( '#encryptionRecoveryPassword' ).val(); var confirmPassword = $( '#repeatEncryptionRecoveryPassword' ).val(); OC.msg.startSaving('#encryptionSetRecoveryKey .msg'); $.post( - OC.generateUrl('/apps/encryption/ajax/adminRecovery') - , { adminEnableRecovery: recoveryStatus, recoveryPassword: recoveryPassword, confirmPassword: confirmPassword } - , function( result ) { + OC.generateUrl('/apps/encryption/ajax/adminRecovery'), + { adminEnableRecovery: recoveryStatus, + recoveryPassword: recoveryPassword, + confirmPassword: confirmPassword }, + function( result ) { OC.msg.finishedSaving('#encryptionSetRecoveryKey .msg', result); if (result.status === "error") { - $('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]').attr("checked", "true"); + $('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]') + .attr("checked", "true"); } else { if (recoveryStatus === "0") { $('p[name="changeRecoveryPasswordBlock"]').addClass("hidden"); @@ -44,9 +47,9 @@ $(document).ready(function(){ var confirmNewPassword = $('#repeatedNewEncryptionRecoveryPassword').val(); OC.msg.startSaving('#encryptionChangeRecoveryKey .msg'); $.post( - OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword') - , { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword } - , function( data ) { + OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword'), + { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword }, + function( data ) { OC.msg.finishedSaving('#encryptionChangeRecoveryKey .msg', data); } ); diff --git a/apps/encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js index dcfbba4ecde..e36f10a244e 100644 --- a/apps/encryption/js/settings-personal.js +++ b/apps/encryption/js/settings-personal.js @@ -4,23 +4,26 @@ * See the COPYING-README file. */ -function updatePrivateKeyPasswd() { - var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); - var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); - OC.msg.startSaving('#encryption .msg'); - $.post( - OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword') - , { oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword } - , function( data ) { - if (data.status === "error") { - OC.msg.finishedSaving('#encryption .msg', data); - } else { - OC.msg.finishedSaving('#encryption .msg', data); - } - } - ); +if (!OC.Encryption) { + OC.Encryption = {}; } +OC.Encryption = { + updatePrivateKeyPassword: function() { + var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); + var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); + OC.msg.startSaving('#encryption .msg'); + $.post( + OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'), + {oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword} + ).success(function (response) { + OC.msg.finishedSuccess('#encryption .msg', response.message); + }).fail(function (response) { + OC.msg.finishedError('#encryption .msg', response.responseJSON.message); + }); + } +}; + $(document).ready(function(){ // Trigger ajax on recoveryAdmin status change @@ -29,9 +32,9 @@ $(document).ready(function(){ var recoveryStatus = $( this ).val(); OC.msg.startAction('#userEnableRecovery .msg', 'Updating recovery keys. This can take some time...'); $.post( - OC.generateUrl('/apps/encryption/ajax/userSetRecovery') - , { userEnableRecovery: recoveryStatus } - , function( data ) { + OC.generateUrl('/apps/encryption/ajax/userSetRecovery'), + { userEnableRecovery: recoveryStatus }, + function( data ) { OC.msg.finishedAction('#userEnableRecovery .msg', data); } ); @@ -48,7 +51,7 @@ $(document).ready(function(){ if (newPrivateKeyPassword !== '' && oldPrivateKeyPassword !== '' ) { $('button:button[name="submitChangePrivateKeyPassword"]').removeAttr("disabled"); if(event.which === 13) { - updatePrivateKeyPasswd(); + OC.Encryption.updatePrivateKeyPassword(); } } else { $('button:button[name="submitChangePrivateKeyPassword"]').attr("disabled", "true"); @@ -56,7 +59,7 @@ $(document).ready(function(){ }); $('button:button[name="submitChangePrivateKeyPassword"]').click(function() { - updatePrivateKeyPasswd(); + OC.Encryption.updatePrivateKeyPassword(); }); }); diff --git a/apps/encryption/l10n/cs_CZ.js b/apps/encryption/l10n/cs_CZ.js index 70b3fa4fcdd..fcec4fd4d23 100644 --- a/apps/encryption/l10n/cs_CZ.js +++ b/apps/encryption/l10n/cs_CZ.js @@ -13,8 +13,11 @@ OC.L10N.register( "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pro obnovu", "Password successfully changed." : "Heslo bylo úspěšně změněno.", "Could not change the password. Maybe the old password was not correct." : "Změna hesla se nezdařila. Pravděpodobně nebylo stávající heslo zadáno správně.", + "Recovery Key enabled" : "Záchranný klíč povolen", + "Could not enable the recovery key, please try again or contact your administrator" : "Nelze povolit záchranný klíč. Zkuste to prosím znovu nebo kontaktujte svého správce.", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Chybný soukromý klíč pro šifrovací aplikaci. Aktualizujte prosím heslo svého soukromého klíče ve vašem osobním nastavení, abyste znovu získali přístup k vašim zašifrovaným souborům.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro šifrování je zapnuta, ale vaše klíče nejsou inicializované. Prosím odhlaste se a znovu přihlaste", + "ownCloud basic encryption module" : "ownCloud základní šifrovací modul", "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klíč pro obnovu (umožňuje obnovu uživatelských souborů v případě ztráty hesla)", "Recovery key password" : "Heslo klíče pro obnovu", "Repeat Recovery key password" : "Zopakujte heslo klíče pro obnovu", diff --git a/apps/encryption/l10n/cs_CZ.json b/apps/encryption/l10n/cs_CZ.json index 6ace47f473a..49c4d0eb33c 100644 --- a/apps/encryption/l10n/cs_CZ.json +++ b/apps/encryption/l10n/cs_CZ.json @@ -11,8 +11,11 @@ "Please repeat the new recovery password" : "Zopakujte prosím nové heslo pro obnovu", "Password successfully changed." : "Heslo bylo úspěšně změněno.", "Could not change the password. Maybe the old password was not correct." : "Změna hesla se nezdařila. Pravděpodobně nebylo stávající heslo zadáno správně.", + "Recovery Key enabled" : "Záchranný klíč povolen", + "Could not enable the recovery key, please try again or contact your administrator" : "Nelze povolit záchranný klíč. Zkuste to prosím znovu nebo kontaktujte svého správce.", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Chybný soukromý klíč pro šifrovací aplikaci. Aktualizujte prosím heslo svého soukromého klíče ve vašem osobním nastavení, abyste znovu získali přístup k vašim zašifrovaným souborům.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Aplikace pro šifrování je zapnuta, ale vaše klíče nejsou inicializované. Prosím odhlaste se a znovu přihlaste", + "ownCloud basic encryption module" : "ownCloud základní šifrovací modul", "Enable recovery key (allow to recover users files in case of password loss):" : "Povolit klíč pro obnovu (umožňuje obnovu uživatelských souborů v případě ztráty hesla)", "Recovery key password" : "Heslo klíče pro obnovu", "Repeat Recovery key password" : "Zopakujte heslo klíče pro obnovu", diff --git a/apps/encryption/l10n/es.js b/apps/encryption/l10n/es.js index d30432ecea3..31acc6019d9 100644 --- a/apps/encryption/l10n/es.js +++ b/apps/encryption/l10n/es.js @@ -1,11 +1,11 @@ OC.L10N.register( "encryption", { - "Missing recovery key password" : "Falta contraseña de recuperación.", + "Missing recovery key password" : "Falta contraseña de recuperación", "Please repeat the recovery key password" : "Por favor, repita la contraseña de recuperación", - "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada.", + "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada", "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos", - "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor compruebe su contraseña.", + "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la contraseña de recuperación. Por favor compruebe su contraseña de recuperación!", "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!", "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación", @@ -17,7 +17,7 @@ OC.L10N.register( "Could not enable the recovery key, please try again or contact your administrator" : "No se pudo habilitar la clave de recuperación, por favor vuelva a intentarlo o póngase en contacto con el administrador", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clave privada no es válida para la app de cifrado. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos cifrados.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de cifrado está habilitada pero sus claves no se han inicializado, por favor, cierre la sesión y vuelva a iniciarla de nuevo.", - "ownCloud basic encryption module" : "Módulo base de encriptación ownCloud", + "ownCloud basic encryption module" : "Módulo básico de encriptación ownCloud", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);", "Recovery key password" : "Contraseña de clave de recuperación", "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación", diff --git a/apps/encryption/l10n/es.json b/apps/encryption/l10n/es.json index 282181c52e7..9ff020157be 100644 --- a/apps/encryption/l10n/es.json +++ b/apps/encryption/l10n/es.json @@ -1,9 +1,9 @@ { "translations": { - "Missing recovery key password" : "Falta contraseña de recuperación.", + "Missing recovery key password" : "Falta contraseña de recuperación", "Please repeat the recovery key password" : "Por favor, repita la contraseña de recuperación", - "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada.", + "Repeated recovery key password does not match the provided recovery key password" : "La contraseña de recuperación reintroducida no coincide con la contraseña de recuperación proporcionada", "Recovery key successfully enabled" : "Se ha habilitado la recuperación de archivos", - "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la clave de recuperación. Por favor compruebe su contraseña.", + "Could not enable recovery key. Please check your recovery key password!" : "No se pudo habilitar la contraseña de recuperación. Por favor compruebe su contraseña de recuperación!", "Recovery key successfully disabled" : "Clave de recuperación deshabilitada", "Could not disable recovery key. Please check your recovery key password!" : "No se pudo deshabilitar la clave de recuperación. Por favor, ¡compruebe su contraseña!", "Please provide the old recovery password" : "Por favor, ingrese su antigua contraseña de recuperación", @@ -15,7 +15,7 @@ "Could not enable the recovery key, please try again or contact your administrator" : "No se pudo habilitar la clave de recuperación, por favor vuelva a intentarlo o póngase en contacto con el administrador", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "La clave privada no es válida para la app de cifrado. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos cifrados.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "La app de cifrado está habilitada pero sus claves no se han inicializado, por favor, cierre la sesión y vuelva a iniciarla de nuevo.", - "ownCloud basic encryption module" : "Módulo base de encriptación ownCloud", + "ownCloud basic encryption module" : "Módulo básico de encriptación ownCloud", "Enable recovery key (allow to recover users files in case of password loss):" : "Habilitar la clave de recuperación (permite recuperar los ficheros del usuario en caso de pérdida de la contraseña);", "Recovery key password" : "Contraseña de clave de recuperación", "Repeat Recovery key password" : "Repite la contraseña de clave de recuperación", diff --git a/apps/encryption/l10n/it.js b/apps/encryption/l10n/it.js index fe1a8c4a831..82f05e22ebf 100644 --- a/apps/encryption/l10n/it.js +++ b/apps/encryption/l10n/it.js @@ -14,6 +14,7 @@ OC.L10N.register( "Password successfully changed." : "Password modificata correttamente.", "Could not change the password. Maybe the old password was not correct." : "Impossibile cambiare la password. Forse la vecchia password non era corretta.", "Recovery Key enabled" : "Chiave di ripristino abilitata", + "Could not enable the recovery key, please try again or contact your administrator" : "Impossibile abilitare la chiave di ripristino, prova ancora o contatta il tuo amministratore", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Chiave privata non valida per l'applicazione di cifratura. Aggiorna la password della chiave privata nelle impostazioni personali per ripristinare l'accesso ai tuoi file cifrati.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso", "ownCloud basic encryption module" : "Modulo di cifratura di base di ownCloud", diff --git a/apps/encryption/l10n/it.json b/apps/encryption/l10n/it.json index fe13bd1587b..9e7ae7086ef 100644 --- a/apps/encryption/l10n/it.json +++ b/apps/encryption/l10n/it.json @@ -12,6 +12,7 @@ "Password successfully changed." : "Password modificata correttamente.", "Could not change the password. Maybe the old password was not correct." : "Impossibile cambiare la password. Forse la vecchia password non era corretta.", "Recovery Key enabled" : "Chiave di ripristino abilitata", + "Could not enable the recovery key, please try again or contact your administrator" : "Impossibile abilitare la chiave di ripristino, prova ancora o contatta il tuo amministratore", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Chiave privata non valida per l'applicazione di cifratura. Aggiorna la password della chiave privata nelle impostazioni personali per ripristinare l'accesso ai tuoi file cifrati.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "L'applicazione di cifratura è abilitata, ma le chiavi non sono state inizializzate, disconnettiti ed effettua nuovamente l'accesso", "ownCloud basic encryption module" : "Modulo di cifratura di base di ownCloud", diff --git a/apps/encryption/l10n/nl.js b/apps/encryption/l10n/nl.js index ffbbafefd9f..e994c8bfdfc 100644 --- a/apps/encryption/l10n/nl.js +++ b/apps/encryption/l10n/nl.js @@ -13,8 +13,11 @@ OC.L10N.register( "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord", "Password successfully changed." : "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", + "Recovery Key enabled" : "Herstelsleutel ingeschakeld", + "Could not enable the recovery key, please try again or contact your administrator" : "Kon herstelsleutel niet inschakelen, probeer het opnieuw, of neem contact op met uw beheerder", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor crypto app. Werk het privésleutel wachtwoord bij in uw persoonlijke instellingen om opnieuw toegang te krijgen tot uw versleutelde bestanden.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "ownCloud basic encryption module" : "ownCloud basis versleutelingsmodule", "Enable recovery key (allow to recover users files in case of password loss):" : "Activeren herstelsleutel (maakt het mogelijk om gebruikersbestanden terug te halen in geval van verlies van het wachtwoord):", "Recovery key password" : "Wachtwoord herstelsleulel", "Repeat Recovery key password" : "Herhaal het herstelsleutel wachtwoord", diff --git a/apps/encryption/l10n/nl.json b/apps/encryption/l10n/nl.json index 741ad6ee844..574cfac66f9 100644 --- a/apps/encryption/l10n/nl.json +++ b/apps/encryption/l10n/nl.json @@ -11,8 +11,11 @@ "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord", "Password successfully changed." : "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", + "Recovery Key enabled" : "Herstelsleutel ingeschakeld", + "Could not enable the recovery key, please try again or contact your administrator" : "Kon herstelsleutel niet inschakelen, probeer het opnieuw, of neem contact op met uw beheerder", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor crypto app. Werk het privésleutel wachtwoord bij in uw persoonlijke instellingen om opnieuw toegang te krijgen tot uw versleutelde bestanden.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar uw sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "ownCloud basic encryption module" : "ownCloud basis versleutelingsmodule", "Enable recovery key (allow to recover users files in case of password loss):" : "Activeren herstelsleutel (maakt het mogelijk om gebruikersbestanden terug te halen in geval van verlies van het wachtwoord):", "Recovery key password" : "Wachtwoord herstelsleulel", "Repeat Recovery key password" : "Herhaal het herstelsleutel wachtwoord", diff --git a/apps/encryption/l10n/tr.js b/apps/encryption/l10n/tr.js index d5829734831..e0feeac3bd6 100644 --- a/apps/encryption/l10n/tr.js +++ b/apps/encryption/l10n/tr.js @@ -13,8 +13,11 @@ OC.L10N.register( "Please repeat the new recovery password" : "Lütfen yeni kurtarma parolasını yenileyin", "Password successfully changed." : "Parola başarıyla değiştirildi.", "Could not change the password. Maybe the old password was not correct." : "Parola değiştirilemedi. Eski parolanız doğru olmayabilir.", + "Recovery Key enabled" : "Kurtarma anahtarı etkin", + "Could not enable the recovery key, please try again or contact your administrator" : "Kurtarma anahtarını etkinleştirmek olmadı, tekrar deneyin ya da yöneticinize başvurun", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifreleme Uygulaması için geçersiz özel anahtar. Lütfen şifreli dosyalarınıza erişimi tekrar kazanabilmek için kişisel ayarlarınızdan özel anahtar parolanızı güncelleyin.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın", + "ownCloud basic encryption module" : "ownCloud basit şifreleme modülü", "Enable recovery key (allow to recover users files in case of password loss):" : "Kurtarma anahtarını etkinleştir (parola kaybı durumunda kullanıcı dosyalarının kurtarılmasına izin verir):", "Recovery key password" : "Kurtarma anahtarı parolası", "Repeat Recovery key password" : "Kurtarma anahtarı parolasını yineleyin", diff --git a/apps/encryption/l10n/tr.json b/apps/encryption/l10n/tr.json index 75aee1e2d7a..afb8f0225b0 100644 --- a/apps/encryption/l10n/tr.json +++ b/apps/encryption/l10n/tr.json @@ -11,8 +11,11 @@ "Please repeat the new recovery password" : "Lütfen yeni kurtarma parolasını yenileyin", "Password successfully changed." : "Parola başarıyla değiştirildi.", "Could not change the password. Maybe the old password was not correct." : "Parola değiştirilemedi. Eski parolanız doğru olmayabilir.", + "Recovery Key enabled" : "Kurtarma anahtarı etkin", + "Could not enable the recovery key, please try again or contact your administrator" : "Kurtarma anahtarını etkinleştirmek olmadı, tekrar deneyin ya da yöneticinize başvurun", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Şifreleme Uygulaması için geçersiz özel anahtar. Lütfen şifreli dosyalarınıza erişimi tekrar kazanabilmek için kişisel ayarlarınızdan özel anahtar parolanızı güncelleyin.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın", + "ownCloud basic encryption module" : "ownCloud basit şifreleme modülü", "Enable recovery key (allow to recover users files in case of password loss):" : "Kurtarma anahtarını etkinleştir (parola kaybı durumunda kullanıcı dosyalarının kurtarılmasına izin verir):", "Recovery key password" : "Kurtarma anahtarı parolası", "Repeat Recovery key password" : "Kurtarma anahtarı parolasını yineleyin", diff --git a/apps/encryption/l10n/uk.js b/apps/encryption/l10n/uk.js index 9440ef84b01..f1b1f9a8b73 100644 --- a/apps/encryption/l10n/uk.js +++ b/apps/encryption/l10n/uk.js @@ -5,6 +5,7 @@ OC.L10N.register( "Please repeat the recovery key password" : "Введіть ще раз пароль для ключа відновлення", "Repeated recovery key password does not match the provided recovery key password" : "Введені паролі ключа відновлення не співпадають", "Recovery key successfully enabled" : "Ключ відновлення підключено", + "Could not enable recovery key. Please check your recovery key password!" : "Не вдалося підключити ключ відновлення. Будь ласка, перевірте пароль свого ключа відновлення!", "Recovery key successfully disabled" : "Ключ відновлення відключено", "Could not disable recovery key. Please check your recovery key password!" : "Не вдалося відключити ключ відновлення. Будь ласка, перевірте пароль ключа відновлення!", "Please provide the old recovery password" : "Будь ласка, введіть старий пароль відновлення", @@ -12,8 +13,11 @@ OC.L10N.register( "Please repeat the new recovery password" : "Будь ласка, введіть новий пароль відновлення ще раз", "Password successfully changed." : "Пароль змінено.", "Could not change the password. Maybe the old password was not correct." : "Не вдалося змінити пароль. Можливо ви неправильно ввели старий пароль.", + "Recovery Key enabled" : "Ключ відновлення підключено", + "Could not enable the recovery key, please try again or contact your administrator" : "Не вдалося підключити ключ відновлення, будь ласка, перевірте пароль ключа відновлення!", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Невірний закритий ключ для доданку шифрування. Оновіть пароль до вашого закритого ключа в особистих налаштуваннях.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Доданок шифрування ввімкнено, але ваші ключі не ініціалізовано, вийдіть та зайдіть знову", + "ownCloud basic encryption module" : "базовий модуль шифрування ownCloud", "Enable recovery key (allow to recover users files in case of password loss):" : "Ввімкнути ключ відновлення (дозволяє користувачам відновлювати файли при втраті паролю):", "Recovery key password" : "Пароль ключа відновлення", "Repeat Recovery key password" : "Введіть ще раз пароль ключа відновлення", diff --git a/apps/encryption/l10n/uk.json b/apps/encryption/l10n/uk.json index 8a03b8de631..0fdefc95161 100644 --- a/apps/encryption/l10n/uk.json +++ b/apps/encryption/l10n/uk.json @@ -3,6 +3,7 @@ "Please repeat the recovery key password" : "Введіть ще раз пароль для ключа відновлення", "Repeated recovery key password does not match the provided recovery key password" : "Введені паролі ключа відновлення не співпадають", "Recovery key successfully enabled" : "Ключ відновлення підключено", + "Could not enable recovery key. Please check your recovery key password!" : "Не вдалося підключити ключ відновлення. Будь ласка, перевірте пароль свого ключа відновлення!", "Recovery key successfully disabled" : "Ключ відновлення відключено", "Could not disable recovery key. Please check your recovery key password!" : "Не вдалося відключити ключ відновлення. Будь ласка, перевірте пароль ключа відновлення!", "Please provide the old recovery password" : "Будь ласка, введіть старий пароль відновлення", @@ -10,8 +11,11 @@ "Please repeat the new recovery password" : "Будь ласка, введіть новий пароль відновлення ще раз", "Password successfully changed." : "Пароль змінено.", "Could not change the password. Maybe the old password was not correct." : "Не вдалося змінити пароль. Можливо ви неправильно ввели старий пароль.", + "Recovery Key enabled" : "Ключ відновлення підключено", + "Could not enable the recovery key, please try again or contact your administrator" : "Не вдалося підключити ключ відновлення, будь ласка, перевірте пароль ключа відновлення!", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." : "Невірний закритий ключ для доданку шифрування. Оновіть пароль до вашого закритого ключа в особистих налаштуваннях.", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Доданок шифрування ввімкнено, але ваші ключі не ініціалізовано, вийдіть та зайдіть знову", + "ownCloud basic encryption module" : "базовий модуль шифрування ownCloud", "Enable recovery key (allow to recover users files in case of password loss):" : "Ввімкнути ключ відновлення (дозволяє користувачам відновлювати файли при втраті паролю):", "Recovery key password" : "Пароль ключа відновлення", "Repeat Recovery key password" : "Введіть ще раз пароль ключа відновлення", diff --git a/apps/encryption/tests/controller/SettingsControllerTest.php b/apps/encryption/tests/controller/SettingsControllerTest.php new file mode 100644 index 00000000000..478bf8213b5 --- /dev/null +++ b/apps/encryption/tests/controller/SettingsControllerTest.php @@ -0,0 +1,222 @@ +<?php +/** + * @author Björn Schießle <schiessle@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Encryption\Tests\Controller; + +use OCA\Encryption\Controller\SettingsController; +use OCA\Encryption\Session; +use OCP\AppFramework\Http; +use Test\TestCase; + +class SettingsControllerTest extends TestCase { + + /** @var SettingsController */ + private $controller; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $requestMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $l10nMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $userManagerMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $userSessionMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $keyManagerMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $cryptMock; + + /** @var \PHPUnit_Framework_MockObject_MockObject */ + private $sessionMock; + + protected function setUp() { + + parent::setUp(); + + $this->requestMock = $this->getMock('OCP\IRequest'); + + $this->l10nMock = $this->getMockBuilder('OCP\IL10N') + ->disableOriginalConstructor()->getMock(); + + $this->l10nMock->expects($this->any()) + ->method('t') + ->will($this->returnCallback(function($message) { + return $message; + })); + + $this->userManagerMock = $this->getMockBuilder('OCP\IUserManager') + ->disableOriginalConstructor()->getMock(); + + $this->keyManagerMock = $this->getMockBuilder('OCA\Encryption\KeyManager') + ->disableOriginalConstructor()->getMock(); + + $this->cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt') + ->disableOriginalConstructor()->getMock(); + + $this->userSessionMock = $this->getMockBuilder('OCP\IUserSession') + ->disableOriginalConstructor() + ->setMethods([ + 'isLoggedIn', + 'getUID', + 'login', + 'logout', + 'setUser', + 'getUser', + 'canChangePassword', + ]) + ->getMock(); + + $this->userSessionMock->expects($this->any()) + ->method('getUID') + ->willReturn('testUser'); + + $this->userSessionMock->expects($this->any()) + ->method($this->anything()) + ->will($this->returnSelf()); + + $this->sessionMock = $this->getMockBuilder('OCA\Encryption\Session') + ->disableOriginalConstructor()->getMock(); + + $this->controller = new SettingsController( + 'encryption', + $this->requestMock, + $this->l10nMock, + $this->userManagerMock, + $this->userSessionMock, + $this->keyManagerMock, + $this->cryptMock, + $this->sessionMock + ); + } + + /** + * test updatePrivateKeyPassword() if wrong new password was entered + */ + public function testUpdatePrivateKeyPasswordWrongNewPassword() { + + $oldPassword = 'old'; + $newPassword = 'new'; + + $this->userManagerMock + ->expects($this->once()) + ->method('checkPassword') + ->willReturn(false); + + $result = $this->controller->updatePrivateKeyPassword($oldPassword, $newPassword); + + $data = $result->getData(); + + $this->assertSame(Http::STATUS_BAD_REQUEST, $result->getStatus()); + $this->assertSame('The current log-in password was not correct, please try again.', + $data['message']); + } + + /** + * test updatePrivateKeyPassword() if wrong old password was entered + */ + public function testUpdatePrivateKeyPasswordWrongOldPassword() { + + $oldPassword = 'old'; + $newPassword = 'new'; + + $this->userManagerMock + ->expects($this->once()) + ->method('checkPassword') + ->willReturn(true); + + $this->cryptMock + ->expects($this->once()) + ->method('decryptPrivateKey') + ->willReturn(false); + + $result = $this->controller->updatePrivateKeyPassword($oldPassword, $newPassword); + + $data = $result->getData(); + + $this->assertSame(Http::STATUS_BAD_REQUEST, $result->getStatus()); + $this->assertSame('The old password was not correct, please try again.', + $data['message']); + } + + /** + * test updatePrivateKeyPassword() with the correct old and new password + */ + public function testUpdatePrivateKeyPassword() { + + $oldPassword = 'old'; + $newPassword = 'new'; + + $this->userSessionMock + ->expects($this->once()) + ->method('getUID') + ->willReturn('testUser'); + + $this->userManagerMock + ->expects($this->once()) + ->method('checkPassword') + ->willReturn(true); + + $this->cryptMock + ->expects($this->once()) + ->method('decryptPrivateKey') + ->willReturn('decryptedKey'); + + $this->cryptMock + ->expects($this->once()) + ->method('symmetricEncryptFileContent') + ->willReturn('encryptedKey'); + + $this->cryptMock + ->expects($this->once()) + ->method('generateHeader') + ->willReturn('header.'); + + // methods which must be called after successful changing the key password + $this->keyManagerMock + ->expects($this->once()) + ->method('setPrivateKey') + ->with($this->equalTo('testUser'), $this->equalTo('header.encryptedKey')); + + $this->sessionMock + ->expects($this->once()) + ->method('setPrivateKey') + ->with($this->equalTo('decryptedKey')); + + $this->sessionMock + ->expects($this->once()) + ->method('setStatus') + ->with($this->equalTo(Session::INIT_SUCCESSFUL)); + + $result = $this->controller->updatePrivateKeyPassword($oldPassword, $newPassword); + + $data = $result->getData(); + + $this->assertSame(Http::STATUS_OK, $result->getStatus()); + $this->assertSame('Private key password successfully updated.', + $data['message']); + } + +} diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index b6506824a80..08c9041062d 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -85,4 +85,4 @@ $this->create('download', 'download{file}') ->actionInclude('files/download.php'); // Register with the capabilities API -\OC_API::register('get', '/cloud/capabilities', array('OCA\Files\Capabilities', 'getCapabilities'), 'files', \OC_API::USER_AUTH); +\OCP\API::register('get', '/cloud/capabilities', array('OCA\Files\Capabilities', 'getCapabilities'), 'files', \OCP\API::USER_AUTH); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 455ccae3f96..bce85b7f5e7 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -274,7 +274,16 @@ table.multiselect #headerName { position: relative; width: 9999px; /* when we use 100%, the styling breaks on mobile … table styling */ } -table td.selection, table th.selection, table td.fileaction { width:32px; text-align:center; } +table.multiselect #modified { + display: none; +} + +table td.selection, +table th.selection, +table td.fileaction { + width: 32px; + text-align: center; +} table td.filename a.name { position:relative; /* Firefox needs to explicitly have this default set … */ -moz-box-sizing: border-box; diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 9d60e77b0ac..0181acab596 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1623,7 +1623,8 @@ updateEmptyContent: function() { var permissions = this.getDirectoryPermissions(); var isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0; - this.$el.find('#emptycontent').toggleClass('hidden', !isCreatable || !this.isEmpty); + this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty); + this.$el.find('#emptycontent .uploadmessage').toggleClass('hidden', !isCreatable || !this.isEmpty); this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty); }, /** diff --git a/apps/files/l10n/et_EE.js b/apps/files/l10n/et_EE.js index a829246bfa9..7eada9d7875 100644 --- a/apps/files/l10n/et_EE.js +++ b/apps/files/l10n/et_EE.js @@ -45,6 +45,7 @@ OC.L10N.register( "Download" : "Lae alla", "Select" : "Vali", "Pending" : "Ootel", + "Unable to determine date" : "Kuupäeva tuvastamine ei õnnestunud", "Error moving file." : "Viga faili liigutamisel.", "Error moving file" : "Viga faili eemaldamisel", "Error" : "Viga", @@ -62,6 +63,7 @@ OC.L10N.register( "Your storage is full, files can not be updated or synced anymore!" : "Sinu andmemaht on täis! Faile ei uuendata ega sünkroniseerita!", "Your storage is almost full ({usedSpacePercent}%)" : "Su andmemaht on peaaegu täis ({usedSpacePercent}%)", "{dirs} and {files}" : "{dirs} ja {files}", + "Favorited" : "Lemmikud", "Favorite" : "Lemmik", "A new file or folder has been <strong>created</strong>" : "Uus fail või kataloog on <strong>loodud</strong>", "A file or folder has been <strong>changed</strong>" : "Fail või kataloog on <strong>muudetud</strong>", @@ -93,9 +95,15 @@ OC.L10N.register( "Folder" : "Kaust", "Upload" : "Lae üles", "Cancel upload" : "Tühista üleslaadimine", + "No files in here" : "Siin ei ole faile", + "Upload some content or sync with your devices!" : "Laadi sisu üles või süngi oma seadmetega!", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", + "Select all" : "Vali kõik", "Upload too large" : "Üleslaadimine on liiga suur", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Failid, mida sa proovid üles laadida, ületab serveri poolt üleslaetavatele failidele määratud maksimaalse suuruse.", "Files are being scanned, please wait." : "Faile skannitakse, palun oota.", - "Currently scanning" : "Praegu skännimisel" + "Currently scanning" : "Praegu skännimisel", + "No favorites" : "Lemmikuid pole", + "Files and folders you mark as favorite will show up here" : "Siin kuvatakse faile ja kaustasid, mille oled märkinud lemmikuteks" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files/l10n/et_EE.json b/apps/files/l10n/et_EE.json index b39420a5aa3..342c43b5daf 100644 --- a/apps/files/l10n/et_EE.json +++ b/apps/files/l10n/et_EE.json @@ -43,6 +43,7 @@ "Download" : "Lae alla", "Select" : "Vali", "Pending" : "Ootel", + "Unable to determine date" : "Kuupäeva tuvastamine ei õnnestunud", "Error moving file." : "Viga faili liigutamisel.", "Error moving file" : "Viga faili eemaldamisel", "Error" : "Viga", @@ -60,6 +61,7 @@ "Your storage is full, files can not be updated or synced anymore!" : "Sinu andmemaht on täis! Faile ei uuendata ega sünkroniseerita!", "Your storage is almost full ({usedSpacePercent}%)" : "Su andmemaht on peaaegu täis ({usedSpacePercent}%)", "{dirs} and {files}" : "{dirs} ja {files}", + "Favorited" : "Lemmikud", "Favorite" : "Lemmik", "A new file or folder has been <strong>created</strong>" : "Uus fail või kataloog on <strong>loodud</strong>", "A file or folder has been <strong>changed</strong>" : "Fail või kataloog on <strong>muudetud</strong>", @@ -91,9 +93,15 @@ "Folder" : "Kaust", "Upload" : "Lae üles", "Cancel upload" : "Tühista üleslaadimine", + "No files in here" : "Siin ei ole faile", + "Upload some content or sync with your devices!" : "Laadi sisu üles või süngi oma seadmetega!", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", + "Select all" : "Vali kõik", "Upload too large" : "Üleslaadimine on liiga suur", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Failid, mida sa proovid üles laadida, ületab serveri poolt üleslaetavatele failidele määratud maksimaalse suuruse.", "Files are being scanned, please wait." : "Faile skannitakse, palun oota.", - "Currently scanning" : "Praegu skännimisel" + "Currently scanning" : "Praegu skännimisel", + "No favorites" : "Lemmikuid pole", + "Files and folders you mark as favorite will show up here" : "Siin kuvatakse faile ja kaustasid, mille oled märkinud lemmikuteks" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js index 34d92155970..1c42ce7649c 100644 --- a/apps/files/l10n/fr.js +++ b/apps/files/l10n/fr.js @@ -89,7 +89,7 @@ OC.L10N.register( "Maximum upload size" : "Taille max. d'envoi", "max. possible: " : "Max. possible :", "Save" : "Sauvegarder", - "Can not be edited from here due to insufficient permissions." : "Ne peut être modifié ici à cause de permissions insufisantes.", + "Can not be edited from here due to insufficient permissions." : "Ne peut être modifié ici à cause de permissions insuffisantes.", "Settings" : "Paramètres", "WebDAV" : "WebDAV", "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Utilisez cette adresse pour <a href=\"%s\" target=\"_blank\">accéder à vos fichiers par WebDAV</a>", diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json index 66b527512d1..c04ba115e8b 100644 --- a/apps/files/l10n/fr.json +++ b/apps/files/l10n/fr.json @@ -87,7 +87,7 @@ "Maximum upload size" : "Taille max. d'envoi", "max. possible: " : "Max. possible :", "Save" : "Sauvegarder", - "Can not be edited from here due to insufficient permissions." : "Ne peut être modifié ici à cause de permissions insufisantes.", + "Can not be edited from here due to insufficient permissions." : "Ne peut être modifié ici à cause de permissions insuffisantes.", "Settings" : "Paramètres", "WebDAV" : "WebDAV", "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Utilisez cette adresse pour <a href=\"%s\" target=\"_blank\">accéder à vos fichiers par WebDAV</a>", diff --git a/apps/files/l10n/ja.js b/apps/files/l10n/ja.js index fc90f8c2d97..80e1f478509 100644 --- a/apps/files/l10n/ja.js +++ b/apps/files/l10n/ja.js @@ -70,6 +70,7 @@ OC.L10N.register( "An error occurred while trying to update the tags" : "タグを更新する際にエラーが発生しました", "A new file or folder has been <strong>created</strong>" : "新しいファイルまたはフォルダーを<strong>作成</strong>したとき", "A file or folder has been <strong>changed</strong>" : "ファイルまたはフォルダーを<strong>変更</strong>したとき", + "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "<strong>お気に入りファイル</strong>に対する作成と変更の通知は制限されています。<em>(表示のみ)</em>", "A file or folder has been <strong>deleted</strong>" : "ファイルまたはフォルダーを<strong>削除</strong>したとき", "A file or folder has been <strong>restored</strong>" : "ファイルまたはフォルダーを<strong>復元</strong>したとき", "You created %1$s" : "あなたは %1$s を作成しました", diff --git a/apps/files/l10n/ja.json b/apps/files/l10n/ja.json index c9c579ac189..f3868ed14cf 100644 --- a/apps/files/l10n/ja.json +++ b/apps/files/l10n/ja.json @@ -68,6 +68,7 @@ "An error occurred while trying to update the tags" : "タグを更新する際にエラーが発生しました", "A new file or folder has been <strong>created</strong>" : "新しいファイルまたはフォルダーを<strong>作成</strong>したとき", "A file or folder has been <strong>changed</strong>" : "ファイルまたはフォルダーを<strong>変更</strong>したとき", + "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "<strong>お気に入りファイル</strong>に対する作成と変更の通知は制限されています。<em>(表示のみ)</em>", "A file or folder has been <strong>deleted</strong>" : "ファイルまたはフォルダーを<strong>削除</strong>したとき", "A file or folder has been <strong>restored</strong>" : "ファイルまたはフォルダーを<strong>復元</strong>したとき", "You created %1$s" : "あなたは %1$s を作成しました", diff --git a/apps/files/l10n/uk.js b/apps/files/l10n/uk.js index 2577d6569c2..a9496a55823 100644 --- a/apps/files/l10n/uk.js +++ b/apps/files/l10n/uk.js @@ -102,13 +102,13 @@ OC.L10N.register( "Cancel upload" : "Перервати завантаження", "No files in here" : "Тут немає файлів", "Upload some content or sync with your devices!" : "Завантажте вміст або синхронізуйте з пристроями!", - "No entries found in this folder" : "Записів не знайдено в цій папці", + "No entries found in this folder" : "Записів не знайдено в цій теці", "Select all" : "Вибрати всі", "Upload too large" : "Файл занадто великий", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файли,що ви намагаєтесь відвантажити перевищують максимальний дозволений розмір файлів на цьому сервері.", "Files are being scanned, please wait." : "Файли скануються, зачекайте, будь-ласка.", "Currently scanning" : "Триває перевірка", "No favorites" : "Немає обраних", - "Files and folders you mark as favorite will show up here" : "Файли і папки, які ви помітили як улюблені з’являться тут" + "Files and folders you mark as favorite will show up here" : "Файли і теки, які ви помітили як улюблені, з’являться тут" }, "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/l10n/uk.json b/apps/files/l10n/uk.json index 9522cf829bd..c34b8501ae9 100644 --- a/apps/files/l10n/uk.json +++ b/apps/files/l10n/uk.json @@ -100,13 +100,13 @@ "Cancel upload" : "Перервати завантаження", "No files in here" : "Тут немає файлів", "Upload some content or sync with your devices!" : "Завантажте вміст або синхронізуйте з пристроями!", - "No entries found in this folder" : "Записів не знайдено в цій папці", + "No entries found in this folder" : "Записів не знайдено в цій теці", "Select all" : "Вибрати всі", "Upload too large" : "Файл занадто великий", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файли,що ви намагаєтесь відвантажити перевищують максимальний дозволений розмір файлів на цьому сервері.", "Files are being scanned, please wait." : "Файли скануються, зачекайте, будь-ласка.", "Currently scanning" : "Триває перевірка", "No favorites" : "Немає обраних", - "Files and folders you mark as favorite will show up here" : "Файли і папки, які ви помітили як улюблені з’являться тут" + "Files and folders you mark as favorite will show up here" : "Файли і теки, які ви помітили як улюблені, з’являться тут" },"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/templates/list.php b/apps/files/templates/list.php index 02137c7e446..32651b261da 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -54,7 +54,7 @@ <div id="emptycontent" class="hidden"> <div class="icon-folder"></div> <h2><?php p($l->t('No files in here')); ?></h2> - <p><?php p($l->t('Upload some content or sync with your devices!')); ?></p> + <p class="uploadmessage hidden"><?php p($l->t('Upload some content or sync with your devices!')); ?></p> </div> <div class="nofilterresults emptycontent hidden"> diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 153cbe52c10..aa44c92792d 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -87,7 +87,8 @@ describe('OCA.Files.FileList tests', function() { '<tbody id="fileList"></tbody>' + '<tfoot></tfoot>' + '</table>' + - '<div id="emptycontent">Empty content message</div>' + + // TODO: move to handlebars template + '<div id="emptycontent"><h2>Empty content message</h2><p class="uploadmessage">Upload message</p></div>' + '<div class="nofilterresults hidden"></div>' + '</div>' ); @@ -845,13 +846,15 @@ describe('OCA.Files.FileList tests', function() { fileList.setFiles([]); expect($('#filestable thead th').hasClass('hidden')).toEqual(true); expect($('#emptycontent').hasClass('hidden')).toEqual(false); + expect($('#emptycontent .uploadmessage').hasClass('hidden')).toEqual(false); expect(fileList.$el.find('.summary').hasClass('hidden')).toEqual(true); }); - it('hides headers, empty content message, and summary when list is empty and user has no creation permission', function(){ + it('hides headers, upload message, and summary when list is empty and user has no creation permission', function(){ $('#permissions').val(0); fileList.setFiles([]); expect($('#filestable thead th').hasClass('hidden')).toEqual(true); - expect($('#emptycontent').hasClass('hidden')).toEqual(true); + expect($('#emptycontent').hasClass('hidden')).toEqual(false); + expect($('#emptycontent .uploadmessage').hasClass('hidden')).toEqual(true); expect(fileList.$el.find('.summary').hasClass('hidden')).toEqual(true); }); it('calling findFileEl() can find existing file element', function() { diff --git a/apps/files_external/appinfo/routes.php b/apps/files_external/appinfo/routes.php index 31f82087786..8c6dff7a901 100644 --- a/apps/files_external/appinfo/routes.php +++ b/apps/files_external/appinfo/routes.php @@ -46,12 +46,6 @@ $application->registerRoutes( ) ); -// TODO: move these to app framework -$this->create('files_external_add_root_certificate', 'ajax/addRootCertificate.php') - ->actionInclude('files_external/ajax/addRootCertificate.php'); -$this->create('files_external_remove_root_certificate', 'ajax/removeRootCertificate.php') - ->actionInclude('files_external/ajax/removeRootCertificate.php'); - $this->create('files_external_dropbox', 'ajax/dropbox.php') ->actionInclude('files_external/ajax/dropbox.php'); $this->create('files_external_google', 'ajax/google.php') @@ -61,7 +55,7 @@ $this->create('files_external_google', 'ajax/google.php') $this->create('files_external_list_applicable', '/applicable') ->actionInclude('files_external/ajax/applicable.php'); -\OC_API::register('get', +\OCP\API::register('get', '/apps/files_external/api/v1/mounts', array('\OCA\Files\External\Api', 'getUserMounts'), 'files_external'); diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index 8b6a255db92..cd50ae8c530 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -44,7 +44,9 @@ OC.L10N.register( "URL" : "URL", "Secure https://" : "セキュア https://", "Public key" : "公開鍵", + "Storage with id \"%i\" not found" : "ストレージID \"%i\" が見つかりません", "Invalid mount point" : "無効なマウントポイント", + "Invalid storage backend \"%s\"" : "\"%s\" のストレージバックエンドが不正", "Access granted" : "アクセスは許可されました", "Error configuring Dropbox storage" : "Dropboxストレージの設定エラー", "Grant access" : "アクセスを許可", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index dbdd911cb96..81da7f57397 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -42,7 +42,9 @@ "URL" : "URL", "Secure https://" : "セキュア https://", "Public key" : "公開鍵", + "Storage with id \"%i\" not found" : "ストレージID \"%i\" が見つかりません", "Invalid mount point" : "無効なマウントポイント", + "Invalid storage backend \"%s\"" : "\"%s\" のストレージバックエンドが不正", "Access granted" : "アクセスは許可されました", "Error configuring Dropbox storage" : "Dropboxストレージの設定エラー", "Grant access" : "アクセスを許可", diff --git a/apps/files_external/l10n/uk.js b/apps/files_external/l10n/uk.js index 6580719f89f..d31efca661e 100644 --- a/apps/files_external/l10n/uk.js +++ b/apps/files_external/l10n/uk.js @@ -14,7 +14,7 @@ OC.L10N.register( "Secret" : "Секрет", "Bucket" : "Кошик", "Amazon S3 and compliant" : "Amazon S3 та сумісний", - "Access Key" : "Ключ доступа", + "Access Key" : "Ключ доступу", "Secret Key" : "Секретний ключ", "Hostname" : "Ім'я хоста", "Port" : "Порт", @@ -55,7 +55,7 @@ OC.L10N.register( "System" : "Система", "All users. Type to select user or group." : "Всі користувачі. Введіть ім'я користувача або групи.", "(group)" : "(група)", - "Saved" : "Збереженно", + "Saved" : "Збережено", "Generate keys" : "Створити ключі", "Error generating key pair" : "Помилка створення ключової пари", "<b>Note:</b> " : "<b>Примітка:</b>", diff --git a/apps/files_external/l10n/uk.json b/apps/files_external/l10n/uk.json index 3b3bab572f7..e8306c44580 100644 --- a/apps/files_external/l10n/uk.json +++ b/apps/files_external/l10n/uk.json @@ -12,7 +12,7 @@ "Secret" : "Секрет", "Bucket" : "Кошик", "Amazon S3 and compliant" : "Amazon S3 та сумісний", - "Access Key" : "Ключ доступа", + "Access Key" : "Ключ доступу", "Secret Key" : "Секретний ключ", "Hostname" : "Ім'я хоста", "Port" : "Порт", @@ -53,7 +53,7 @@ "System" : "Система", "All users. Type to select user or group." : "Всі користувачі. Введіть ім'я користувача або групи.", "(group)" : "(група)", - "Saved" : "Збереженно", + "Saved" : "Збережено", "Generate keys" : "Створити ключі", "Error generating key pair" : "Помилка створення ключової пари", "<b>Note:</b> " : "<b>Примітка:</b>", diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php index b685f635aea..78219f8f06e 100644 --- a/apps/files_external/lib/dropbox.php +++ b/apps/files_external/lib/dropbox.php @@ -77,7 +77,7 @@ class Dropbox extends \OC\Files\Storage\Common { * @return mixed directory contents if $list is true, file metadata if $list is * false, null if the file doesn't exist or "false" if the operation failed */ - private function getMetaData($path, $list = false) { + private function getDropBoxMetaData($path, $list = false) { $path = $this->root.$path; if ( ! $list && isset($this->metaData[$path])) { return $this->metaData[$path]; @@ -150,7 +150,7 @@ class Dropbox extends \OC\Files\Storage\Common { } public function opendir($path) { - $contents = $this->getMetaData($path, true); + $contents = $this->getDropBoxMetaData($path, true); if ($contents !== false) { $files = array(); foreach ($contents as $file) { @@ -163,7 +163,7 @@ class Dropbox extends \OC\Files\Storage\Common { } public function stat($path) { - $metaData = $this->getMetaData($path); + $metaData = $this->getDropBoxMetaData($path); if ($metaData) { $stat['size'] = $metaData['bytes']; $stat['atime'] = time(); @@ -177,7 +177,7 @@ class Dropbox extends \OC\Files\Storage\Common { if ($path == '' || $path == '/') { return 'dir'; } else { - $metaData = $this->getMetaData($path); + $metaData = $this->getDropBoxMetaData($path); if ($metaData) { if ($metaData['is_dir'] == 'true') { return 'dir'; @@ -193,7 +193,7 @@ class Dropbox extends \OC\Files\Storage\Common { if ($path == '' || $path == '/') { return true; } - if ($this->getMetaData($path)) { + if ($this->getDropBoxMetaData($path)) { return true; } return false; @@ -213,7 +213,7 @@ class Dropbox extends \OC\Files\Storage\Common { public function rename($path1, $path2) { try { // overwrite if target file exists and is not a directory - $destMetaData = $this->getMetaData($path2); + $destMetaData = $this->getDropBoxMetaData($path2); if (isset($destMetaData) && $destMetaData !== false && !$destMetaData['is_dir']) { $this->unlink($path2); } @@ -297,7 +297,7 @@ class Dropbox extends \OC\Files\Storage\Common { if ($this->filetype($path) == 'dir') { return 'httpd/unix-directory'; } else { - $metaData = $this->getMetaData($path); + $metaData = $this->getDropBoxMetaData($path); if ($metaData) { return $metaData['mime_type']; } diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 16f8727a510..9ac3a1f731a 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -26,6 +26,7 @@ namespace OCA\Files_Sharing\AppInfo; use OCA\Files_Sharing\Application; +use OCP\API; $application = new Application(); $application->registerRoutes($this, [ @@ -55,33 +56,33 @@ $this->create('sharing_external_test_remote', '/testremote') //TODO: SET: mail notification, waiting for PR #4689 to be accepted -\OC_API::register('get', +API::register('get', '/apps/files_sharing/api/v1/shares', array('\OCA\Files_Sharing\API\Local', 'getAllShares'), 'files_sharing'); -\OC_API::register('post', +API::register('post', '/apps/files_sharing/api/v1/shares', array('\OCA\Files_Sharing\API\Local', 'createShare'), 'files_sharing'); -\OC_API::register('get', +API::register('get', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'getShare'), 'files_sharing'); -\OC_API::register('put', +API::register('put', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'updateShare'), 'files_sharing'); -\OC_API::register('delete', +API::register('delete', '/apps/files_sharing/api/v1/shares/{id}', array('\OCA\Files_Sharing\API\Local', 'deleteShare'), 'files_sharing'); // Register with the capabilities API -\OC_API::register('get', +API::register('get', '/cloud/capabilities', array('OCA\Files_Sharing\Capabilities', 'getCapabilities'), - 'files_sharing', \OC_API::USER_AUTH); + 'files_sharing', API::USER_AUTH); diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index bec43a4fb57..41bfeba031f 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -150,6 +150,13 @@ OCA.Sharing.PublicApp = { return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec); }; + this.fileList.updateEmptyContent = function() { + this.$el.find('#emptycontent .uploadmessage').text( + t('files_sharing', 'You can upload into this folder') + ); + OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments); + }; + var file_upload_start = $('#file_upload_start'); file_upload_start.on('fileuploadadd', function (e, data) { var fileDirectory = ''; diff --git a/apps/files_sharing/l10n/et_EE.js b/apps/files_sharing/l10n/et_EE.js index 889811627f6..bbe0b020b42 100644 --- a/apps/files_sharing/l10n/et_EE.js +++ b/apps/files_sharing/l10n/et_EE.js @@ -25,6 +25,7 @@ OC.L10N.register( "This share is password-protected" : "See jagamine on parooliga kaitstud", "The password is wrong. Try again." : "Parool on vale. Proovi uuesti.", "Password" : "Parool", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", "Name" : "Nimi", "Share time" : "Jagamise aeg", "Sorry, this link doesn’t seem to work anymore." : "Vabandust, see link ei tundu enam toimivat.", diff --git a/apps/files_sharing/l10n/et_EE.json b/apps/files_sharing/l10n/et_EE.json index 63859ca4f90..3e36c3540fa 100644 --- a/apps/files_sharing/l10n/et_EE.json +++ b/apps/files_sharing/l10n/et_EE.json @@ -23,6 +23,7 @@ "This share is password-protected" : "See jagamine on parooliga kaitstud", "The password is wrong. Try again." : "Parool on vale. Proovi uuesti.", "Password" : "Parool", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", "Name" : "Nimi", "Share time" : "Jagamise aeg", "Sorry, this link doesn’t seem to work anymore." : "Vabandust, see link ei tundu enam toimivat.", diff --git a/apps/files_sharing/l10n/ko.js b/apps/files_sharing/l10n/ko.js index cfabc03d48d..4d94b883890 100644 --- a/apps/files_sharing/l10n/ko.js +++ b/apps/files_sharing/l10n/ko.js @@ -56,6 +56,7 @@ OC.L10N.register( "Download %s" : "%s 다운로드", "Direct link" : "직접 링크", "Federated Cloud Sharing" : "클라우드 연합 공유", + "Open documentation" : "문서 열기", "Allow users on this server to send shares to other servers" : "이 서버의 사용자가 다른 서버와 공유할 수 있도록 허용", "Allow users on this server to receive shares from other servers" : "이 서버의 사용자가 다른 서버에서 공유한 파일을 받을 수 있도록 허용" }, diff --git a/apps/files_sharing/l10n/ko.json b/apps/files_sharing/l10n/ko.json index 4c88707e124..cc0e793977d 100644 --- a/apps/files_sharing/l10n/ko.json +++ b/apps/files_sharing/l10n/ko.json @@ -54,6 +54,7 @@ "Download %s" : "%s 다운로드", "Direct link" : "직접 링크", "Federated Cloud Sharing" : "클라우드 연합 공유", + "Open documentation" : "문서 열기", "Allow users on this server to send shares to other servers" : "이 서버의 사용자가 다른 서버와 공유할 수 있도록 허용", "Allow users on this server to receive shares from other servers" : "이 서버의 사용자가 다른 서버에서 공유한 파일을 받을 수 있도록 허용" },"pluralForm" :"nplurals=1; plural=0;" diff --git a/apps/files_sharing/l10n/uk.js b/apps/files_sharing/l10n/uk.js index 657954a5de5..5561d011710 100644 --- a/apps/files_sharing/l10n/uk.js +++ b/apps/files_sharing/l10n/uk.js @@ -56,6 +56,7 @@ OC.L10N.register( "Download %s" : "Завантажити %s", "Direct link" : "Пряме посилання", "Federated Cloud Sharing" : "Об’єднання хмарних сховищ", + "Open documentation" : "Відкрити документацію", "Allow users on this server to send shares to other servers" : "Дозволити користувачам цього сервера публікувати на інших серверах", "Allow users on this server to receive shares from other servers" : "Дозволити користувачам на цьому сервері отримувати публікації з інших серверів" }, diff --git a/apps/files_sharing/l10n/uk.json b/apps/files_sharing/l10n/uk.json index d4fb8c7dfe5..13f2ac4fc6a 100644 --- a/apps/files_sharing/l10n/uk.json +++ b/apps/files_sharing/l10n/uk.json @@ -54,6 +54,7 @@ "Download %s" : "Завантажити %s", "Direct link" : "Пряме посилання", "Federated Cloud Sharing" : "Об’єднання хмарних сховищ", + "Open documentation" : "Відкрити документацію", "Allow users on this server to send shares to other servers" : "Дозволити користувачам цього сервера публікувати на інших серверах", "Allow users on this server to receive shares from other servers" : "Дозволити користувачам на цьому сервері отримувати публікації з інших серверів" },"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);" diff --git a/apps/files_sharing/lib/readonlycache.php b/apps/files_sharing/lib/readonlycache.php index ebef1634757..c7640f896f4 100644 --- a/apps/files_sharing/lib/readonlycache.php +++ b/apps/files_sharing/lib/readonlycache.php @@ -28,7 +28,9 @@ use OC\Files\Cache\Cache; class ReadOnlyCache extends Cache { public function get($path) { $data = parent::get($path); - $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE); + if ($data !== false) { + $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE); + } return $data; } diff --git a/apps/files_sharing/tests/readonlycache.php b/apps/files_sharing/tests/readonlycache.php new file mode 100644 index 00000000000..5da200fa78f --- /dev/null +++ b/apps/files_sharing/tests/readonlycache.php @@ -0,0 +1,93 @@ +<?php +/** + * @author Olivier Paroz <owncloud@interfasys.ch> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\Files_Sharing\Tests; + +class ReadOnlyCache extends TestCase { + + /** @var \OC\Files\Storage\Storage */ + protected $storage; + + /** @var \OC\Files\Storage\StorageFactory */ + protected $loader; + + /** @var \OC\Files\Mount\MountPoint */ + protected $readOnlyMount; + + /** @var \OCA\Files_Sharing\ReadOnlyWrapper */ + protected $readOnlyStorage; + + /** @var \OC\Files\Cache\Cache */ + protected $readOnlyCache; + + protected function setUp() { + parent::setUp(); + + $this->view->mkdir('readonly'); + $this->view->file_put_contents('readonly/foo.txt', 'foo'); + $this->view->file_put_contents('readonly/bar.txt', 'bar'); + + list($this->storage) = $this->view->resolvePath(''); + $this->loader = new \OC\Files\Storage\StorageFactory(); + $this->readOnlyMount = new \OC\Files\Mount\MountPoint($this->storage, + '/readonly', [[]], $this->loader); + $this->readOnlyStorage = $this->loader->getInstance($this->readOnlyMount, + '\OCA\Files_Sharing\ReadOnlyWrapper', ['storage' => $this->storage]); + + $this->readOnlyCache = $this->readOnlyStorage->getCache(); + } + + public function testSetup() { + $this->assertTrue($this->view->file_exists('/readonly/foo.txt')); + + $perms = $this->readOnlyStorage->getPermissions('files/readonly/foo.txt'); + $this->assertEquals(17, $perms); + + $this->assertFalse($this->readOnlyStorage->unlink('files/readonly/foo.txt')); + $this->assertTrue($this->readOnlyStorage->file_exists('files/readonly/foo.txt')); + + $this->assertInstanceOf('\OCA\Files_Sharing\ReadOnlyCache', $this->readOnlyCache); + } + + public function testGetWhenFileExists() { + $result = $this->readOnlyCache->get('files/readonly/foo.txt'); + $this->assertNotEmpty($result); + } + + public function testGetWhenFileDoesNotExist() { + $result = $this->readOnlyCache->get('files/readonly/proof does not exist.md'); + $this->assertFalse($result); + } + + public function testGetFolderContentsWhenFolderExists() { + $results = $this->readOnlyCache->getFolderContents('files/readonly'); + $this->assertNotEmpty($results); + + foreach ($results as $result) { + $this->assertNotEmpty($result); + } + } + + public function testGetFolderContentsWhenFolderDoesNotExist() { + $results = $this->readOnlyCache->getFolderContents('files/iamaghost'); + $this->assertEmpty($results); + } + +} diff --git a/apps/files_trashbin/appinfo/routes.php b/apps/files_trashbin/appinfo/routes.php index 05b082002a5..526ad1d4e35 100644 --- a/apps/files_trashbin/appinfo/routes.php +++ b/apps/files_trashbin/appinfo/routes.php @@ -34,4 +34,4 @@ $this->create('files_trashbin_ajax_undelete', 'ajax/undelete.php') // Register with the capabilities API -\OC_API::register('get', '/cloud/capabilities', array('OCA\Files_Trashbin\Capabilities', 'getCapabilities'), 'files_trashbin', \OC_API::USER_AUTH); +\OCP\API::register('get', '/cloud/capabilities', array('OCA\Files_Trashbin\Capabilities', 'getCapabilities'), 'files_trashbin', \OCP\API::USER_AUTH); diff --git a/apps/files_trashbin/l10n/et_EE.js b/apps/files_trashbin/l10n/et_EE.js index 58da11098a7..6ffc04efadb 100644 --- a/apps/files_trashbin/l10n/et_EE.js +++ b/apps/files_trashbin/l10n/et_EE.js @@ -8,6 +8,8 @@ OC.L10N.register( "Delete permanently" : "Kustuta jäädavalt", "Error" : "Viga", "restored" : "taastatud", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", + "Select all" : "Vali kõik", "Name" : "Nimi", "Deleted" : "Kustutatud", "Delete" : "Kustuta" diff --git a/apps/files_trashbin/l10n/et_EE.json b/apps/files_trashbin/l10n/et_EE.json index 6f5a83792b7..c5c55a520f7 100644 --- a/apps/files_trashbin/l10n/et_EE.json +++ b/apps/files_trashbin/l10n/et_EE.json @@ -6,6 +6,8 @@ "Delete permanently" : "Kustuta jäädavalt", "Error" : "Viga", "restored" : "taastatud", + "No entries found in this folder" : "Selles kaustas ei leitud kirjeid", + "Select all" : "Vali kõik", "Name" : "Nimi", "Deleted" : "Kustutatud", "Delete" : "Kustuta" diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 9a9bd5bd655..0ea37d3b1b1 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -38,4 +38,4 @@ $this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php') ->actionInclude('files_versions/ajax/rollbackVersion.php'); // Register with the capabilities API -OC_API::register('get', '/cloud/capabilities', array('OCA\Files_Versions\Capabilities', 'getCapabilities'), 'files_versions', OC_API::USER_AUTH); +\OCP\API::register('get', '/cloud/capabilities', array('OCA\Files_Versions\Capabilities', 'getCapabilities'), 'files_versions', \OCP\API::USER_AUTH); diff --git a/apps/provisioning_api/appinfo/routes.php b/apps/provisioning_api/appinfo/routes.php index 756822bc7e1..87f073f82b0 100644 --- a/apps/provisioning_api/appinfo/routes.php +++ b/apps/provisioning_api/appinfo/routes.php @@ -21,27 +21,29 @@ */ // Users -OCP\API::register('get', '/cloud/users', array('OCA\Provisioning_API\Users', 'getUsers'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('post', '/cloud/users', array('OCA\Provisioning_API\Users', 'addUser'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('get', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'getUser'), 'provisioning_api', OC_API::USER_AUTH); -OCP\API::register('put', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'editUser'), 'provisioning_api', OC_API::USER_AUTH); -OCP\API::register('delete', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'deleteUser'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('get', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'getUsersGroups'), 'provisioning_api', OC_API::USER_AUTH); -OCP\API::register('post', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'addToGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('delete', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'removeFromGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('post', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'addSubAdmin'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('delete', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'removeSubAdmin'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('get', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'getUserSubAdminGroups'), 'provisioning_api', OC_API::ADMIN_AUTH); +use OCP\API; + +API::register('get', '/cloud/users', array('OCA\Provisioning_API\Users', 'getUsers'), 'provisioning_api', API::ADMIN_AUTH); +API::register('post', '/cloud/users', array('OCA\Provisioning_API\Users', 'addUser'), 'provisioning_api', API::ADMIN_AUTH); +API::register('get', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'getUser'), 'provisioning_api', API::USER_AUTH); +API::register('put', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'editUser'), 'provisioning_api', API::USER_AUTH); +API::register('delete', '/cloud/users/{userid}', array('OCA\Provisioning_API\Users', 'deleteUser'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('get', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'getUsersGroups'), 'provisioning_api', API::USER_AUTH); +API::register('post', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'addToGroup'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('delete', '/cloud/users/{userid}/groups', array('OCA\Provisioning_API\Users', 'removeFromGroup'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('post', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'addSubAdmin'), 'provisioning_api', API::ADMIN_AUTH); +API::register('delete', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'removeSubAdmin'), 'provisioning_api', API::ADMIN_AUTH); +API::register('get', '/cloud/users/{userid}/subadmins', array('OCA\Provisioning_API\Users', 'getUserSubAdminGroups'), 'provisioning_api', API::ADMIN_AUTH); // Groups -OCP\API::register('get', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'getGroups'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('post', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'addGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('get', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'getGroup'), 'provisioning_api', OC_API::SUBADMIN_AUTH); -OCP\API::register('delete', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'deleteGroup'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('get', '/cloud/groups/{groupid}/subadmins', array('OCA\Provisioning_API\Groups', 'getSubAdminsOfGroup'), 'provisioning_api', OC_API::ADMIN_AUTH); +API::register('get', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'getGroups'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('post', '/cloud/groups', array('OCA\Provisioning_API\Groups', 'addGroup'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('get', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'getGroup'), 'provisioning_api', API::SUBADMIN_AUTH); +API::register('delete', '/cloud/groups/{groupid}', array('OCA\Provisioning_API\Groups', 'deleteGroup'), 'provisioning_api', API::ADMIN_AUTH); +API::register('get', '/cloud/groups/{groupid}/subadmins', array('OCA\Provisioning_API\Groups', 'getSubAdminsOfGroup'), 'provisioning_api', API::ADMIN_AUTH); // Apps -OCP\API::register('get', '/cloud/apps', array('OCA\Provisioning_API\Apps', 'getApps'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('get', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'getAppInfo'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('post', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'enable'), 'provisioning_api', OC_API::ADMIN_AUTH); -OCP\API::register('delete', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'disable'), 'provisioning_api', OC_API::ADMIN_AUTH); +API::register('get', '/cloud/apps', array('OCA\Provisioning_API\Apps', 'getApps'), 'provisioning_api', API::ADMIN_AUTH); +API::register('get', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'getAppInfo'), 'provisioning_api', API::ADMIN_AUTH); +API::register('post', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'enable'), 'provisioning_api', API::ADMIN_AUTH); +API::register('delete', '/cloud/apps/{appid}', array('OCA\Provisioning_API\Apps', 'disable'), 'provisioning_api', API::ADMIN_AUTH); diff --git a/apps/provisioning_api/lib/apps.php b/apps/provisioning_api/lib/apps.php index c1abb772e41..2bafd06a084 100644 --- a/apps/provisioning_api/lib/apps.php +++ b/apps/provisioning_api/lib/apps.php @@ -60,7 +60,7 @@ class Apps { if(!is_null($info)) { return new OC_OCS_Result(OC_App::getAppInfo($app)); } else { - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The request app was not found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found'); } } diff --git a/apps/provisioning_api/lib/groups.php b/apps/provisioning_api/lib/groups.php index 4a5a69216c4..cd156110635 100644 --- a/apps/provisioning_api/lib/groups.php +++ b/apps/provisioning_api/lib/groups.php @@ -44,14 +44,14 @@ class Groups{ public static function getGroup($parameters){ // Check the group exists if(!OC_Group::groupExists($parameters['groupid'])){ - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The requested group could not be found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The requested group could not be found'); } // Check subadmin has access to this group if(\OC_User::isAdminUser(\OC_User::getUser()) || in_array($parameters['groupid'], \OC_SubAdmin::getSubAdminsGroups(\OC_User::getUser()))){ return new OC_OCS_Result(array('users' => OC_Group::usersInGroup($parameters['groupid']))); } else { - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED, 'User does not have access to specified group'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'User does not have access to specified group'); } } diff --git a/apps/provisioning_api/lib/users.php b/apps/provisioning_api/lib/users.php index 6169ea16f9c..505a141c032 100644 --- a/apps/provisioning_api/lib/users.php +++ b/apps/provisioning_api/lib/users.php @@ -67,7 +67,7 @@ class Users { if(OC_User::isAdminUser(OC_User::getUser()) || OC_SubAdmin::isUserAccessible(OC_User::getUser(), $userId)) { // Check they exist if(!OC_User::userExists($userId)) { - return new OC_OCS_Result(null, \OC_API::RESPOND_NOT_FOUND, 'The requested user could not be found'); + return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The requested user could not be found'); } // Show all $return = array( @@ -80,7 +80,7 @@ class Users { } else { // Check they are looking up themselves if(OC_User::getUser() != $userId) { - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED); } // Return some additional information compared to the core route $return = array( @@ -226,7 +226,7 @@ class Users { // Check they're an admin if(!OC_Group::inGroup(OC_User::getUser(), 'admin')){ // This user doesn't have rights to add a user to this group - return new OC_OCS_Result(null, \OC_API::RESPOND_UNAUTHORISED); + return new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED); } // Check if the group exists if(!OC_Group::groupExists($group)){ diff --git a/apps/provisioning_api/tests/appstest.php b/apps/provisioning_api/tests/appstest.php index b2b5748ea27..140dd287a0e 100644 --- a/apps/provisioning_api/tests/appstest.php +++ b/apps/provisioning_api/tests/appstest.php @@ -36,7 +36,7 @@ class AppsTest extends TestCase { $result = \OCA\provisioning_API\Apps::getAppInfo(array('appid' => 'not_provisioning_api')); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OC_API::RESPOND_NOT_FOUND, $result->getStatusCode()); + $this->assertEquals(\OCP\API::RESPOND_NOT_FOUND, $result->getStatusCode()); } diff --git a/apps/provisioning_api/tests/groupstest.php b/apps/provisioning_api/tests/groupstest.php index 7c5343af46d..94bde52c392 100644 --- a/apps/provisioning_api/tests/groupstest.php +++ b/apps/provisioning_api/tests/groupstest.php @@ -39,7 +39,7 @@ class GroupsTest extends TestCase { $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OC_API::RESPOND_UNAUTHORISED, $result->getStatusCode()); + $this->assertEquals(\OCP\API::RESPOND_UNAUTHORISED, $result->getStatusCode()); } @@ -92,7 +92,7 @@ class GroupsTest extends TestCase { $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OC_API::RESPOND_UNAUTHORISED, $result->getStatusCode()); + $this->assertEquals(\OCP\API::RESPOND_UNAUTHORISED, $result->getStatusCode()); } diff --git a/apps/provisioning_api/tests/userstest.php b/apps/provisioning_api/tests/userstest.php index f06f853ee1f..b7e83a3c4fe 100644 --- a/apps/provisioning_api/tests/userstest.php +++ b/apps/provisioning_api/tests/userstest.php @@ -101,7 +101,7 @@ class UsersTest extends TestCase { $result = \OCA\provisioning_API\Users::getUser($params); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OC_API::RESPOND_NOT_FOUND, $result->getStatusCode()); + $this->assertEquals(\OCP\API::RESPOND_NOT_FOUND, $result->getStatusCode()); } diff --git a/apps/user_ldap/css/settings.css b/apps/user_ldap/css/settings.css index b351f9ae2af..8648246247d 100644 --- a/apps/user_ldap/css/settings.css +++ b/apps/user_ldap/css/settings.css @@ -66,7 +66,6 @@ width: 100%; margin-left: 0; margin-right: 0; - border: 0; } .tableCellInput { diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 7695ba06388..8f56e01bf3d 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -746,6 +746,6 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { * compared with OC_USER_BACKEND_CREATE_USER etc. */ public function implementsActions($actions) { - return (bool)(OC_GROUP_BACKEND_COUNT_USERS & $actions); + return (bool)(\OC_Group_Backend::COUNT_USERS & $actions); } } diff --git a/apps/user_ldap/l10n/cs_CZ.js b/apps/user_ldap/l10n/cs_CZ.js index 1b0daba6559..98c3312f665 100644 --- a/apps/user_ldap/l10n/cs_CZ.js +++ b/apps/user_ldap/l10n/cs_CZ.js @@ -10,14 +10,26 @@ OC.L10N.register( "No configuration specified" : "Neurčena žádná konfigurace", "No data specified" : "Neurčena žádná data", " Could not set configuration %s" : "Nelze nastavit konfiguraci %s", + "Action does not exist" : "Tato akce neexistuje", "Configuration incorrect" : "Nesprávná konfigurace", "Configuration incomplete" : "Nekompletní konfigurace", "Configuration OK" : "Konfigurace v pořádku", "Select groups" : "Vyberte skupiny", "Select object classes" : "Vyberte objektové třídy", + "Please check the credentials, they seem to be wrong." : "Ověřte své přihlašovací údaje, zdají se být neplatné.", + "Please specify the port, it could not be auto-detected." : "Uveďte prosím port, nelze ho automaticky detekovat.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Base DN nelze automaticky detekovat, ověřte prosím přihlašovací údaje, host a port.", + "Could not detect Base DN, please enter it manually." : "Nelze automaticky detekovat Base DN, zadejte prosím ručně.", "{nthServer}. Server" : "{nthServer}. Server", + "No object found in the given Base DN. Please revise." : "V zadané Base DN nebyl objekt nalezen. Ověřte.", + "More then 1.000 directory entries available." : "Je dostupných více než 1000 adresářových záznamů.", + " entries available within the provided Base DN" : "záznamů dostupných v zadané Base DN", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Došlo k chybě. Ověře prosím Base DN společně s nastavením připojení a přihlašovacími údaji.", "Do you really want to delete the current Server Configuration?" : "Opravdu si přejete smazat současné nastavení serveru?", "Confirm Deletion" : "Potvrdit smazání", + "Mappings cleared successfully!" : "Mapování úspěšně vyčištěno!", + "Error while clearing the mappings." : "Chyba při čištění mapování.", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Ukládání selhalo. Ujistěte se, že databáze funguje. Načtěte znovu, než budete pokračovat.", "Select attributes" : "Vyberte atributy", "_%s group found_::_%s groups found_" : ["nalezena %s skupina","nalezeny %s skupiny","nalezeno %s skupin"], "_%s user found_::_%s users found_" : ["nalezen %s uživatel","nalezeni %s uživatelé","nalezeno %s uživatelů"], diff --git a/apps/user_ldap/l10n/cs_CZ.json b/apps/user_ldap/l10n/cs_CZ.json index 44f27988475..be8caeb0c08 100644 --- a/apps/user_ldap/l10n/cs_CZ.json +++ b/apps/user_ldap/l10n/cs_CZ.json @@ -8,14 +8,26 @@ "No configuration specified" : "Neurčena žádná konfigurace", "No data specified" : "Neurčena žádná data", " Could not set configuration %s" : "Nelze nastavit konfiguraci %s", + "Action does not exist" : "Tato akce neexistuje", "Configuration incorrect" : "Nesprávná konfigurace", "Configuration incomplete" : "Nekompletní konfigurace", "Configuration OK" : "Konfigurace v pořádku", "Select groups" : "Vyberte skupiny", "Select object classes" : "Vyberte objektové třídy", + "Please check the credentials, they seem to be wrong." : "Ověřte své přihlašovací údaje, zdají se být neplatné.", + "Please specify the port, it could not be auto-detected." : "Uveďte prosím port, nelze ho automaticky detekovat.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Base DN nelze automaticky detekovat, ověřte prosím přihlašovací údaje, host a port.", + "Could not detect Base DN, please enter it manually." : "Nelze automaticky detekovat Base DN, zadejte prosím ručně.", "{nthServer}. Server" : "{nthServer}. Server", + "No object found in the given Base DN. Please revise." : "V zadané Base DN nebyl objekt nalezen. Ověřte.", + "More then 1.000 directory entries available." : "Je dostupných více než 1000 adresářových záznamů.", + " entries available within the provided Base DN" : "záznamů dostupných v zadané Base DN", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Došlo k chybě. Ověře prosím Base DN společně s nastavením připojení a přihlašovacími údaji.", "Do you really want to delete the current Server Configuration?" : "Opravdu si přejete smazat současné nastavení serveru?", "Confirm Deletion" : "Potvrdit smazání", + "Mappings cleared successfully!" : "Mapování úspěšně vyčištěno!", + "Error while clearing the mappings." : "Chyba při čištění mapování.", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Ukládání selhalo. Ujistěte se, že databáze funguje. Načtěte znovu, než budete pokračovat.", "Select attributes" : "Vyberte atributy", "_%s group found_::_%s groups found_" : ["nalezena %s skupina","nalezeny %s skupiny","nalezeno %s skupin"], "_%s user found_::_%s users found_" : ["nalezen %s uživatel","nalezeni %s uživatelé","nalezeno %s uživatelů"], diff --git a/apps/user_ldap/l10n/it.js b/apps/user_ldap/l10n/it.js index 1b05a903b32..6b381f72e76 100644 --- a/apps/user_ldap/l10n/it.js +++ b/apps/user_ldap/l10n/it.js @@ -18,13 +18,28 @@ OC.L10N.register( "Select object classes" : "Seleziona le classi di oggetti", "Please check the credentials, they seem to be wrong." : "Controlla le credenziali, sembrano essere errate.", "Please specify the port, it could not be auto-detected." : "Specifica la porta, potrebbe non essere rilevata automaticamente.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Il DN base non può essere rilevato automaticamente, controlla le credenziali, l'host e la porta.", "Could not detect Base DN, please enter it manually." : "Impossibile rilevare il DN base, digitalo manualmente.", "{nthServer}. Server" : "{nthServer}. server", + "No object found in the given Base DN. Please revise." : "Nessun oggetto trovato nel DN base specificato. Controlla.", "More then 1.000 directory entries available." : "Più di 1.000 cartelle disponibili.", + " entries available within the provided Base DN" : "voci disponibili all'interno del DN base", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Si è verificato un errore. Controlla il DN base, così come le impostazioni di connessione e le credenziali.", "Do you really want to delete the current Server Configuration?" : "Vuoi davvero eliminare la configurazione attuale del server?", "Confirm Deletion" : "Conferma l'eliminazione", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Salvataggio non riuscito. Assicurati che il database sia operativo. Ricarica prima di continuare.", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "Il cambio di modalità abiliterà le query LDAP automatiche. In base alla dimensione di LDAP, potrebbero richiedere del tempo. Vuoi ancora cambiare modalità?", + "Mode switch" : "Cambio modalità", "Select attributes" : "Seleziona gli attributi", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Utente non trovato. Controlla i tuoi attributi di accesso e il nome utente.\nFiltro effettivo (copiare e incollare per la convalida della riga di comando):<br/>", "User found and settings verified." : "Utente trovato e impostazioni verificate.", + "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Le impostazioni sono state verificate, ma è stato trovato un utente. Solo il primo sarà in grado di accedere. Considera un filtro più restrittivo.", + "An unspecified error occurred. Please check the settings and the log." : "Si è non specificato un errore sconosciuto. Controlla le impostazioni e il file di log.", + "The search filter is invalid, probably due to syntax issues like uneven number of opened and closed brackets. Please revise." : "Il filtro di ricerca non è valido, probabilmente a causa di problemi di sintassi come un numero dispari di parentesi aperte e chiuse. Controlla.", + "A connection error to LDAP / AD occurred, please check host, port and credentials." : "Si è verificato un errore di connessione a LDAP / AD, controlla l'host, la porta e le credenziali.", + "The %uid placeholder is missing. It will be replaced with the login name when querying LDAP / AD." : "Manca il segnaposto %uid. Sarà sostituito con il nome di accesso nelle query a LDAP / AD.", + "Please provide a login name to test against" : "Fornisci un nome di accesso da provare", + "The group box was disabled, because the LDAP / AD server does not support memberOf." : "La casella dei gruppi è stata disabilitata, poiché il server LDAP / AD non supporta memberOf.", "_%s group found_::_%s groups found_" : ["%s gruppo trovato","%s gruppi trovati"], "_%s user found_::_%s users found_" : ["%s utente trovato","%s utenti trovati"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossibile rilevare l'attributo nome visualizzato dell'utente. Specificalo nelle impostazioni avanzate di ldap.", @@ -47,10 +62,14 @@ OC.L10N.register( "The filter specifies which LDAP groups shall have access to the %s instance." : "Il filtro specifica quali gruppi LDAP devono avere accesso all'istanza %s.", "Test Filter" : "Prova filtro", "Verify settings and count groups" : "Verifica le impostazioni e conta i gruppi", + "When logging in, %s will find the user based on the following attributes:" : "Quando accedi, %s troverà l'utente sulla base dei seguenti attributi:", "LDAP / AD Username:" : "Nome utente LDAP / AD:", + "Allows login against the LDAP / AD username, which is either uid or samaccountname and will be detected." : "Consente l'accesso tramite il nome utente LDAP / AD, può essere sia uid o samaccountname e sarà rilevato.", "LDAP / AD Email Address:" : "Indirizzo email LDAP / AD:", + "Allows login against an email attribute. Mail and mailPrimaryAddress will be allowed." : "Consente l'accesso tramite l'attributo email. Mail e mailPrimaryAddress saranno consentiti.", "Other Attributes:" : "Altri attributi:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Specifica quale filtro utilizzare quando si tenta l'accesso. %%uid sostituisce il nome utente all'atto dell'accesso. Esempio: \"uid=%%uid\"", + "Test Loginname" : "Prova nome di accesso", "Verify settings" : "Verifica impostazioni", "1. Server" : "1. server", "%s. Server:" : "%s. server:", @@ -64,10 +83,12 @@ OC.L10N.register( "For anonymous access, leave DN and Password empty." : "Per l'accesso anonimo, lasciare vuoti i campi DN e Password", "One Base DN per line" : "Un DN base per riga", "You can specify Base DN for users and groups in the Advanced tab" : "Puoi specificare una DN base per gli utenti ed i gruppi nella scheda Avanzate", + "Detect Base DN" : "Rileva DN base", "Test Base DN" : "Rileva DN base", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Impedisce le richieste LDAP automatiche. Meglio per installazioni più grandi, ma richiede una certa conoscenza di LDAP.", "Manually enter LDAP filters (recommended for large directories)" : "Digita manualmente i filtri LDAP (consigliato per directory grandi)", "Limit %s access to users meeting these criteria:" : "Limita l'accesso a %s ai gruppi che verificano questi criteri:", + "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Le classi di oggetti più comuni per gli utenti sono organizationalPerson, person, user, e inetOrgPerson. Se non sei sicuro su quale classe di oggetti selezionare, consulta l'amministratore della tua directory.", "The filter specifies which LDAP users shall have access to the %s instance." : "Il filtro specifica quali utenti LDAP devono avere accesso all'istanza %s.", "Verify settings and count users" : "Verifica le impostazioni e conta gli utenti", "Saving" : "Salvataggio", diff --git a/apps/user_ldap/l10n/it.json b/apps/user_ldap/l10n/it.json index 495275a438d..534c60a50a8 100644 --- a/apps/user_ldap/l10n/it.json +++ b/apps/user_ldap/l10n/it.json @@ -16,13 +16,28 @@ "Select object classes" : "Seleziona le classi di oggetti", "Please check the credentials, they seem to be wrong." : "Controlla le credenziali, sembrano essere errate.", "Please specify the port, it could not be auto-detected." : "Specifica la porta, potrebbe non essere rilevata automaticamente.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Il DN base non può essere rilevato automaticamente, controlla le credenziali, l'host e la porta.", "Could not detect Base DN, please enter it manually." : "Impossibile rilevare il DN base, digitalo manualmente.", "{nthServer}. Server" : "{nthServer}. server", + "No object found in the given Base DN. Please revise." : "Nessun oggetto trovato nel DN base specificato. Controlla.", "More then 1.000 directory entries available." : "Più di 1.000 cartelle disponibili.", + " entries available within the provided Base DN" : "voci disponibili all'interno del DN base", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Si è verificato un errore. Controlla il DN base, così come le impostazioni di connessione e le credenziali.", "Do you really want to delete the current Server Configuration?" : "Vuoi davvero eliminare la configurazione attuale del server?", "Confirm Deletion" : "Conferma l'eliminazione", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Salvataggio non riuscito. Assicurati che il database sia operativo. Ricarica prima di continuare.", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "Il cambio di modalità abiliterà le query LDAP automatiche. In base alla dimensione di LDAP, potrebbero richiedere del tempo. Vuoi ancora cambiare modalità?", + "Mode switch" : "Cambio modalità", "Select attributes" : "Seleziona gli attributi", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Utente non trovato. Controlla i tuoi attributi di accesso e il nome utente.\nFiltro effettivo (copiare e incollare per la convalida della riga di comando):<br/>", "User found and settings verified." : "Utente trovato e impostazioni verificate.", + "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Le impostazioni sono state verificate, ma è stato trovato un utente. Solo il primo sarà in grado di accedere. Considera un filtro più restrittivo.", + "An unspecified error occurred. Please check the settings and the log." : "Si è non specificato un errore sconosciuto. Controlla le impostazioni e il file di log.", + "The search filter is invalid, probably due to syntax issues like uneven number of opened and closed brackets. Please revise." : "Il filtro di ricerca non è valido, probabilmente a causa di problemi di sintassi come un numero dispari di parentesi aperte e chiuse. Controlla.", + "A connection error to LDAP / AD occurred, please check host, port and credentials." : "Si è verificato un errore di connessione a LDAP / AD, controlla l'host, la porta e le credenziali.", + "The %uid placeholder is missing. It will be replaced with the login name when querying LDAP / AD." : "Manca il segnaposto %uid. Sarà sostituito con il nome di accesso nelle query a LDAP / AD.", + "Please provide a login name to test against" : "Fornisci un nome di accesso da provare", + "The group box was disabled, because the LDAP / AD server does not support memberOf." : "La casella dei gruppi è stata disabilitata, poiché il server LDAP / AD non supporta memberOf.", "_%s group found_::_%s groups found_" : ["%s gruppo trovato","%s gruppi trovati"], "_%s user found_::_%s users found_" : ["%s utente trovato","%s utenti trovati"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Impossibile rilevare l'attributo nome visualizzato dell'utente. Specificalo nelle impostazioni avanzate di ldap.", @@ -45,10 +60,14 @@ "The filter specifies which LDAP groups shall have access to the %s instance." : "Il filtro specifica quali gruppi LDAP devono avere accesso all'istanza %s.", "Test Filter" : "Prova filtro", "Verify settings and count groups" : "Verifica le impostazioni e conta i gruppi", + "When logging in, %s will find the user based on the following attributes:" : "Quando accedi, %s troverà l'utente sulla base dei seguenti attributi:", "LDAP / AD Username:" : "Nome utente LDAP / AD:", + "Allows login against the LDAP / AD username, which is either uid or samaccountname and will be detected." : "Consente l'accesso tramite il nome utente LDAP / AD, può essere sia uid o samaccountname e sarà rilevato.", "LDAP / AD Email Address:" : "Indirizzo email LDAP / AD:", + "Allows login against an email attribute. Mail and mailPrimaryAddress will be allowed." : "Consente l'accesso tramite l'attributo email. Mail e mailPrimaryAddress saranno consentiti.", "Other Attributes:" : "Altri attributi:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Specifica quale filtro utilizzare quando si tenta l'accesso. %%uid sostituisce il nome utente all'atto dell'accesso. Esempio: \"uid=%%uid\"", + "Test Loginname" : "Prova nome di accesso", "Verify settings" : "Verifica impostazioni", "1. Server" : "1. server", "%s. Server:" : "%s. server:", @@ -62,10 +81,12 @@ "For anonymous access, leave DN and Password empty." : "Per l'accesso anonimo, lasciare vuoti i campi DN e Password", "One Base DN per line" : "Un DN base per riga", "You can specify Base DN for users and groups in the Advanced tab" : "Puoi specificare una DN base per gli utenti ed i gruppi nella scheda Avanzate", + "Detect Base DN" : "Rileva DN base", "Test Base DN" : "Rileva DN base", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Impedisce le richieste LDAP automatiche. Meglio per installazioni più grandi, ma richiede una certa conoscenza di LDAP.", "Manually enter LDAP filters (recommended for large directories)" : "Digita manualmente i filtri LDAP (consigliato per directory grandi)", "Limit %s access to users meeting these criteria:" : "Limita l'accesso a %s ai gruppi che verificano questi criteri:", + "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Le classi di oggetti più comuni per gli utenti sono organizationalPerson, person, user, e inetOrgPerson. Se non sei sicuro su quale classe di oggetti selezionare, consulta l'amministratore della tua directory.", "The filter specifies which LDAP users shall have access to the %s instance." : "Il filtro specifica quali utenti LDAP devono avere accesso all'istanza %s.", "Verify settings and count users" : "Verifica le impostazioni e conta gli utenti", "Saving" : "Salvataggio", diff --git a/apps/user_ldap/l10n/ja.js b/apps/user_ldap/l10n/ja.js index fd2ef9c9145..6dda509053a 100644 --- a/apps/user_ldap/l10n/ja.js +++ b/apps/user_ldap/l10n/ja.js @@ -30,8 +30,11 @@ OC.L10N.register( "Test Configuration" : "設定をテスト", "Help" : "ヘルプ", "Groups meeting these criteria are available in %s:" : "これらの基準を満たすグループが %s で利用可能:", + "LDAP Filter:" : "LDAP フィルタ:", "The filter specifies which LDAP groups shall have access to the %s instance." : "フィルターは、どの LDAP グループが %s にアクセスするかを指定します。", "Test Filter" : "フィルターをテスト", + "LDAP / AD Username:" : "LDAP / AD ユーザ名:", + "LDAP / AD Email Address:" : "LDAP / AD メールアドレス:", "Other Attributes:" : "その他の属性:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "ログイン実行時に適用するフィルターを定義します。%%uid にはログイン操作におけるユーザー名が入ります。例: \"uid=%%uid\"", "1. Server" : "1. Server", diff --git a/apps/user_ldap/l10n/ja.json b/apps/user_ldap/l10n/ja.json index 7117cb0ec17..d616a84e457 100644 --- a/apps/user_ldap/l10n/ja.json +++ b/apps/user_ldap/l10n/ja.json @@ -28,8 +28,11 @@ "Test Configuration" : "設定をテスト", "Help" : "ヘルプ", "Groups meeting these criteria are available in %s:" : "これらの基準を満たすグループが %s で利用可能:", + "LDAP Filter:" : "LDAP フィルタ:", "The filter specifies which LDAP groups shall have access to the %s instance." : "フィルターは、どの LDAP グループが %s にアクセスするかを指定します。", "Test Filter" : "フィルターをテスト", + "LDAP / AD Username:" : "LDAP / AD ユーザ名:", + "LDAP / AD Email Address:" : "LDAP / AD メールアドレス:", "Other Attributes:" : "その他の属性:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "ログイン実行時に適用するフィルターを定義します。%%uid にはログイン操作におけるユーザー名が入ります。例: \"uid=%%uid\"", "1. Server" : "1. Server", diff --git a/apps/user_ldap/l10n/nl.js b/apps/user_ldap/l10n/nl.js index 12fead8651a..43cf25d010a 100644 --- a/apps/user_ldap/l10n/nl.js +++ b/apps/user_ldap/l10n/nl.js @@ -10,15 +10,31 @@ OC.L10N.register( "No configuration specified" : "Geen configuratie opgegeven", "No data specified" : "Geen gegevens verstrekt", " Could not set configuration %s" : "Kon configuratie %s niet instellen", + "Action does not exist" : "Actie bestaat niet", "Configuration incorrect" : "Configuratie onjuist", "Configuration incomplete" : "Configuratie incompleet", "Configuration OK" : "Configuratie OK", "Select groups" : "Selecteer groepen", "Select object classes" : "Selecteer objectklasse", + "Please check the credentials, they seem to be wrong." : "Controleer de inloggegevens, ze lijken onjuist.", + "Please specify the port, it could not be auto-detected." : "Geef de poort op, die kon niet automatisch worden vastgesteld.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Basis DN kon niet automatisch worden vastgesteld, herstel inloggegevens, server en poort.", + "Could not detect Base DN, please enter it manually." : "Kon basis DN niet vaststellen, voer de gegevens handmatig in.", "{nthServer}. Server" : "{nthServer}. Server", + "No object found in the given Base DN. Please revise." : "Geen object gevonden in de basis DN. Review instellingen.", + "More then 1.000 directory entries available." : "Meer dan 1.000 directoryobjecten beschikbaar.", + " entries available within the provided Base DN" : "accounts beschikbaar binnen de provider Basis DN", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Er trad een fout op. Controleer de Basis DN en de verbindingsinstellingen en inloggegevens.", "Do you really want to delete the current Server Configuration?" : "Wilt u werkelijk de huidige Serverconfiguratie verwijderen?", "Confirm Deletion" : "Bevestig verwijderen", + "Mappings cleared successfully!" : "Mappings succesvol schoongemaakt!", + "Error while clearing the mappings." : "Fout bij opschonen mappings.", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Opslaan mislukt. Verifieer dat de database draait. Herlaad voordat u verder gaat.", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "Omschakelen van de modus schakelt automatische LDAP opvragingen in. Afhankelijk van uw LDAP omvang kan dat even duren. Wilt u nog steeds omschakelen?", + "Mode switch" : "Omschakelen modus", "Select attributes" : "Selecteer attributen", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Gebruiker niet gevonden. Verifieer de inloggegevens en gebruikersnaam. Effectief filter (kopiëren en plakken voor commandoregel validatie): <br/>", + "User found and settings verified." : "Gebruiker gevonden en instellingen geverifieerd.", "_%s group found_::_%s groups found_" : ["%s groep gevonden","%s groepen gevonden"], "_%s user found_::_%s users found_" : ["%s gebruiker gevonden","%s gebruikers gevonden"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kon het weergavenaam attribuut van de gebruiker niet vinden. Geef het zelf op in de geavanceerde ldap instellingen.", @@ -26,29 +42,45 @@ OC.L10N.register( "Invalid Host" : "Ongeldige server", "Server" : "Server", "Users" : "Gebruikers", + "Login Attributes" : "Inlogattributen", "Groups" : "Groepen", "Test Configuration" : "Test configuratie", "Help" : "Help", "Groups meeting these criteria are available in %s:" : "Groepsafspraken die voldoen aan deze criteria zijn beschikbaar in %s:", + "Only these object classes:" : "Alleen deze objectklassen:", + "Only from these groups:" : "Alleen van deze groepen:", + "Search groups" : "Zoeken groepen", + "Available groups" : "Beschikbare groepen", + "Selected groups" : "Geselecteerde groepen", + "Edit LDAP Query" : "Bewerken LDAP bevraging", + "LDAP Filter:" : "LDAP Filter:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Dit filter geeft aan welke LDAP groepen toegang hebben tot %s.", "Test Filter" : "Testfilter", + "LDAP / AD Username:" : "LDAP / AD gebruikersnaam:", + "LDAP / AD Email Address:" : "LDAP / AD e-mailadres:", "Other Attributes:" : "Overige attributen:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Definiëert het toe te passen filter als er geprobeerd wordt in te loggen. %%uid vervangt de gebruikersnaam bij het inloggen. Bijvoorbeeld: \"uid=%%uid\"", + "Test Loginname" : "Test inlognaam", + "Verify settings" : "Verifiëren instellingen", "1. Server" : "1. Server", "%s. Server:" : "%s. Server:", "Host" : "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" : "Je kunt het protocol weglaten, tenzij je SSL vereist. Start in dat geval met ldaps://", "Port" : "Poort", + "Detect Port" : "Detecteer poort", "User DN" : "User DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "De DN van de client gebruiker waarmee de verbinding zal worden gemaakt, bijv. uid=agent,dc=example,dc=com. Voor anonieme toegang laat je het DN en het wachtwoord leeg.", "Password" : "Wachtwoord", "For anonymous access, leave DN and Password empty." : "Voor anonieme toegang, laat de DN en het wachtwoord leeg.", "One Base DN per line" : "Een Base DN per regel", "You can specify Base DN for users and groups in the Advanced tab" : "Je kunt het Base DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", + "Detect Base DN" : "Detecteren basis DN", + "Test Base DN" : "Testen basis DN", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Voorkom automatische LDAP opvragingen. Weliswaar beter voor grote installaties, maar vergt LDAP kennis.", "Manually enter LDAP filters (recommended for large directories)" : "Handmatig invoeren LDAP filters (aanbevolen voor grote directories)", "Limit %s access to users meeting these criteria:" : "Beperk %s toegang tot gebruikers die voldoen aan deze criteria:", "The filter specifies which LDAP users shall have access to the %s instance." : "Dit filter geeft aan welke LDAP gebruikers toegang hebben tot %s.", + "Verify settings and count users" : "Verifiëren instellingen en tellen gebruikers", "Saving" : "Opslaan", "Back" : "Terug", "Continue" : "Verder", diff --git a/apps/user_ldap/l10n/nl.json b/apps/user_ldap/l10n/nl.json index 5aa26c02386..d18c303cf04 100644 --- a/apps/user_ldap/l10n/nl.json +++ b/apps/user_ldap/l10n/nl.json @@ -8,15 +8,31 @@ "No configuration specified" : "Geen configuratie opgegeven", "No data specified" : "Geen gegevens verstrekt", " Could not set configuration %s" : "Kon configuratie %s niet instellen", + "Action does not exist" : "Actie bestaat niet", "Configuration incorrect" : "Configuratie onjuist", "Configuration incomplete" : "Configuratie incompleet", "Configuration OK" : "Configuratie OK", "Select groups" : "Selecteer groepen", "Select object classes" : "Selecteer objectklasse", + "Please check the credentials, they seem to be wrong." : "Controleer de inloggegevens, ze lijken onjuist.", + "Please specify the port, it could not be auto-detected." : "Geef de poort op, die kon niet automatisch worden vastgesteld.", + "Base DN could not be auto-detected, please revise credentials, host and port." : "Basis DN kon niet automatisch worden vastgesteld, herstel inloggegevens, server en poort.", + "Could not detect Base DN, please enter it manually." : "Kon basis DN niet vaststellen, voer de gegevens handmatig in.", "{nthServer}. Server" : "{nthServer}. Server", + "No object found in the given Base DN. Please revise." : "Geen object gevonden in de basis DN. Review instellingen.", + "More then 1.000 directory entries available." : "Meer dan 1.000 directoryobjecten beschikbaar.", + " entries available within the provided Base DN" : "accounts beschikbaar binnen de provider Basis DN", + "An error occurred. Please check the Base DN, as well as connection settings and credentials." : "Er trad een fout op. Controleer de Basis DN en de verbindingsinstellingen en inloggegevens.", "Do you really want to delete the current Server Configuration?" : "Wilt u werkelijk de huidige Serverconfiguratie verwijderen?", "Confirm Deletion" : "Bevestig verwijderen", + "Mappings cleared successfully!" : "Mappings succesvol schoongemaakt!", + "Error while clearing the mappings." : "Fout bij opschonen mappings.", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "Opslaan mislukt. Verifieer dat de database draait. Herlaad voordat u verder gaat.", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "Omschakelen van de modus schakelt automatische LDAP opvragingen in. Afhankelijk van uw LDAP omvang kan dat even duren. Wilt u nog steeds omschakelen?", + "Mode switch" : "Omschakelen modus", "Select attributes" : "Selecteer attributen", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Gebruiker niet gevonden. Verifieer de inloggegevens en gebruikersnaam. Effectief filter (kopiëren en plakken voor commandoregel validatie): <br/>", + "User found and settings verified." : "Gebruiker gevonden en instellingen geverifieerd.", "_%s group found_::_%s groups found_" : ["%s groep gevonden","%s groepen gevonden"], "_%s user found_::_%s users found_" : ["%s gebruiker gevonden","%s gebruikers gevonden"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Kon het weergavenaam attribuut van de gebruiker niet vinden. Geef het zelf op in de geavanceerde ldap instellingen.", @@ -24,29 +40,45 @@ "Invalid Host" : "Ongeldige server", "Server" : "Server", "Users" : "Gebruikers", + "Login Attributes" : "Inlogattributen", "Groups" : "Groepen", "Test Configuration" : "Test configuratie", "Help" : "Help", "Groups meeting these criteria are available in %s:" : "Groepsafspraken die voldoen aan deze criteria zijn beschikbaar in %s:", + "Only these object classes:" : "Alleen deze objectklassen:", + "Only from these groups:" : "Alleen van deze groepen:", + "Search groups" : "Zoeken groepen", + "Available groups" : "Beschikbare groepen", + "Selected groups" : "Geselecteerde groepen", + "Edit LDAP Query" : "Bewerken LDAP bevraging", + "LDAP Filter:" : "LDAP Filter:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Dit filter geeft aan welke LDAP groepen toegang hebben tot %s.", "Test Filter" : "Testfilter", + "LDAP / AD Username:" : "LDAP / AD gebruikersnaam:", + "LDAP / AD Email Address:" : "LDAP / AD e-mailadres:", "Other Attributes:" : "Overige attributen:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Definiëert het toe te passen filter als er geprobeerd wordt in te loggen. %%uid vervangt de gebruikersnaam bij het inloggen. Bijvoorbeeld: \"uid=%%uid\"", + "Test Loginname" : "Test inlognaam", + "Verify settings" : "Verifiëren instellingen", "1. Server" : "1. Server", "%s. Server:" : "%s. Server:", "Host" : "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" : "Je kunt het protocol weglaten, tenzij je SSL vereist. Start in dat geval met ldaps://", "Port" : "Poort", + "Detect Port" : "Detecteer poort", "User DN" : "User DN", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "De DN van de client gebruiker waarmee de verbinding zal worden gemaakt, bijv. uid=agent,dc=example,dc=com. Voor anonieme toegang laat je het DN en het wachtwoord leeg.", "Password" : "Wachtwoord", "For anonymous access, leave DN and Password empty." : "Voor anonieme toegang, laat de DN en het wachtwoord leeg.", "One Base DN per line" : "Een Base DN per regel", "You can specify Base DN for users and groups in the Advanced tab" : "Je kunt het Base DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", + "Detect Base DN" : "Detecteren basis DN", + "Test Base DN" : "Testen basis DN", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Voorkom automatische LDAP opvragingen. Weliswaar beter voor grote installaties, maar vergt LDAP kennis.", "Manually enter LDAP filters (recommended for large directories)" : "Handmatig invoeren LDAP filters (aanbevolen voor grote directories)", "Limit %s access to users meeting these criteria:" : "Beperk %s toegang tot gebruikers die voldoen aan deze criteria:", "The filter specifies which LDAP users shall have access to the %s instance." : "Dit filter geeft aan welke LDAP gebruikers toegang hebben tot %s.", + "Verify settings and count users" : "Verifiëren instellingen en tellen gebruikers", "Saving" : "Opslaan", "Back" : "Terug", "Continue" : "Verder", diff --git a/apps/user_ldap/l10n/ru.js b/apps/user_ldap/l10n/ru.js index 10fdef8150a..dcf2bcb8d86 100644 --- a/apps/user_ldap/l10n/ru.js +++ b/apps/user_ldap/l10n/ru.js @@ -19,7 +19,11 @@ OC.L10N.register( "Please check the credentials, they seem to be wrong." : "Пожалуйста проверьте учетный данные, возможно они не верны.", "Please specify the port, it could not be auto-detected." : "Пожалуйста укажите порт, он не может быть определен автоматически.", "Base DN could not be auto-detected, please revise credentials, host and port." : "База поиска не может быть определена автоматически, пожалуйста перепроверьте учетные данные, адрес и порт.", + "Could not detect Base DN, please enter it manually." : "Не возможно обнаружить Base DN, пожалуйста задайте в ручную.", "{nthServer}. Server" : "Сервер {nthServer}.", + "No object found in the given Base DN. Please revise." : "Не найдено объектов в Base DN. Пожалуйста перепроверьте.", + "More then 1.000 directory entries available." : "Доступно более 1.000 папок.", + " entries available within the provided Base DN" : "элементы доступные в Базе", "Do you really want to delete the current Server Configuration?" : "Вы действительно хотите удалить существующую конфигурацию сервера?", "Confirm Deletion" : "Подтверждение удаления", "Select attributes" : "Выберите атрибуты", @@ -34,8 +38,12 @@ OC.L10N.register( "Test Configuration" : "Проверить конфигурацию", "Help" : "Помощь", "Groups meeting these criteria are available in %s:" : "Группы, отвечающие этим критериям доступны в %s:", + "Search groups" : "Поиск групп", + "Available groups" : "Доступные группы", + "Selected groups" : "Выбранные группы", "The filter specifies which LDAP groups shall have access to the %s instance." : "Этот фильтр определяет какие LDAP группы должны иметь доступ к экземпляру %s.", "Test Filter" : "Проверить фильтр", + "LDAP / AD Username:" : "Имя пользователя LDAP/AD:", "Other Attributes:" : "Другие атрибуты:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Определяет фильтр для применения при попытке входа. %%uid заменяет имя пользователя при входе в систему. Например: \"uid=%%uid\"", "1. Server" : "Сервер 1.", diff --git a/apps/user_ldap/l10n/ru.json b/apps/user_ldap/l10n/ru.json index 8ddc9ff25fd..b6a04af8177 100644 --- a/apps/user_ldap/l10n/ru.json +++ b/apps/user_ldap/l10n/ru.json @@ -17,7 +17,11 @@ "Please check the credentials, they seem to be wrong." : "Пожалуйста проверьте учетный данные, возможно они не верны.", "Please specify the port, it could not be auto-detected." : "Пожалуйста укажите порт, он не может быть определен автоматически.", "Base DN could not be auto-detected, please revise credentials, host and port." : "База поиска не может быть определена автоматически, пожалуйста перепроверьте учетные данные, адрес и порт.", + "Could not detect Base DN, please enter it manually." : "Не возможно обнаружить Base DN, пожалуйста задайте в ручную.", "{nthServer}. Server" : "Сервер {nthServer}.", + "No object found in the given Base DN. Please revise." : "Не найдено объектов в Base DN. Пожалуйста перепроверьте.", + "More then 1.000 directory entries available." : "Доступно более 1.000 папок.", + " entries available within the provided Base DN" : "элементы доступные в Базе", "Do you really want to delete the current Server Configuration?" : "Вы действительно хотите удалить существующую конфигурацию сервера?", "Confirm Deletion" : "Подтверждение удаления", "Select attributes" : "Выберите атрибуты", @@ -32,8 +36,12 @@ "Test Configuration" : "Проверить конфигурацию", "Help" : "Помощь", "Groups meeting these criteria are available in %s:" : "Группы, отвечающие этим критериям доступны в %s:", + "Search groups" : "Поиск групп", + "Available groups" : "Доступные группы", + "Selected groups" : "Выбранные группы", "The filter specifies which LDAP groups shall have access to the %s instance." : "Этот фильтр определяет какие LDAP группы должны иметь доступ к экземпляру %s.", "Test Filter" : "Проверить фильтр", + "LDAP / AD Username:" : "Имя пользователя LDAP/AD:", "Other Attributes:" : "Другие атрибуты:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Определяет фильтр для применения при попытке входа. %%uid заменяет имя пользователя при входе в систему. Например: \"uid=%%uid\"", "1. Server" : "Сервер 1.", diff --git a/apps/user_ldap/l10n/tr.js b/apps/user_ldap/l10n/tr.js index 15b474a5225..449ad9334cc 100644 --- a/apps/user_ldap/l10n/tr.js +++ b/apps/user_ldap/l10n/tr.js @@ -10,14 +10,19 @@ OC.L10N.register( "No configuration specified" : "Yapılandırma belirtilmemiş", "No data specified" : "Veri belirtilmemiş", " Could not set configuration %s" : "%s yapılandırması ayarlanamadı", + "Action does not exist" : "Aksiyon yok", "Configuration incorrect" : "Yapılandırma geçersiz", "Configuration incomplete" : "Yapılandırma tamamlanmamış", "Configuration OK" : "Yapılandırma tamam", "Select groups" : "Grupları seç", "Select object classes" : "Nesne sınıflarını seç", + "Please check the credentials, they seem to be wrong." : "Kimlik bilgilerini kontrol edin, onlar yanlış görünüyor.", + "Please specify the port, it could not be auto-detected." : "Port belirtin, bu otomatik olarak algılana madı.", "{nthServer}. Server" : "{nthServer}. Sunucu", "Do you really want to delete the current Server Configuration?" : "Şu anki sunucu yapılandırmasını silmek istediğinizden emin misiniz?", "Confirm Deletion" : "Silmeyi onayla", + "Mappings cleared successfully!" : "Dönüşümler temizleme basarildi", + "Error while clearing the mappings." : "Eşlemelerini takas ederken hata oluştu.", "Select attributes" : "Nitelikleri seç", "_%s group found_::_%s groups found_" : ["%s grup bulundu","%s grup bulundu"], "_%s user found_::_%s users found_" : ["%s kullanıcı bulundu","%s kullanıcı bulundu"], diff --git a/apps/user_ldap/l10n/tr.json b/apps/user_ldap/l10n/tr.json index f4a3e37cde9..45945eb009f 100644 --- a/apps/user_ldap/l10n/tr.json +++ b/apps/user_ldap/l10n/tr.json @@ -8,14 +8,19 @@ "No configuration specified" : "Yapılandırma belirtilmemiş", "No data specified" : "Veri belirtilmemiş", " Could not set configuration %s" : "%s yapılandırması ayarlanamadı", + "Action does not exist" : "Aksiyon yok", "Configuration incorrect" : "Yapılandırma geçersiz", "Configuration incomplete" : "Yapılandırma tamamlanmamış", "Configuration OK" : "Yapılandırma tamam", "Select groups" : "Grupları seç", "Select object classes" : "Nesne sınıflarını seç", + "Please check the credentials, they seem to be wrong." : "Kimlik bilgilerini kontrol edin, onlar yanlış görünüyor.", + "Please specify the port, it could not be auto-detected." : "Port belirtin, bu otomatik olarak algılana madı.", "{nthServer}. Server" : "{nthServer}. Sunucu", "Do you really want to delete the current Server Configuration?" : "Şu anki sunucu yapılandırmasını silmek istediğinizden emin misiniz?", "Confirm Deletion" : "Silmeyi onayla", + "Mappings cleared successfully!" : "Dönüşümler temizleme basarildi", + "Error while clearing the mappings." : "Eşlemelerini takas ederken hata oluştu.", "Select attributes" : "Nitelikleri seç", "_%s group found_::_%s groups found_" : ["%s grup bulundu","%s grup bulundu"], "_%s user found_::_%s users found_" : ["%s kullanıcı bulundu","%s kullanıcı bulundu"], diff --git a/apps/user_ldap/l10n/uk.js b/apps/user_ldap/l10n/uk.js index 5aa7c217c60..40941e3479f 100644 --- a/apps/user_ldap/l10n/uk.js +++ b/apps/user_ldap/l10n/uk.js @@ -20,7 +20,7 @@ OC.L10N.register( "Confirm Deletion" : "Підтвердіть Видалення", "Select attributes" : "Виберіть атрибути", "_%s group found_::_%s groups found_" : [" %s група знайдена "," %s груп знайдено ","%s груп знайдено "], - "_%s user found_::_%s users found_" : ["%s користувач знайден","%s користувачів знайдено","%s користувачів знайдено"], + "_%s user found_::_%s users found_" : ["%s користувача знайдено","%s користувачів знайдено","%s користувачів знайдено"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Не вдалося виявити ім'я користувача. Будь ласка, сформулюйте самі в розширених налаштуваннях LDAP.", "Could not find the desired feature" : "Не вдалося знайти потрібну функцію", "Invalid Host" : "Невірний Host", @@ -32,7 +32,7 @@ OC.L10N.register( "Groups meeting these criteria are available in %s:" : "Групи, що відповідають цим критеріям доступні в %s:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Фільтр визначає, які LDAP групи повинні мати доступ до %s примірника.", "Test Filter" : "Тест Фільтр", - "Other Attributes:" : "Інші Атрібути:", + "Other Attributes:" : "Інші Атрибути:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Визначає фільтр, який слід застосовувати при спробі входу.\n%%uid замінює ім'я користувача при вході в систему. Приклад: \"uid=%%uid\"", "1. Server" : "1. Сервер", "%s. Server:" : "%s. Сервер:", @@ -43,12 +43,12 @@ OC.L10N.register( "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "DN клієнтського користувача для прив'язки, наприклад: uid=agent,dc=example,dc=com. Для анонімного доступу, залиште DN і Пароль порожніми.", "Password" : "Пароль", "For anonymous access, leave DN and Password empty." : "Для анонімного доступу, залиште DN і Пароль порожніми.", - "One Base DN per line" : "Один Base DN на одній строчці", + "One Base DN per line" : "Один Base DN на рядок", "You can specify Base DN for users and groups in the Advanced tab" : "Ви можете задати Базовий DN для користувачів і груп на вкладинці Додатково", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Уникати автоматичні запити LDAP. Краще для великих установок, але вимагає деякого LDAP знання.", "Manually enter LDAP filters (recommended for large directories)" : "Вручну введіть LDAP фільтри (рекомендується для великих каталогів)", "Limit %s access to users meeting these criteria:" : "Обмежити %s доступ до користувачів, що відповідають цим критеріям:", - "The filter specifies which LDAP users shall have access to the %s instance." : "Фільтр визначає, які користувачі LDAP повині мати доступ до примірника %s.", + "The filter specifies which LDAP users shall have access to the %s instance." : "Фільтр визначає, які користувачі LDAP повинні мати доступ до примірника %s.", "Saving" : "Збереження", "Back" : "Назад", "Continue" : "Продовжити", @@ -70,17 +70,17 @@ OC.L10N.register( "Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." : "Не рекомендується, використовувати його тільки для тестування!\nЯкщо з'єднання працює лише з цією опцією, імпортуйте SSL сертифікат LDAP сервера у ваший %s сервер.", "Cache Time-To-Live" : "Час актуальності Кеша", "in seconds. A change empties the cache." : "в секундах. Зміна очищує кеш.", - "Directory Settings" : "Налаштування Каталога", + "Directory Settings" : "Налаштування Каталогу", "User Display Name Field" : "Поле, яке відображає Ім'я Користувача", "The LDAP attribute to use to generate the user's display name." : "Атрибут LDAP, який використовується для генерації імен користувачів.", "Base User Tree" : "Основне Дерево Користувачів", - "One User Base DN per line" : "Один Користувач Base DN на одній строчці", + "One User Base DN per line" : "Один Користувач Base DN на рядок", "User Search Attributes" : "Пошукові Атрибути Користувача", - "Optional; one attribute per line" : "Додатково; один атрибут на строчку", + "Optional; one attribute per line" : "Додатково; один атрибут на рядок", "Group Display Name Field" : "Поле, яке відображає Ім'я Групи", "The LDAP attribute to use to generate the groups's display name." : "Атрибут LDAP, який використовується для генерації імен груп.", "Base Group Tree" : "Основне Дерево Груп", - "One Group Base DN per line" : "Одна Група Base DN на одній строчці", + "One Group Base DN per line" : "Одна Група Base DN на рядок", "Group Search Attributes" : "Пошукові Атрибути Групи", "Group-Member association" : "Асоціація Група-Член", "Nested Groups" : "Вкладені Групи", @@ -91,7 +91,7 @@ OC.L10N.register( "Quota Field" : "Поле Квоти", "Quota Default" : "Квота за замовчанням", "in bytes" : "в байтах", - "Email Field" : "Поле Ел. пошти", + "Email Field" : "Поле E-mail", "User Home Folder Naming Rule" : "Правило іменування домашньої теки користувача", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Залиште порожнім для імені користувача (за замовчанням). Інакше, вкажіть атрибут LDAP/AD.", "Internal Username" : "Внутрішня Ім'я користувача", diff --git a/apps/user_ldap/l10n/uk.json b/apps/user_ldap/l10n/uk.json index 16fd5b66343..daa03c128d3 100644 --- a/apps/user_ldap/l10n/uk.json +++ b/apps/user_ldap/l10n/uk.json @@ -18,7 +18,7 @@ "Confirm Deletion" : "Підтвердіть Видалення", "Select attributes" : "Виберіть атрибути", "_%s group found_::_%s groups found_" : [" %s група знайдена "," %s груп знайдено ","%s груп знайдено "], - "_%s user found_::_%s users found_" : ["%s користувач знайден","%s користувачів знайдено","%s користувачів знайдено"], + "_%s user found_::_%s users found_" : ["%s користувача знайдено","%s користувачів знайдено","%s користувачів знайдено"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Не вдалося виявити ім'я користувача. Будь ласка, сформулюйте самі в розширених налаштуваннях LDAP.", "Could not find the desired feature" : "Не вдалося знайти потрібну функцію", "Invalid Host" : "Невірний Host", @@ -30,7 +30,7 @@ "Groups meeting these criteria are available in %s:" : "Групи, що відповідають цим критеріям доступні в %s:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Фільтр визначає, які LDAP групи повинні мати доступ до %s примірника.", "Test Filter" : "Тест Фільтр", - "Other Attributes:" : "Інші Атрібути:", + "Other Attributes:" : "Інші Атрибути:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Визначає фільтр, який слід застосовувати при спробі входу.\n%%uid замінює ім'я користувача при вході в систему. Приклад: \"uid=%%uid\"", "1. Server" : "1. Сервер", "%s. Server:" : "%s. Сервер:", @@ -41,12 +41,12 @@ "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." : "DN клієнтського користувача для прив'язки, наприклад: uid=agent,dc=example,dc=com. Для анонімного доступу, залиште DN і Пароль порожніми.", "Password" : "Пароль", "For anonymous access, leave DN and Password empty." : "Для анонімного доступу, залиште DN і Пароль порожніми.", - "One Base DN per line" : "Один Base DN на одній строчці", + "One Base DN per line" : "Один Base DN на рядок", "You can specify Base DN for users and groups in the Advanced tab" : "Ви можете задати Базовий DN для користувачів і груп на вкладинці Додатково", "Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Уникати автоматичні запити LDAP. Краще для великих установок, але вимагає деякого LDAP знання.", "Manually enter LDAP filters (recommended for large directories)" : "Вручну введіть LDAP фільтри (рекомендується для великих каталогів)", "Limit %s access to users meeting these criteria:" : "Обмежити %s доступ до користувачів, що відповідають цим критеріям:", - "The filter specifies which LDAP users shall have access to the %s instance." : "Фільтр визначає, які користувачі LDAP повині мати доступ до примірника %s.", + "The filter specifies which LDAP users shall have access to the %s instance." : "Фільтр визначає, які користувачі LDAP повинні мати доступ до примірника %s.", "Saving" : "Збереження", "Back" : "Назад", "Continue" : "Продовжити", @@ -68,17 +68,17 @@ "Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." : "Не рекомендується, використовувати його тільки для тестування!\nЯкщо з'єднання працює лише з цією опцією, імпортуйте SSL сертифікат LDAP сервера у ваший %s сервер.", "Cache Time-To-Live" : "Час актуальності Кеша", "in seconds. A change empties the cache." : "в секундах. Зміна очищує кеш.", - "Directory Settings" : "Налаштування Каталога", + "Directory Settings" : "Налаштування Каталогу", "User Display Name Field" : "Поле, яке відображає Ім'я Користувача", "The LDAP attribute to use to generate the user's display name." : "Атрибут LDAP, який використовується для генерації імен користувачів.", "Base User Tree" : "Основне Дерево Користувачів", - "One User Base DN per line" : "Один Користувач Base DN на одній строчці", + "One User Base DN per line" : "Один Користувач Base DN на рядок", "User Search Attributes" : "Пошукові Атрибути Користувача", - "Optional; one attribute per line" : "Додатково; один атрибут на строчку", + "Optional; one attribute per line" : "Додатково; один атрибут на рядок", "Group Display Name Field" : "Поле, яке відображає Ім'я Групи", "The LDAP attribute to use to generate the groups's display name." : "Атрибут LDAP, який використовується для генерації імен груп.", "Base Group Tree" : "Основне Дерево Груп", - "One Group Base DN per line" : "Одна Група Base DN на одній строчці", + "One Group Base DN per line" : "Одна Група Base DN на рядок", "Group Search Attributes" : "Пошукові Атрибути Групи", "Group-Member association" : "Асоціація Група-Член", "Nested Groups" : "Вкладені Групи", @@ -89,7 +89,7 @@ "Quota Field" : "Поле Квоти", "Quota Default" : "Квота за замовчанням", "in bytes" : "в байтах", - "Email Field" : "Поле Ел. пошти", + "Email Field" : "Поле E-mail", "User Home Folder Naming Rule" : "Правило іменування домашньої теки користувача", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Залиште порожнім для імені користувача (за замовчанням). Інакше, вкажіть атрибут LDAP/AD.", "Internal Username" : "Внутрішня Ім'я користувача", diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index cd8a2dd251c..cc5d5f5226f 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -355,11 +355,11 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn * compared with OC_USER_BACKEND_CREATE_USER etc. */ public function implementsActions($actions) { - return (bool)((OC_USER_BACKEND_CHECK_PASSWORD - | OC_USER_BACKEND_GET_HOME - | OC_USER_BACKEND_GET_DISPLAYNAME - | OC_USER_BACKEND_PROVIDE_AVATAR - | OC_USER_BACKEND_COUNT_USERS) + return (bool)((\OC_User_Backend::CHECK_PASSWORD + | \OC_User_Backend::GET_HOME + | \OC_User_Backend::GET_DISPLAYNAME + | \OC_User_Backend::PROVIDE_AVATAR + | \OC_User_Backend::COUNT_USERS) & $actions); } diff --git a/core/command/app/listapps.php b/core/command/app/listapps.php index 37a1d645ed4..e30baddb745 100644 --- a/core/command/app/listapps.php +++ b/core/command/app/listapps.php @@ -55,12 +55,12 @@ class ListApps extends Base { sort($enabledApps); foreach ($enabledApps as $app) { - $apps['enabled'][$app] = (isset($versions[$app])) ? $versions[$app] : ''; + $apps['enabled'][$app] = (isset($versions[$app])) ? $versions[$app] : true; } sort($disabledApps); foreach ($disabledApps as $app) { - $apps['disabled'][$app] = (isset($versions[$app])) ? $versions[$app] : ''; + $apps['disabled'][$app] = null; } $this->writeAppList($input, $output, $apps); diff --git a/core/command/base.php b/core/command/base.php index c2d5cf97f02..f84dcb1aeaf 100644 --- a/core/command/base.php +++ b/core/command/base.php @@ -54,9 +54,30 @@ class Base extends Command { break; default: foreach ($items as $key => $item) { - $output->writeln(' - ' . (!is_int($key) ? $key . ': ' : '') . $item); + if (!is_int($key)) { + $value = $this->valueToString($item); + if (!is_null($value)) { + $output->writeln(' - ' . $key . ': ' . $value); + } else { + $output->writeln(' - ' . $key); + } + } else { + $output->writeln(' - ' . $this->valueToString($item)); + } } break; } } + + protected function valueToString($value) { + if ($value === false) { + return 'false'; + } else if ($value === true) { + return 'true'; + } else if ($value === null) { + null; + } else { + return $value; + } + } } diff --git a/core/command/status.php b/core/command/status.php index 3859f69febc..737113d4f85 100644 --- a/core/command/status.php +++ b/core/command/status.php @@ -37,7 +37,7 @@ class Status extends Base { protected function execute(InputInterface $input, OutputInterface $output) { $values = array( - 'installed' => \OC_Config::getValue('installed') ? 'true' : 'false', + 'installed' => (bool) \OC_Config::getValue('installed'), 'version' => implode('.', \OC_Util::getVersion()), 'versionstring' => \OC_Util::getVersionString(), 'edition' => \OC_Util::getEditionString(), diff --git a/core/l10n/et_EE.js b/core/l10n/et_EE.js index e4acdc2bf65..40195e2769c 100644 --- a/core/l10n/et_EE.js +++ b/core/l10n/et_EE.js @@ -45,6 +45,7 @@ OC.L10N.register( "Error loading file picker template: {error}" : "Viga failivalija malli laadimisel: {error}", "Ok" : "Ok", "Error loading message template: {error}" : "Viga sõnumi malli laadimisel: {error}", + "read-only" : "kirjutuskaitstud", "_{count} file conflict_::_{count} file conflicts_" : ["{count} failikonflikt","{count} failikonflikti"], "One file conflict" : "Üks failikonflikt", "New Files" : "Uued failid", @@ -73,9 +74,11 @@ OC.L10N.register( "Shared with you by {owner}" : "Sinuga jagas {owner}", "Share link" : "Jaga linki", "The public link will expire no later than {days} days after it is created" : "Avalik link aegub mitte hiljem kui pärast {days} päeva selle loomist", + "Link" : "Link", "Password protect" : "Parooliga kaitstud", "Password" : "Parool", "Choose a password for the public link" : "Vali avaliku lingi jaoks parool", + "Allow editing" : "Luba muutmine", "Email link to person" : "Saada link isikule e-postiga", "Send" : "Saada", "Set expiration date" : "Määra aegumise kuupäev", @@ -109,6 +112,7 @@ OC.L10N.register( "Hello world!" : "Tere maailm!", "sunny" : "päikeseline", "Hello {name}, the weather is {weather}" : "Tere {name}, ilm on {weather}", + "Hello {name}" : "Tere, {name}", "_download %n file_::_download %n files_" : ["laadi alla %n fail","laadi alla %n faili"], "Updating {productName} to version {version}, this may take a while." : "Uuendan {productName} versioonile {version}, see võtab veidi aega.", "Please reload the page." : "Palun laadi see uuesti.", diff --git a/core/l10n/et_EE.json b/core/l10n/et_EE.json index f4d2dce4435..3ab79a04cde 100644 --- a/core/l10n/et_EE.json +++ b/core/l10n/et_EE.json @@ -43,6 +43,7 @@ "Error loading file picker template: {error}" : "Viga failivalija malli laadimisel: {error}", "Ok" : "Ok", "Error loading message template: {error}" : "Viga sõnumi malli laadimisel: {error}", + "read-only" : "kirjutuskaitstud", "_{count} file conflict_::_{count} file conflicts_" : ["{count} failikonflikt","{count} failikonflikti"], "One file conflict" : "Üks failikonflikt", "New Files" : "Uued failid", @@ -71,9 +72,11 @@ "Shared with you by {owner}" : "Sinuga jagas {owner}", "Share link" : "Jaga linki", "The public link will expire no later than {days} days after it is created" : "Avalik link aegub mitte hiljem kui pärast {days} päeva selle loomist", + "Link" : "Link", "Password protect" : "Parooliga kaitstud", "Password" : "Parool", "Choose a password for the public link" : "Vali avaliku lingi jaoks parool", + "Allow editing" : "Luba muutmine", "Email link to person" : "Saada link isikule e-postiga", "Send" : "Saada", "Set expiration date" : "Määra aegumise kuupäev", @@ -107,6 +110,7 @@ "Hello world!" : "Tere maailm!", "sunny" : "päikeseline", "Hello {name}, the weather is {weather}" : "Tere {name}, ilm on {weather}", + "Hello {name}" : "Tere, {name}", "_download %n file_::_download %n files_" : ["laadi alla %n fail","laadi alla %n faili"], "Updating {productName} to version {version}, this may take a while." : "Uuendan {productName} versioonile {version}, see võtab veidi aega.", "Please reload the page." : "Palun laadi see uuesti.", diff --git a/core/l10n/uk.js b/core/l10n/uk.js index 3b4da47bfff..1d479a06311 100644 --- a/core/l10n/uk.js +++ b/core/l10n/uk.js @@ -50,7 +50,7 @@ OC.L10N.register( "Yes" : "Так", "Choose" : "Обрати", "Error loading file picker template: {error}" : "Помилка при завантаженні шаблону вибору: {error}", - "Ok" : "Ok", + "Ok" : "Гаразд", "Error loading message template: {error}" : "Помилка при завантаженні шаблону повідомлення: {error}", "read-only" : "Тільки для читання", "_{count} file conflict_::_{count} file conflicts_" : ["{count} файловий конфлікт","{count} файлових конфліктів","{count} файлових конфліктів"], @@ -72,7 +72,9 @@ OC.L10N.register( "Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken." : "Ваш веб-сервер ще не налаштований належним чином, щоб дозволити синхронізацію файлів, тому що інтерфейс WebDAV, здається, зіпсований.", "This server has no working Internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features." : "Цей сервер не має підключення до Інтернету. Це означає, що деякі з функцій, таких як зовнішнє сховище, повідомлення про оновлення та встановлення сторонніх додатків не будуть працювати. Доступ до файлів віддалено і відправки повідомлень поштою можуть не працювати. Ми пропонуємо включити підключення до Інтернету для цього сервера, якщо ви хочете, щоб всі функції працювали.", "Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root." : "Ваш каталог даних і ваші файли можливо доступні з інтернету. .htaccess файл не працює. Ми настійно рекомендуємо вам налаштувати ваш веб сервер таким чином, що-б каталог даних не був більше доступний або перемістіть каталог даних за межі кореня веб сервера.", + "No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a href=\"{docLink}\">documentation</a>." : "Кеш пам'яті не налаштований. Задля покращення продуктивності, будь ласка, налаштуйте memcache, якщо є можливість. Додаткову інформацію шукайте у нашій <a href=\"{docLink}\">документації</a>.", "Error occurred while checking server setup" : "При перевірці налаштувань серверу сталася помилка", + "The \"{header}\" HTTP header is not configured to equal to \"{expected}\". This is a potential security or privacy risk and we recommend adjusting this setting." : "HTTP заголовок \"{header}\" не налаштований як \"{expected}\". Це потенційний ризик для безпеки чи приватності і ми радимо виправити це налаштування.", "The \"Strict-Transport-Security\" HTTP header is not configured to least \"2,678,400\" seconds. This is a potential security risk and we recommend adjusting this setting." : "HTTP заголовок \"Strict-Transport-Security\" повинен бути налаштований принаймні на \"2,678,400\" секунд. Це потенційна проблема безпеки і ми рекомендуємо змінити ці налаштування.", "You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Ви зайшли на цей сайт через HTTP. Ми настійно рекомендуємо налаштувати ваш сервер на використання HTTPS.", "Shared" : "Опубліковано", @@ -84,6 +86,9 @@ OC.L10N.register( "Error while changing permissions" : "Помилка при зміні повноважень", "Shared with you and the group {group} by {owner}" : " {owner} опублікував для Вас та для групи {group}", "Shared with you by {owner}" : "{owner} опублікував для Вас", + "Share with users or groups …" : "Поширити серед користувачів або груп ...", + "Share with users, groups or remote users …" : "Поширити серед локальних чи віддалених користувачів або груп ...", + "Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Поширити серед людей інших ownCloud'ів, використовуючи синтаксис ім'я_користувача@файли.укр/owncloud", "Share link" : "Опублікувати посилання", "The public link will expire no later than {days} days after it is created" : "Доступ до опублікованого посилання буде припинено не пізніше ніж через {days} днів з моменту створення", "Link" : "Посилання", @@ -176,6 +181,7 @@ OC.L10N.register( "File: %s" : "Файл: %s", "Line: %s" : "Рядок: %s", "Trace" : "Трасування", + "Security warning" : "Попередження безпеки", "Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Ваші дані каталогів і файлів, ймовірно, доступні з інтернету, тому що .htaccess файл не працює.", "For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\">documentation</a>." : "Для отримання інформації, як правильно налаштувати сервер, див. <a href=\"%s\" target=\"_blank\">документацію</a>.", "Create an <strong>admin account</strong>" : "Створити <strong>обліковий запис адміністратора</strong>", @@ -189,6 +195,7 @@ OC.L10N.register( "Database name" : "Назва бази даних", "Database tablespace" : "Таблиця бази даних", "Database host" : "Хост бази даних", + "Performance warning" : "Попередження продуктивності", "SQLite will be used as database." : "В якості бази даних буде використана SQLite.", "For larger installations we recommend to choose a different database backend." : "Для великих установок ми радимо вибрати іншу базу даних.", "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "Особливо викликає сумнів використання SQLite при синхронізації файлів з використанням клієнта для ПК.", diff --git a/core/l10n/uk.json b/core/l10n/uk.json index 77841d7c4db..ad3969d1402 100644 --- a/core/l10n/uk.json +++ b/core/l10n/uk.json @@ -48,7 +48,7 @@ "Yes" : "Так", "Choose" : "Обрати", "Error loading file picker template: {error}" : "Помилка при завантаженні шаблону вибору: {error}", - "Ok" : "Ok", + "Ok" : "Гаразд", "Error loading message template: {error}" : "Помилка при завантаженні шаблону повідомлення: {error}", "read-only" : "Тільки для читання", "_{count} file conflict_::_{count} file conflicts_" : ["{count} файловий конфлікт","{count} файлових конфліктів","{count} файлових конфліктів"], @@ -70,7 +70,9 @@ "Your web server is not yet set up properly to allow file synchronization because the WebDAV interface seems to be broken." : "Ваш веб-сервер ще не налаштований належним чином, щоб дозволити синхронізацію файлів, тому що інтерфейс WebDAV, здається, зіпсований.", "This server has no working Internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest to enable Internet connection for this server if you want to have all features." : "Цей сервер не має підключення до Інтернету. Це означає, що деякі з функцій, таких як зовнішнє сховище, повідомлення про оновлення та встановлення сторонніх додатків не будуть працювати. Доступ до файлів віддалено і відправки повідомлень поштою можуть не працювати. Ми пропонуємо включити підключення до Інтернету для цього сервера, якщо ви хочете, щоб всі функції працювали.", "Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root." : "Ваш каталог даних і ваші файли можливо доступні з інтернету. .htaccess файл не працює. Ми настійно рекомендуємо вам налаштувати ваш веб сервер таким чином, що-б каталог даних не був більше доступний або перемістіть каталог даних за межі кореня веб сервера.", + "No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our <a href=\"{docLink}\">documentation</a>." : "Кеш пам'яті не налаштований. Задля покращення продуктивності, будь ласка, налаштуйте memcache, якщо є можливість. Додаткову інформацію шукайте у нашій <a href=\"{docLink}\">документації</a>.", "Error occurred while checking server setup" : "При перевірці налаштувань серверу сталася помилка", + "The \"{header}\" HTTP header is not configured to equal to \"{expected}\". This is a potential security or privacy risk and we recommend adjusting this setting." : "HTTP заголовок \"{header}\" не налаштований як \"{expected}\". Це потенційний ризик для безпеки чи приватності і ми радимо виправити це налаштування.", "The \"Strict-Transport-Security\" HTTP header is not configured to least \"2,678,400\" seconds. This is a potential security risk and we recommend adjusting this setting." : "HTTP заголовок \"Strict-Transport-Security\" повинен бути налаштований принаймні на \"2,678,400\" секунд. Це потенційна проблема безпеки і ми рекомендуємо змінити ці налаштування.", "You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead." : "Ви зайшли на цей сайт через HTTP. Ми настійно рекомендуємо налаштувати ваш сервер на використання HTTPS.", "Shared" : "Опубліковано", @@ -82,6 +84,9 @@ "Error while changing permissions" : "Помилка при зміні повноважень", "Shared with you and the group {group} by {owner}" : " {owner} опублікував для Вас та для групи {group}", "Shared with you by {owner}" : "{owner} опублікував для Вас", + "Share with users or groups …" : "Поширити серед користувачів або груп ...", + "Share with users, groups or remote users …" : "Поширити серед локальних чи віддалених користувачів або груп ...", + "Share with people on other ownClouds using the syntax username@example.com/owncloud" : "Поширити серед людей інших ownCloud'ів, використовуючи синтаксис ім'я_користувача@файли.укр/owncloud", "Share link" : "Опублікувати посилання", "The public link will expire no later than {days} days after it is created" : "Доступ до опублікованого посилання буде припинено не пізніше ніж через {days} днів з моменту створення", "Link" : "Посилання", @@ -174,6 +179,7 @@ "File: %s" : "Файл: %s", "Line: %s" : "Рядок: %s", "Trace" : "Трасування", + "Security warning" : "Попередження безпеки", "Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Ваші дані каталогів і файлів, ймовірно, доступні з інтернету, тому що .htaccess файл не працює.", "For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\">documentation</a>." : "Для отримання інформації, як правильно налаштувати сервер, див. <a href=\"%s\" target=\"_blank\">документацію</a>.", "Create an <strong>admin account</strong>" : "Створити <strong>обліковий запис адміністратора</strong>", @@ -187,6 +193,7 @@ "Database name" : "Назва бази даних", "Database tablespace" : "Таблиця бази даних", "Database host" : "Хост бази даних", + "Performance warning" : "Попередження продуктивності", "SQLite will be used as database." : "В якості бази даних буде використана SQLite.", "For larger installations we recommend to choose a different database backend." : "Для великих установок ми радимо вибрати іншу базу даних.", "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "Особливо викликає сумнів використання SQLite при синхронізації файлів з використанням клієнта для ПК.", @@ -64,7 +64,7 @@ try { \OC::$server->getTempManager()->cleanOld(); // Exit if background jobs are disabled! - $appMode = OC_BackgroundJob::getExecutionType(); + $appMode = \OCP\BackgroundJob::getExecutionType(); if ($appMode == 'none') { if (OC::$CLI) { echo 'Background Jobs are disabled!' . PHP_EOL; @@ -107,7 +107,7 @@ try { // We call ownCloud from the CLI (aka cron) if ($appMode != 'cron') { - OC_BackgroundJob::setExecutionType('cron'); + \OCP\BackgroundJob::setExecutionType('cron'); } // open the file and try to lock if. If it is not locked, the background diff --git a/lib/l10n/ja.js b/lib/l10n/ja.js index e1121b6344b..f28db0d7204 100644 --- a/lib/l10n/ja.js +++ b/lib/l10n/ja.js @@ -84,6 +84,7 @@ OC.L10N.register( "Set an admin password." : "管理者のパスワードを設定。", "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", "%s shared »%s« with you" : "%sが あなたと »%s«を共有しました", + "%s via %s" : "%s に %s から", "Sharing %s failed, because the backend does not allow shares from type %i" : "%s の共有に失敗しました。%i タイプからの共有は許可されていないからです。", "Sharing %s failed, because the file does not exist" : "%s の共有に失敗しました。そのようなファイルは存在しないからです。", "You are not allowed to share %s" : "%s を共有することを許可されていません。", @@ -116,6 +117,8 @@ OC.L10N.register( "A valid password must be provided" : "有効なパスワードを指定する必要があります", "The username is already being used" : "ユーザー名はすでに使われています", "No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。", + "Microsoft Windows Platform is not supported" : "Microsoft Windows サーバーはサポートしていません。", + "Running ownCloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself. Find Linux packages as well as easy to deploy virtual machine images on <a href=\"%s\">%s</a>. For migrating existing installations to Linux you can find some tips and a migration script in <a href=\"%s\">our documentation</a>." : "Microsoft Windowsサーバー上での ownCloud の動作は、サポートされていません。現在のサーバーOSを変更することができないのであれば、仮想マシン上で Linuxサーバーを動かすことをお勧めします。仮想マシンイメージを配置するのと同じぐらい簡単にLinuxパッケージを<a href=\"%s\">%s</a>で見つけられます。現在稼働中の設定をLinuxに移行する 移行スクリプトと注意点をこちらの<a href=\"%s\">ドキュメント</a>で確認してください。", "Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません", "Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "多くの場合、これは %s Webサーバーにappsディレクトリ %s への書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。", @@ -141,6 +144,8 @@ OC.L10N.register( "Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "PostgreSQL >= 9 がインストールされているかどうか確認してください。もしくは、ログからエラーに関する詳細な情報を確認してください。", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "ディレクトリが他のユーザーから見えないように、パーミッションを 0770 に変更してください。", "Data directory (%s) is readable by other users" : "データディレクトリ (%s) は他のユーザーも閲覧することができます", + "Data directory (%s) must be an absolute path" : "データディレクトリ (%s) は、絶対パスである必要があります。", + "Check the value of \"datadirectory\" in your configuration" : "設定ファイル内の \"datadirectory\" の値を確認してください。", "Data directory (%s) is invalid" : "データディレクトリ (%s) は無効です", "Please check that the data directory contains a file \".ocdata\" in its root." : "データディレクトリに \".ocdata\" ファイルが含まれていることを確認してください。", "Could not obtain lock type %d on \"%s\"." : "\"%s\" で %d タイプのロックを取得できませんでした。" diff --git a/lib/l10n/ja.json b/lib/l10n/ja.json index 25bbc7b72fa..d096d48e3c2 100644 --- a/lib/l10n/ja.json +++ b/lib/l10n/ja.json @@ -82,6 +82,7 @@ "Set an admin password." : "管理者のパスワードを設定。", "Can't create or write into the data directory %s" : "%s データディレクトリに作成、書き込みができません", "%s shared »%s« with you" : "%sが あなたと »%s«を共有しました", + "%s via %s" : "%s に %s から", "Sharing %s failed, because the backend does not allow shares from type %i" : "%s の共有に失敗しました。%i タイプからの共有は許可されていないからです。", "Sharing %s failed, because the file does not exist" : "%s の共有に失敗しました。そのようなファイルは存在しないからです。", "You are not allowed to share %s" : "%s を共有することを許可されていません。", @@ -114,6 +115,8 @@ "A valid password must be provided" : "有効なパスワードを指定する必要があります", "The username is already being used" : "ユーザー名はすでに使われています", "No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。", + "Microsoft Windows Platform is not supported" : "Microsoft Windows サーバーはサポートしていません。", + "Running ownCloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself. Find Linux packages as well as easy to deploy virtual machine images on <a href=\"%s\">%s</a>. For migrating existing installations to Linux you can find some tips and a migration script in <a href=\"%s\">our documentation</a>." : "Microsoft Windowsサーバー上での ownCloud の動作は、サポートされていません。現在のサーバーOSを変更することができないのであれば、仮想マシン上で Linuxサーバーを動かすことをお勧めします。仮想マシンイメージを配置するのと同じぐらい簡単にLinuxパッケージを<a href=\"%s\">%s</a>で見つけられます。現在稼働中の設定をLinuxに移行する 移行スクリプトと注意点をこちらの<a href=\"%s\">ドキュメント</a>で確認してください。", "Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません", "Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "多くの場合、これは %s Webサーバーにappsディレクトリ %s への書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。", @@ -139,6 +142,8 @@ "Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "PostgreSQL >= 9 がインストールされているかどうか確認してください。もしくは、ログからエラーに関する詳細な情報を確認してください。", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "ディレクトリが他のユーザーから見えないように、パーミッションを 0770 に変更してください。", "Data directory (%s) is readable by other users" : "データディレクトリ (%s) は他のユーザーも閲覧することができます", + "Data directory (%s) must be an absolute path" : "データディレクトリ (%s) は、絶対パスである必要があります。", + "Check the value of \"datadirectory\" in your configuration" : "設定ファイル内の \"datadirectory\" の値を確認してください。", "Data directory (%s) is invalid" : "データディレクトリ (%s) は無効です", "Please check that the data directory contains a file \".ocdata\" in its root." : "データディレクトリに \".ocdata\" ファイルが含まれていることを確認してください。", "Could not obtain lock type %d on \"%s\"." : "\"%s\" で %d タイプのロックを取得できませんでした。" diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js index c2a237f894d..44964a0514b 100644 --- a/lib/l10n/uk.js +++ b/lib/l10n/uk.js @@ -115,6 +115,7 @@ OC.L10N.register( "The username is already being used" : "Ім'я користувача вже використовується", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не встановлено драйвер бази даних (sqlite, mysql, or postgresql).", "Microsoft Windows Platform is not supported" : "Платформа Microsoft Windows не підтримується", + "Running ownCloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself. Find Linux packages as well as easy to deploy virtual machine images on <a href=\"%s\">%s</a>. For migrating existing installations to Linux you can find some tips and a migration script in <a href=\"%s\">our documentation</a>." : "Запуск сервера ownCloud на платформі Microsoft Windows не підтримується. Ми пропонуємо використати сервер на базі Linux у віртуальній машині, якщо у вас немає можливості мігрувати увесь сервер. Знайдіть пакунки для Linux, а також прості у впровадженні образи віртуальних машин на <a href=\"%s\">%s</a>. При міграції існуючих встановлень на Linux ви можете використати деякі поради та скрипт міграції з <a href=\"%s\">нашій документації</a>.", "Cannot write into \"config\" directory" : "Не можу писати у теку \"config\"", "Cannot write into \"apps\" directory" : "Не можу писати у теку \"apps\"", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Зазвичай це можна виправити, %s надавши веб-серверу права на запис в каталог додатків %s або відключивши сховище програм у файлі конфігурації.", @@ -140,6 +141,8 @@ OC.L10N.register( "Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "Переконайтеся що версія PostgreSQL> = 9 або перевірте журнали для отримання додаткової інформацією про помилку", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Змініть права доступу на 0770, щоб інші користувачі не могли отримати список файлів цього каталогу.", "Data directory (%s) is readable by other users" : "Каталог даних (%s) доступний для читання іншим користувачам", + "Data directory (%s) must be an absolute path" : "Тека з даними (%s) має бути задана абсолютним шляхом", + "Check the value of \"datadirectory\" in your configuration" : "Перевірте значення \"datadirectory\" у своїй конфігурації", "Data directory (%s) is invalid" : "Каталог даних (%s) невірний", "Please check that the data directory contains a file \".ocdata\" in its root." : "Переконайтеся, що файл \".ocdata\" присутній у корені каталогу даних.", "Could not obtain lock type %d on \"%s\"." : "Не вдалося отримати блокування типу %d для \"%s\"" diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json index 9e7161c838a..a3ddeb3656a 100644 --- a/lib/l10n/uk.json +++ b/lib/l10n/uk.json @@ -113,6 +113,7 @@ "The username is already being used" : "Ім'я користувача вже використовується", "No database drivers (sqlite, mysql, or postgresql) installed." : "Не встановлено драйвер бази даних (sqlite, mysql, or postgresql).", "Microsoft Windows Platform is not supported" : "Платформа Microsoft Windows не підтримується", + "Running ownCloud Server on the Microsoft Windows platform is not supported. We suggest you use a Linux server in a virtual machine if you have no option for migrating the server itself. Find Linux packages as well as easy to deploy virtual machine images on <a href=\"%s\">%s</a>. For migrating existing installations to Linux you can find some tips and a migration script in <a href=\"%s\">our documentation</a>." : "Запуск сервера ownCloud на платформі Microsoft Windows не підтримується. Ми пропонуємо використати сервер на базі Linux у віртуальній машині, якщо у вас немає можливості мігрувати увесь сервер. Знайдіть пакунки для Linux, а також прості у впровадженні образи віртуальних машин на <a href=\"%s\">%s</a>. При міграції існуючих встановлень на Linux ви можете використати деякі поради та скрипт міграції з <a href=\"%s\">нашій документації</a>.", "Cannot write into \"config\" directory" : "Не можу писати у теку \"config\"", "Cannot write into \"apps\" directory" : "Не можу писати у теку \"apps\"", "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Зазвичай це можна виправити, %s надавши веб-серверу права на запис в каталог додатків %s або відключивши сховище програм у файлі конфігурації.", @@ -138,6 +139,8 @@ "Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "Переконайтеся що версія PostgreSQL> = 9 або перевірте журнали для отримання додаткової інформацією про помилку", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Змініть права доступу на 0770, щоб інші користувачі не могли отримати список файлів цього каталогу.", "Data directory (%s) is readable by other users" : "Каталог даних (%s) доступний для читання іншим користувачам", + "Data directory (%s) must be an absolute path" : "Тека з даними (%s) має бути задана абсолютним шляхом", + "Check the value of \"datadirectory\" in your configuration" : "Перевірте значення \"datadirectory\" у своїй конфігурації", "Data directory (%s) is invalid" : "Каталог даних (%s) невірний", "Please check that the data directory contains a file \".ocdata\" in its root." : "Переконайтеся, що файл \".ocdata\" присутній у корені каталогу даних.", "Could not obtain lock type %d on \"%s\"." : "Не вдалося отримати блокування типу %d для \"%s\"" diff --git a/lib/private/api.php b/lib/private/api.php index 119cdb7d1a3..dd50162f03e 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -34,17 +34,33 @@ class OC_API { /** * API authentication levels */ + + /** @deprecated Use \OCP\API::GUEST_AUTH instead */ const GUEST_AUTH = 0; + + /** @deprecated Use \OCP\API::USER_AUTH instead */ const USER_AUTH = 1; + + /** @deprecated Use \OCP\API::SUBADMIN_AUTH instead */ const SUBADMIN_AUTH = 2; + + /** @deprecated Use \OCP\API::ADMIN_AUTH instead */ const ADMIN_AUTH = 3; /** * API Response Codes */ + + /** @deprecated Use \OCP\API::RESPOND_UNAUTHORISED instead */ const RESPOND_UNAUTHORISED = 997; + + /** @deprecated Use \OCP\API::RESPOND_SERVER_ERROR instead */ const RESPOND_SERVER_ERROR = 996; + + /** @deprecated Use \OCP\API::RESPOND_NOT_FOUND instead */ const RESPOND_NOT_FOUND = 998; + + /** @deprecated Use \OCP\API::RESPOND_UNKNOWN_ERROR instead */ const RESPOND_UNKNOWN_ERROR = 999; /** @@ -65,7 +81,7 @@ class OC_API { * @param array $requirements */ public static function register($method, $url, $action, $app, - $authLevel = OC_API::USER_AUTH, + $authLevel = \OCP\API::USER_AUTH, $defaults = array(), $requirements = array()) { $name = strtolower($method).$url; @@ -106,7 +122,7 @@ class OC_API { if(!self::isAuthorised($action)) { $responses[] = array( 'app' => $action['app'], - 'response' => new OC_OCS_Result(null, OC_API::RESPOND_UNAUTHORISED, 'Unauthorised'), + 'response' => new OC_OCS_Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised'), 'shipped' => OC_App::isShipped($action['app']), ); continue; @@ -114,7 +130,7 @@ class OC_API { if(!is_callable($action['action'])) { $responses[] = array( 'app' => $action['app'], - 'response' => new OC_OCS_Result(null, OC_API::RESPOND_NOT_FOUND, 'Api method not found'), + 'response' => new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'Api method not found'), 'shipped' => OC_App::isShipped($action['app']), ); continue; @@ -172,7 +188,7 @@ class OC_API { // Which shipped response do we use if they all failed? // They may have failed for different reasons (different status codes) // Which response code should we return? - // Maybe any that are not OC_API::RESPOND_SERVER_ERROR + // Maybe any that are not \OCP\API::RESPOND_SERVER_ERROR // Merge failed responses if more than one $data = array(); foreach($shipped['failed'] as $failure) { @@ -235,15 +251,15 @@ class OC_API { private static function isAuthorised($action) { $level = $action['authlevel']; switch($level) { - case OC_API::GUEST_AUTH: + case \OCP\API::GUEST_AUTH: // Anyone can access return true; break; - case OC_API::USER_AUTH: + case \OCP\API::USER_AUTH: // User required return self::loginUser(); break; - case OC_API::SUBADMIN_AUTH: + case \OCP\API::SUBADMIN_AUTH: // Check for subadmin $user = self::loginUser(); if(!$user) { @@ -258,7 +274,7 @@ class OC_API { } } break; - case OC_API::ADMIN_AUTH: + case \OCP\API::ADMIN_AUTH: // Check for admin $user = self::loginUser(); if(!$user) { @@ -325,7 +341,7 @@ class OC_API { */ public static function respond($result, $format='xml') { // Send 401 headers if unauthorised - if($result->getStatusCode() === self::RESPOND_UNAUTHORISED) { + if($result->getStatusCode() === \OCP\API::RESPOND_UNAUTHORISED) { header('WWW-Authenticate: Basic realm="Authorisation Required"'); header('HTTP/1.0 401 Unauthorized'); } @@ -384,7 +400,7 @@ class OC_API { * Based on the requested format the response content type is set */ public static function setContentType() { - $format = \OC_API::requestedFormat(); + $format = self::requestedFormat(); if ($format === 'xml') { header('Content-type: text/xml; charset=UTF-8'); return; diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 002c1151adc..2455209cdf3 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -238,7 +238,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { case 'params': case 'urlParams': if(in_array($name, array('put', 'patch'))) { - return $this->getContent($name); + return $this->getContent(); } else { return isset($this->items[$name]) ? $this->items[$name] @@ -252,7 +252,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return isset($this[$name]) ? $this[$name] : null; - break; } } @@ -360,7 +359,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @param string $key the key that will be taken from the $_COOKIE array * @return array the value in the $_COOKIE element */ - function getCookie($key) { + public function getCookie($key) { return isset($this->cookies[$key]) ? $this->cookies[$key] : null; } diff --git a/lib/private/appframework/utility/simplecontainer.php b/lib/private/appframework/utility/simplecontainer.php index 9e80f89e458..c7dff6f4571 100644 --- a/lib/private/appframework/utility/simplecontainer.php +++ b/lib/private/appframework/utility/simplecontainer.php @@ -106,7 +106,7 @@ class SimpleContainer extends \Pimple\Container implements \OCP\IContainer { * @param string $name * @param mixed $value */ - function registerParameter($name, $value) { + public function registerParameter($name, $value) { $this[$name] = $value; } @@ -119,7 +119,7 @@ class SimpleContainer extends \Pimple\Container implements \OCP\IContainer { * @param \Closure $closure the closure to be called on service creation * @param bool $shared */ - function registerService($name, \Closure $closure, $shared = true) { + public function registerService($name, \Closure $closure, $shared = true) { if (isset($this[$name])) { unset($this[$name]); } diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php index 578ab05d49b..0ff4a3444e2 100644 --- a/lib/private/avatarmanager.php +++ b/lib/private/avatarmanager.php @@ -38,7 +38,7 @@ class AvatarManager implements IAvatarManager { * @param string $user the ownCloud user id * @return \OCP\IAvatar */ - function getAvatar($user) { + public function getAvatar($user) { return new Avatar($user); } } diff --git a/lib/private/backgroundjob.php b/lib/private/backgroundjob.php deleted file mode 100644 index 574109feee1..00000000000 --- a/lib/private/backgroundjob.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * @author Bart Visscher <bartv@thisnet.nl> - * @author Felix Moeller <mail@felixmoeller.de> - * @author Jakob Sack <mail@jakobsack.de> - * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -/** - * This class does the dirty work. - */ -class OC_BackgroundJob{ - /** - * get the execution type of background jobs - * @return string - * - * This method returns the type how background jobs are executed. If the user - * did not select something, the type is ajax. - */ - public static function getExecutionType() { - return OC_Appconfig::getValue( 'core', 'backgroundjobs_mode', 'ajax' ); - } - - /** - * sets the background jobs execution type - * @param string $type execution type - * @return false|null - * - * This method sets the execution type of the background jobs. Possible types - * are "none", "ajax", "webcron", "cron" - */ - public static function setExecutionType( $type ) { - if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { - return false; - } - return OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', $type ); - } -} diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 0878b6c60a0..d253afbfa1d 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -103,23 +103,10 @@ class Scanner extends BasicEmitter { * @return array an array of metadata of the file */ public function getData($path) { - $permissions = $this->storage->getPermissions($path); - if (!$permissions & \OCP\PERMISSION_READ) { - //cant read, nothing we can do + $data = $this->storage->getMetaData($path); + if (is_null($data)) { \OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG); - return null; } - $data = array(); - $data['mimetype'] = $this->storage->getMimeType($path); - $data['mtime'] = $this->storage->filemtime($path); - if ($data['mimetype'] == 'httpd/unix-directory') { - $data['size'] = -1; //unknown - } else { - $data['size'] = $this->storage->filesize($path); - } - $data['etag'] = $this->storage->getETag($path); - $data['storage_mtime'] = $data['mtime']; - $data['permissions'] = $permissions; return $data; } diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 66ed713e22d..06c61fe6931 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -580,4 +580,29 @@ abstract class Common implements Storage { } return $result; } + + /** + * @inheritdoc + */ + public function getMetaData($path) { + $permissions = $this->getPermissions($path); + if (!$permissions & \OCP\Constants::PERMISSION_READ) { + //cant read, nothing we can do + return null; + } + + $data = []; + $data['mimetype'] = $this->getMimeType($path); + $data['mtime'] = $this->filemtime($path); + if ($data['mimetype'] == 'httpd/unix-directory') { + $data['size'] = -1; //unknown + } else { + $data['size'] = $this->filesize($path); + } + $data['etag'] = $this->getETag($path); + $data['storage_mtime'] = $data['mtime']; + $data['permissions'] = $this->getPermissions($path); + + return $data; + } } diff --git a/lib/private/files/storage/storage.php b/lib/private/files/storage/storage.php index 4b75fa9da89..07b5633c908 100644 --- a/lib/private/files/storage/storage.php +++ b/lib/private/files/storage/storage.php @@ -70,4 +70,10 @@ interface Storage extends \OCP\Files\Storage { */ public function getStorageCache(); + /** + * @param string $path + * @return array + */ + public function getMetaData($path); + } diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 01bd861e3a2..e5c96286f09 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -23,6 +23,8 @@ namespace OC\Files\Storage\Wrapper; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; +use OC\Encryption\File; +use OC\Files\Filesystem; use OC\Files\Storage\LocalTempFileTrait; use OCP\Files\Mount\IMountPoint; @@ -48,7 +50,7 @@ class Encryption extends Wrapper { /** @var array */ private $unencryptedSize; - /** @var \OC\Encryption\File */ + /** @var File */ private $fileHelper; /** @var IMountPoint */ @@ -59,7 +61,7 @@ class Encryption extends Wrapper { * @param \OC\Encryption\Manager $encryptionManager * @param \OC\Encryption\Util $util * @param \OC\Log $logger - * @param \OC\Encryption\File $fileHelper + * @param File $fileHelper * @param string $uid user who perform the read/write operation (null for public access) */ public function __construct( @@ -67,7 +69,7 @@ class Encryption extends Wrapper { \OC\Encryption\Manager $encryptionManager = null, \OC\Encryption\Util $util = null, \OC\Log $logger = null, - \OC\Encryption\File $fileHelper = null, + File $fileHelper = null, $uid = null ) { @@ -111,6 +113,30 @@ class Encryption extends Wrapper { } /** + * @param string $path + * @return array + */ + public function getMetaData($path) { + $data = $this->storage->getMetaData($path); + if (is_null($data)) { + return null; + } + $fullPath = $this->getFullPath($path); + + if (isset($this->unencryptedSize[$fullPath])) { + $data['encrypted'] = true; + $data['size'] = $this->unencryptedSize[$fullPath]; + } else { + $info = $this->getCache()->get($path); + if (isset($info['fileid']) && $info['encrypted']) { + $data['encrypted'] = true; + $data['size'] = $info['size']; + } + } + + return $data; + } + /** * see http://php.net/manual/en/function.file_get_contents.php * * @param string $path @@ -360,7 +386,7 @@ class Encryption extends Wrapper { * @return string full path including mount point */ protected function getFullPath($path) { - return \OC\Files\Filesystem::normalizePath($this->mountPoint . '/' . $path); + return Filesystem::normalizePath($this->mountPoint . '/' . $path); } /** diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php index 2552c926e02..f3dc09db138 100644 --- a/lib/private/files/storage/wrapper/wrapper.php +++ b/lib/private/files/storage/wrapper/wrapper.php @@ -525,4 +525,12 @@ class Wrapper implements \OC\Files\Storage\Storage { public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) { return $this->storage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath); } + + /** + * @param string $path + * @return array + */ + public function getMetaData($path) { + return $this->storage->getMetaData($path); + } } diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php index 4a1df840105..79493311a43 100644 --- a/lib/private/files/stream/encryption.php +++ b/lib/private/files/stream/encryption.php @@ -223,9 +223,8 @@ class Encryption extends Wrapper { || $mode === 'wb+' ) { // We're writing a new file so start write counter with 0 bytes - // TODO can we remove this completely? - //$this->unencryptedSize = 0; - //$this->size = 0; + $this->unencryptedSize = 0; + $this->size = 0; $this->readOnly = false; } else { $this->readOnly = true; @@ -233,7 +232,7 @@ class Encryption extends Wrapper { $sharePath = $this->fullPath; if (!$this->storage->file_exists($this->internalPath)) { - $sharePath = dirname($path); + $sharePath = dirname($sharePath); } $accessList = $this->file->getAccessList($sharePath); diff --git a/lib/private/geo.php b/lib/private/geo.php deleted file mode 100644 index cbc5074dc73..00000000000 --- a/lib/private/geo.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * @author Christopher Schäpers <kondou@ts.unde.re> - * @author Georg Ehrke <georg@owncloud.com> - * @author Lukas Reschke <lukas@owncloud.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin McCorkell <rmccorkell@karoshi.org.uk> - * @author Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -class OC_Geo{ - /** - * returns the closest timezone to coordinates - * @param float $latitude - * @param float $longitude - * @return mixed Closest timezone - */ - public static function timezone($latitude, $longitude) { - $alltimezones = DateTimeZone::listIdentifiers(); - $variances = array(); - //calculate for all timezones the system know - foreach($alltimezones as $timezone) { - $datetimezoneobj = new DateTimeZone($timezone); - $locationinformations = $datetimezoneobj->getLocation(); - $latitudeoftimezone = $locationinformations['latitude']; - $longitudeoftimezone = $locationinformations['longitude']; - $variances[abs($latitudeoftimezone - $latitude) + abs($longitudeoftimezone - $longitude)] = $timezone; - } - //sort array and return the timezone with the smallest difference - ksort($variances); - reset($variances); - return current($variances); - } -} diff --git a/lib/private/helper.php b/lib/private/helper.php index 11311d7c55f..35c5147e2fa 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -978,7 +978,6 @@ class OC_Helper { $quota = OC_Util::getUserQuota(\OCP\User::getUser()); if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) { // always get free space / total space from root + mount points - $path = ''; return self::getGlobalStorageInfo(); } } diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 59f26423afa..b070a299a16 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -391,13 +391,10 @@ class OC_L10N implements \OCP\IL10N { switch($type) { case 'date': return Punic\Calendar::formatDate($value, $width, $locale); - break; case 'datetime': return Punic\Calendar::formatDatetime($value, $width, $locale); - break; case 'time': return Punic\Calendar::formatTime($value, $width, $locale); - break; default: return false; } diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php index 8d3ed1f1cb4..f662bde2858 100644 --- a/lib/private/ocs/cloud.php +++ b/lib/private/ocs/cloud.php @@ -25,7 +25,7 @@ class OC_OCS_Cloud { - public static function getCapabilities($parameters) { + public static function getCapabilities() { $result = array(); list($major, $minor, $micro) = OC_Util::getVersion(); $result['version'] = array( diff --git a/lib/private/ocs/config.php b/lib/private/ocs/config.php index 295da5b01d3..fc9640b6cc4 100644 --- a/lib/private/ocs/config.php +++ b/lib/private/ocs/config.php @@ -23,7 +23,7 @@ class OC_OCS_Config { - public static function apiConfig($parameters) { + public static function apiConfig() { $xml['version'] = '1.7'; $xml['website'] = 'ownCloud'; $xml['host'] = OCP\Util::getServerHost(); diff --git a/lib/private/ocs/person.php b/lib/private/ocs/person.php index 0e0d75305d1..0059982c55e 100644 --- a/lib/private/ocs/person.php +++ b/lib/private/ocs/person.php @@ -23,7 +23,7 @@ class OC_OCS_Person { - public static function check($parameters) { + public static function check() { $login = isset($_POST['login']) ? $_POST['login'] : false; $password = isset($_POST['password']) ? $_POST['password'] : false; if($login && $password) { diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php index 80fd0c7ebb4..ea817388f86 100644 --- a/lib/private/preview/txt.php +++ b/lib/private/preview/txt.php @@ -55,7 +55,7 @@ class TXT extends Provider { $lines = preg_split("/\r\n|\n|\r/", $content); - $fontSize = 5; //5px + $fontSize = ($maxX) ? (int) ((5 / 36) * $maxX) : 5; //5px $lineSize = ceil($fontSize * 1.25); $image = imagecreate($maxX, $maxY); diff --git a/lib/private/response.php b/lib/private/response.php index 018c44d2367..5725af2b893 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -212,9 +212,10 @@ class OC_Response { } /** - * Send file as response, checking and setting caching headers - * @param string $filepath of file to send - */ + * Send file as response, checking and setting caching headers + * @param string $filepath of file to send + * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead + */ static public function sendFile($filepath) { $fp = fopen($filepath, 'rb'); if ($fp) { diff --git a/lib/private/route/route.php b/lib/private/route/route.php index cb864d3d73d..b33360f11ec 100644 --- a/lib/private/route/route.php +++ b/lib/private/route/route.php @@ -37,7 +37,7 @@ class Route extends SymfonyRoute implements IRoute { * @return \OC\Route\Route */ public function method($method) { - $this->setRequirement('_method', strtoupper($method)); + $this->setMethods($method); return $this; } @@ -109,7 +109,7 @@ class Route extends SymfonyRoute implements IRoute { * @return \OC\Route\Route */ public function requirements($requirements) { - $method = $this->getRequirement('_method'); + $method = $this->getMethods(); $this->setRequirements($requirements); if (isset($requirements['_method'])) { $method = $requirements['_method']; diff --git a/lib/private/security/certificate.php b/lib/private/security/certificate.php index 468427d0702..0d7fcc4148d 100644 --- a/lib/private/security/certificate.php +++ b/lib/private/security/certificate.php @@ -49,18 +49,18 @@ class Certificate implements ICertificate { */ public function __construct($data, $name) { $this->name = $name; - try { - $gmt = new \DateTimeZone('GMT'); - $info = openssl_x509_parse($data); - $this->commonName = isset($info['subject']['CN']) ? $info['subject']['CN'] : null; - $this->organization = isset($info['subject']['O']) ? $info['subject']['O'] : null; - $this->issueDate = new \DateTime('@' . $info['validFrom_time_t'], $gmt); - $this->expireDate = new \DateTime('@' . $info['validTo_time_t'], $gmt); - $this->issuerName = isset($info['issuer']['CN']) ? $info['issuer']['CN'] : null; - $this->issuerOrganization = isset($info['issuer']['O']) ? $info['issuer']['O'] : null; - } catch (\Exception $e) { + $gmt = new \DateTimeZone('GMT'); + $info = openssl_x509_parse($data); + if(!is_array($info)) { throw new \Exception('Certificate could not get parsed.'); } + + $this->commonName = isset($info['subject']['CN']) ? $info['subject']['CN'] : null; + $this->organization = isset($info['subject']['O']) ? $info['subject']['O'] : null; + $this->issueDate = new \DateTime('@' . $info['validFrom_time_t'], $gmt); + $this->expireDate = new \DateTime('@' . $info['validTo_time_t'], $gmt); + $this->issuerName = isset($info['issuer']['CN']) ? $info['issuer']['CN'] : null; + $this->issuerOrganization = isset($info['issuer']['O']) ? $info['issuer']['O'] : null; } /** diff --git a/lib/private/security/certificatemanager.php b/lib/private/security/certificatemanager.php index beeb87a8316..d61c7f29327 100644 --- a/lib/private/security/certificatemanager.php +++ b/lib/private/security/certificatemanager.php @@ -107,12 +107,12 @@ class CertificateManager implements ICertificateManager { * * @param string $certificate the certificate data * @param string $name the filename for the certificate - * @return \OCP\ICertificate|void|bool + * @return \OCP\ICertificate * @throws \Exception If the certificate could not get added */ public function addCertificate($certificate, $name) { if (!Filesystem::isValidPath($name) or Filesystem::isFileBlacklisted($name)) { - return false; + throw new \Exception('Filename is not valid'); } $dir = $this->getPathToCertificates() . 'uploads/'; diff --git a/lib/private/setup/mssql.php b/lib/private/setup/mssql.php index 8a4904b9243..f8815259af4 100644 --- a/lib/private/setup/mssql.php +++ b/lib/private/setup/mssql.php @@ -32,11 +32,9 @@ class MSSQL extends AbstractDatabase { $masterConnection = @sqlsrv_connect($this->dbhost, $masterConnectionInfo); if(!$masterConnection) { - $entry = null; + $entry = ''; if( ($errors = sqlsrv_errors() ) != null) { $entry='DB Error: "'.print_r(sqlsrv_errors()).'"<br />'; - } else { - $entry = ''; } throw new \OC\DatabaseSetupException($this->trans->t('MS SQL username and/or password not valid: %s', array($entry)), $this->trans->t('You need to enter either an existing account or the administrator.')); diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php index 968a2d5c19b..6eff4cc246f 100644 --- a/lib/private/share/hooks.php +++ b/lib/private/share/hooks.php @@ -32,7 +32,7 @@ class Hooks extends \OC\Share\Constants { // Delete any items shared with the deleted user $query = \OC_DB::prepare('DELETE FROM `*PREFIX*share`' .' WHERE `share_with` = ? AND `share_type` = ? OR `share_type` = ?'); - $result = $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique)); + $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique)); // Delete any items the deleted user shared $query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*share` WHERE `uid_owner` = ?'); $result = $query->execute(array($arguments['uid'])); diff --git a/lib/private/subadmin.php b/lib/private/subadmin.php index 10ef87bac18..ec4f9f3b899 100644 --- a/lib/private/subadmin.php +++ b/lib/private/subadmin.php @@ -43,7 +43,7 @@ class OC_SubAdmin{ */ public static function createSubAdmin($uid, $gid) { $stmt = OC_DB::prepare('INSERT INTO `*PREFIX*group_admin` (`gid`,`uid`) VALUES(?,?)'); - $result = $stmt->execute(array($gid, $uid)); + $stmt->execute(array($gid, $uid)); OC_Hook::emit( "OC_SubAdmin", "post_createSubAdmin", array( "gid" => $gid )); return true; } @@ -56,7 +56,7 @@ class OC_SubAdmin{ */ public static function deleteSubAdmin($uid, $gid) { $stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `gid` = ? AND `uid` = ?'); - $result = $stmt->execute(array($gid, $uid)); + $stmt->execute(array($gid, $uid)); OC_Hook::emit( "OC_SubAdmin", "post_deleteSubAdmin", array( "gid" => $gid )); return true; } @@ -177,7 +177,7 @@ class OC_SubAdmin{ */ public static function post_deleteUser($parameters) { $stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `uid` = ?'); - $result = $stmt->execute(array($parameters['uid'])); + $stmt->execute(array($parameters['uid'])); return true; } @@ -188,7 +188,7 @@ class OC_SubAdmin{ */ public static function post_deleteGroup($parameters) { $stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `gid` = ?'); - $result = $stmt->execute(array($parameters['gid'])); + $stmt->execute(array($parameters['gid'])); return true; } } diff --git a/lib/private/tags.php b/lib/private/tags.php index 84ee5c98dfd..6edd7b2f980 100644 --- a/lib/private/tags.php +++ b/lib/private/tags.php @@ -228,9 +228,9 @@ class Tags implements \OCP\ITags { while ($row = $result->fetch()) { $objId = (int)$row['objid']; if (!isset($entries[$objId])) { - $entry = $entries[$objId] = array(); + $entries[$objId] = array(); } - $entry = $entries[$objId][] = $row['category']; + $entries[$objId][] = $row['category']; } if (\OCP\DB::isError($result)) { \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage(), \OCP\Util::ERROR); diff --git a/lib/private/template/resourcenotfoundexception.php b/lib/private/template/resourcenotfoundexception.php index a422563d541..26655b78eee 100644 --- a/lib/private/template/resourcenotfoundexception.php +++ b/lib/private/template/resourcenotfoundexception.php @@ -39,6 +39,6 @@ class ResourceNotFoundException extends \LogicException { * @return string */ public function getResourcePath() { - return $this->resource . '/' . $this->webPath; + return $this->webPath . '/' . $this->resource; } } diff --git a/lib/public/api.php b/lib/public/api.php index 7ef6902634c..6b920b6cf52 100644 --- a/lib/public/api.php +++ b/lib/public/api.php @@ -38,17 +38,35 @@ namespace OCP; class API { /** + * API authentication levels + * @since 8.1.0 + */ + const GUEST_AUTH = 0; + const USER_AUTH = 1; + const SUBADMIN_AUTH = 2; + const ADMIN_AUTH = 3; + + /** + * API Response Codes + * @since 8.1.0 + */ + const RESPOND_UNAUTHORISED = 997; + const RESPOND_SERVER_ERROR = 996; + const RESPOND_NOT_FOUND = 998; + const RESPOND_UNKNOWN_ERROR = 999; + + /** * registers an api call * @param string $method the http method * @param string $url the url to match * @param callable $action the function to run * @param string $app the id of the app registering the call - * @param int $authLevel the level of authentication required for the call (See OC_API constants) + * @param int $authLevel the level of authentication required for the call (See `self::*_AUTH` constants) * @param array $defaults * @param array $requirements * @since 5.0.0 */ - public static function register($method, $url, $action, $app, $authLevel = OC_API::USER_AUTH, + public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, $defaults = array(), $requirements = array()){ \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); } diff --git a/lib/public/app.php b/lib/public/app.php index 3f30e0cd031..13f41025425 100644 --- a/lib/public/app.php +++ b/lib/public/app.php @@ -46,7 +46,7 @@ class App { * @param array $data with all information * @return boolean * - * @deprecated This method is deprecated. Do not call it anymore. + * @deprecated 4.5.0 This method is deprecated. Do not call it anymore. * It'll remain in our public API for compatibility reasons. * */ @@ -72,7 +72,7 @@ class App { * @param array $data containing the data * @return boolean * - * @deprecated Use \OC::$server->getNavigationManager()->add() instead to + * @deprecated 8.1.0 Use \OC::$server->getNavigationManager()->add() instead to * register a closure, this helps to speed up all requests against ownCloud * @since 4.0.0 */ @@ -90,7 +90,7 @@ class App { * property from all other entries. The templates can use this for * highlighting the current position of the user. * - * @deprecated Use \OC::$server->getNavigationManager()->setActiveEntry() instead + * @deprecated 8.1.0 Use \OC::$server->getNavigationManager()->setActiveEntry() instead * @since 4.0.0 */ public static function setActiveNavigationEntry( $id ) { diff --git a/lib/public/appframework/controller.php b/lib/public/appframework/controller.php index 7eff52649ce..b8986c0b772 100644 --- a/lib/public/appframework/controller.php +++ b/lib/public/appframework/controller.php @@ -154,7 +154,7 @@ abstract class Controller { /** * Lets you access post and get parameters by the index - * @deprecated write your parameters as method arguments instead + * @deprecated 7.0.0 write your parameters as method arguments instead * @param string $key the key which you want to access in the URL Parameter * placeholder, $_POST or $_GET array. * The priority how they're returned is the following: @@ -173,7 +173,7 @@ abstract class Controller { /** * Returns all params that were received, be it from the request * (as GET or POST) or through the URL by the route - * @deprecated use $this->request instead + * @deprecated 7.0.0 use $this->request instead * @return array the array with all parameters * @since 6.0.0 */ @@ -184,7 +184,7 @@ abstract class Controller { /** * Returns the method of the request - * @deprecated use $this->request instead + * @deprecated 7.0.0 use $this->request instead * @return string the method of the request (POST, GET, etc) * @since 6.0.0 */ @@ -195,7 +195,7 @@ abstract class Controller { /** * Shortcut for accessing an uploaded file through the $_FILES array - * @deprecated use $this->request instead + * @deprecated 7.0.0 use $this->request instead * @param string $key the key that will be taken from the $_FILES array * @return array the file in the $_FILES element * @since 6.0.0 @@ -207,7 +207,7 @@ abstract class Controller { /** * Shortcut for getting env variables - * @deprecated use $this->request instead + * @deprecated 7.0.0 use $this->request instead * @param string $key the key that will be taken from the $_ENV array * @return array the value in the $_ENV element * @since 6.0.0 @@ -219,7 +219,7 @@ abstract class Controller { /** * Shortcut for getting cookie variables - * @deprecated use $this->request instead + * @deprecated 7.0.0 use $this->request instead * @param string $key the key that will be taken from the $_COOKIE array * @return array the value in the $_COOKIE element * @since 6.0.0 @@ -231,7 +231,7 @@ abstract class Controller { /** * Shortcut for rendering a template - * @deprecated return a template response instead + * @deprecated 7.0.0 return a template response instead * @param string $templateName the name of the template * @param array $params the template parameters in key => value structure * @param string $renderAs user renders a full page, blank only your template diff --git a/lib/public/appframework/iapi.php b/lib/public/appframework/iapi.php index a8df1552b26..2de2a360453 100644 --- a/lib/public/appframework/iapi.php +++ b/lib/public/appframework/iapi.php @@ -33,7 +33,7 @@ namespace OCP\AppFramework; /** * A few very basic and frequently used API functions are combined in here - * @deprecated + * @deprecated 8.0.0 */ interface IApi { @@ -41,14 +41,14 @@ interface IApi { /** * Gets the userid of the current user * @return string the user id of the current user - * @deprecated Use \OC::$server->getUserSession()->getUser()->getUID() + * @deprecated 8.0.0 Use \OC::$server->getUserSession()->getUser()->getUID() */ function getUserId(); /** * Adds a new javascript file - * @deprecated include javascript and css in template files + * @deprecated 8.0.0 include javascript and css in template files * @param string $scriptName the name of the javascript in js/ without the suffix * @param string $appName the name of the app, defaults to the current one * @return void @@ -58,7 +58,7 @@ interface IApi { /** * Adds a new css file - * @deprecated include javascript and css in template files + * @deprecated 8.0.0 include javascript and css in template files * @param string $styleName the name of the css file in css/without the suffix * @param string $appName the name of the app, defaults to the current one * @return void @@ -67,7 +67,7 @@ interface IApi { /** - * @deprecated include javascript and css in template files + * @deprecated 8.0.0 include javascript and css in template files * shorthand for addScript for files in the 3rdparty directory * @param string $name the name of the file without the suffix * @return void @@ -76,7 +76,7 @@ interface IApi { /** - * @deprecated include javascript and css in template files + * @deprecated 8.0.0 include javascript and css in template files * shorthand for addStyle for files in the 3rdparty directory * @param string $name the name of the file without the suffix * @return void @@ -86,7 +86,7 @@ interface IApi { /** * Checks if an app is enabled - * @deprecated communication between apps should happen over built in + * @deprecated 8.0.0 communication between apps should happen over built in * callbacks or interfaces (check the contacts and calendar managers) * Checks if an app is enabled * also use \OC::$server->getAppManager()->isEnabledForUser($appName) diff --git a/lib/public/appframework/iappcontainer.php b/lib/public/appframework/iappcontainer.php index 47eba58aece..64b1082aa97 100644 --- a/lib/public/appframework/iappcontainer.php +++ b/lib/public/appframework/iappcontainer.php @@ -44,7 +44,7 @@ interface IAppContainer extends IContainer { function getAppName(); /** - * @deprecated implements only deprecated methods + * @deprecated 8.0.0 implements only deprecated methods * @return IApi * @since 6.0.0 */ @@ -64,23 +64,21 @@ interface IAppContainer extends IContainer { function registerMiddleWare($middleWare); /** - * @deprecated use IUserSession->isLoggedIn() + * @deprecated 8.0.0 use IUserSession->isLoggedIn() * @return boolean * @since 6.0.0 */ function isLoggedIn(); /** - * @deprecated use IGroupManager->isAdmin($userId) + * @deprecated 8.0.0 use IGroupManager->isAdmin($userId) * @return boolean - * @deprecated use the groupmanager instead to find out if the user is in - * the admin group * @since 6.0.0 */ function isAdminUser(); /** - * @deprecated use the ILogger instead + * @deprecated 8.0.0 use the ILogger instead * @param string $message * @param string $level * @return mixed diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index 54addd8f477..42fcf76b876 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -60,7 +60,7 @@ class BackgroundJob { * @since 5.0.0 */ public static function getExecutionType() { - return \OC_BackgroundJob::getExecutionType(); + return \OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax'); } /** @@ -74,7 +74,10 @@ class BackgroundJob { * @since 5.0.0 */ public static function setExecutionType($type) { - return \OC_BackgroundJob::setExecutionType($type); + if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { + return false; + } + \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type); } /** @@ -89,7 +92,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * creates a regular task * @param string $klass class name * @param string $method method name @@ -104,7 +107,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * gets all regular tasks * @return array * @@ -125,7 +128,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * Gets one queued task * @param int $id ID of the task * @return BackgroundJob\IJob|null @@ -137,7 +140,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * Gets all queued tasks * @return array an array of associative arrays * @since 4.5.0 @@ -157,7 +160,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * Gets all queued tasks of a specific app * @param string $app app name * @return array an array of associative arrays @@ -180,7 +183,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * queues a task * @param string $app app name * @param string $class class name @@ -195,7 +198,7 @@ class BackgroundJob { } /** - * @deprecated + * @deprecated 6.0.0 * deletes a queued task * @param int $id id of task * @return boolean|null diff --git a/lib/public/config.php b/lib/public/config.php index acafdccd4ee..86e18de78e1 100644 --- a/lib/public/config.php +++ b/lib/public/config.php @@ -43,7 +43,7 @@ namespace OCP; /** * This class provides functions to read and write configuration data. * configuration can be on a system, application or user level - * @deprecated use methods of \OCP\IConfig + * @deprecated 8.0.0 use methods of \OCP\IConfig */ class Config { /** @@ -51,7 +51,7 @@ class Config { * @param string $key key * @param mixed $default = null default value * @return mixed the value or $default - * @deprecated use method getSystemValue of \OCP\IConfig + * @deprecated 8.0.0 use method getSystemValue of \OCP\IConfig * * This function gets the value from config.php. If it does not exist, * $default will be returned. @@ -65,7 +65,7 @@ class Config { * @param string $key key * @param mixed $value value * @return bool - * @deprecated use method setSystemValue of \OCP\IConfig + * @deprecated 8.0.0 use method setSystemValue of \OCP\IConfig * * This function sets the value and writes the config.php. If the file can * not be written, false will be returned. @@ -82,7 +82,7 @@ class Config { /** * Deletes a value from config.php * @param string $key key - * @deprecated use method deleteSystemValue of \OCP\IConfig + * @deprecated 8.0.0 use method deleteSystemValue of \OCP\IConfig * * This function deletes the value from config.php. */ @@ -96,7 +96,7 @@ class Config { * @param string $key key * @param string $default = null, default value if the key does not exist * @return string the value or $default - * @deprecated use method getAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig * * This function gets a value from the appconfig table. If the key does * not exist the default value will be returned @@ -111,7 +111,7 @@ class Config { * @param string $key key * @param string $value value * @return boolean true/false - * @deprecated use method setAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig * * Sets a value. If the key did not exist before it will be created. */ @@ -131,7 +131,7 @@ class Config { * @param string $key key * @param string $default = null, default value if the key does not exist * @return string the value or $default - * @deprecated use method getUserValue of \OCP\IConfig + * @deprecated 8.0.0 use method getUserValue of \OCP\IConfig * * This function gets a value from the preferences table. If the key does * not exist the default value will be returned @@ -147,7 +147,7 @@ class Config { * @param string $key key * @param string $value value * @return bool - * @deprecated use method setUserValue of \OCP\IConfig + * @deprecated 8.0.0 use method setUserValue of \OCP\IConfig * * Adds a value to the preferences. If the key did not exist before, it * will be added automagically. diff --git a/lib/public/constants.php b/lib/public/constants.php index e104f767c03..4d44bf24928 100644 --- a/lib/public/constants.php +++ b/lib/public/constants.php @@ -28,25 +28,25 @@ namespace OCP; -/** @deprecated Use \OCP\Constants::PERMISSION_CREATE instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_CREATE instead */ const PERMISSION_CREATE = 4; -/** @deprecated Use \OCP\Constants::PERMISSION_READ instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_READ instead */ const PERMISSION_READ = 1; -/** @deprecated Use \OCP\Constants::PERMISSION_UPDATE instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_UPDATE instead */ const PERMISSION_UPDATE = 2; -/** @deprecated Use \OCP\Constants::PERMISSION_DELETE instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_DELETE instead */ const PERMISSION_DELETE = 8; -/** @deprecated Use \OCP\Constants::PERMISSION_SHARE instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_SHARE instead */ const PERMISSION_SHARE = 16; -/** @deprecated Use \OCP\Constants::PERMISSION_ALL instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_ALL instead */ const PERMISSION_ALL = 31; -/** @deprecated Use \OCP\Constants::FILENAME_INVALID_CHARS instead */ +/** @deprecated 8.0.0 Use \OCP\Constants::FILENAME_INVALID_CHARS instead */ const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n"; /** @@ -58,6 +58,7 @@ const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n"; class Constants { /** * CRUDS permissions. + * @since 8.0.0 */ const PERMISSION_CREATE = 4; const PERMISSION_READ = 1; @@ -66,5 +67,8 @@ class Constants { const PERMISSION_SHARE = 16; const PERMISSION_ALL = 31; + /** + * @since 8.0.0 + */ const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n"; } diff --git a/lib/public/db.php b/lib/public/db.php index 44afc800abc..9c5f9424dcb 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -89,7 +89,7 @@ class DB { * @since 4.5.0 */ public static function insertid($table=null) { - return(\OC_DB::insertid($table)); + return \OC::$server->getDatabaseConnection()->lastInsertId($table); } /** @@ -98,7 +98,7 @@ class DB { * @since 4.5.0 */ public static function beginTransaction() { - \OC_DB::beginTransaction(); + \OC::$server->getDatabaseConnection()->beginTransaction(); } /** @@ -107,7 +107,7 @@ class DB { * @since 4.5.0 */ public static function commit() { - \OC_DB::commit(); + \OC::$server->getDatabaseConnection()->commit(); } /** @@ -116,7 +116,7 @@ class DB { * @since 8.0.0 */ public static function rollback() { - \OC_DB::rollback(); + \OC::$server->getDatabaseConnection()->rollback(); } /** @@ -127,7 +127,8 @@ class DB { * @since 4.5.0 */ public static function isError($result) { - return(\OC_DB::isError($result)); + // Doctrine returns false on error (and throws an exception) + return $result === false; } /** @@ -138,7 +139,7 @@ class DB { * @since 6.0.0 */ public static function getErrorMessage() { - return(\OC_DB::getErrorMessage()); + return \OC::$server->getDatabaseConnection()->getError(); } } diff --git a/lib/public/files.php b/lib/public/files.php index 29c65e48fd6..c1dcffcbefb 100644 --- a/lib/public/files.php +++ b/lib/public/files.php @@ -81,7 +81,7 @@ class Files { * @since 5.0.0 */ public static function streamCopy( $source, $target ) { - list($count, $result) = \OC_Helper::streamCopy( $source, $target ); + list($count, ) = \OC_Helper::streamCopy( $source, $target ); return $count; } @@ -95,7 +95,7 @@ class Files { * @since 5.0.0 */ public static function tmpFile( $postfix='' ) { - return(\OC_Helper::tmpFile( $postfix )); + return \OC::$server->getTempManager()->getTemporaryFile($postfix); } /** @@ -107,7 +107,7 @@ class Files { * @since 5.0.0 */ public static function tmpFolder() { - return(\OC_Helper::tmpFolder()); + return \OC::$server->getTempManager()->getTemporaryFolder(); } /** diff --git a/lib/public/iappconfig.php b/lib/public/iappconfig.php index 5cf704a71a3..d89ffd9194a 100644 --- a/lib/public/iappconfig.php +++ b/lib/public/iappconfig.php @@ -45,7 +45,7 @@ interface IAppConfig { * @param string $key key * @param string $default = null, default value if the key does not exist * @return string the value or $default - * @deprecated use method getAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method getAppValue of \OCP\IConfig * * This function gets a value from the appconfig table. If the key does * not exist the default value will be returned @@ -58,7 +58,7 @@ interface IAppConfig { * @param string $app app * @param string $key key * @return bool - * @deprecated use method deleteAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig * @since 7.0.0 */ public function deleteKey($app, $key); @@ -67,7 +67,7 @@ interface IAppConfig { * Get the available keys for an app * @param string $app the app we are looking for * @return array an array of key names - * @deprecated use method getAppKeys of \OCP\IConfig + * @deprecated 8.0.0 use method getAppKeys of \OCP\IConfig * * This function gets all keys of an app. Please note that the values are * not returned. @@ -90,7 +90,7 @@ interface IAppConfig { * @param string $app app * @param string $key key * @param string $value value - * @deprecated use method setAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig * * Sets a value. If the key did not exist before it will be created. * @return void @@ -112,7 +112,7 @@ interface IAppConfig { * Remove app from appconfig * @param string $app app * @return bool - * @deprecated use method deleteAppValue of \OCP\IConfig + * @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig * * Removes all keys in appconfig belonging to the app. * @since 7.0.0 diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php index 6bf2ce1f19b..fc29212a599 100644 --- a/lib/public/iavatar.php +++ b/lib/public/iavatar.php @@ -37,7 +37,7 @@ interface IAvatar { * @return boolean|\OCP\IImage containing the avatar or false if there's no image * @since 6.0.0 */ - function get($size = 64); + public function get($size = 64); /** * Check if an avatar exists for the user @@ -56,12 +56,12 @@ interface IAvatar { * @return void * @since 6.0.0 */ - function set($data); + public function set($data); /** * remove the users avatar * @return void * @since 6.0.0 */ - function remove(); + public function remove(); } diff --git a/lib/public/iavatarmanager.php b/lib/public/iavatarmanager.php index 583b7f0afca..5ad5bf6a364 100644 --- a/lib/public/iavatarmanager.php +++ b/lib/public/iavatarmanager.php @@ -38,5 +38,5 @@ interface IAvatarManager { * @return \OCP\IAvatar * @since 6.0.0 */ - function getAvatar($user); + public function getAvatar($user); } diff --git a/lib/public/icertificatemanager.php b/lib/public/icertificatemanager.php index ec88f32e291..3014cd8f633 100644 --- a/lib/public/icertificatemanager.php +++ b/lib/public/icertificatemanager.php @@ -38,7 +38,8 @@ interface ICertificateManager { /** * @param string $certificate the certificate data * @param string $name the filename for the certificate - * @return bool | \OCP\ICertificate + * @return \OCP\ICertificate + * @throws \Exception If the certificate could not get added * @since 8.0.0 */ public function addCertificate($certificate, $name); diff --git a/lib/public/icontainer.php b/lib/public/icontainer.php index 27ca544ec67..35bf6a76ce8 100644 --- a/lib/public/icontainer.php +++ b/lib/public/icontainer.php @@ -47,7 +47,7 @@ interface IContainer { * @return mixed * @since 6.0.0 */ - function query($name); + public function query($name); /** * A value is stored in the container with it's corresponding name @@ -57,7 +57,7 @@ interface IContainer { * @return void * @since 6.0.0 */ - function registerParameter($name, $value); + public function registerParameter($name, $value); /** * A service is registered in the container where a closure is passed in which will actually @@ -72,5 +72,5 @@ interface IContainer { * @return void * @since 6.0.0 */ - function registerService($name, \Closure $closure, $shared = true); + public function registerService($name, \Closure $closure, $shared = true); } diff --git a/lib/public/ilogger.php b/lib/public/ilogger.php index c36d9ff285c..43b1ef70e5b 100644 --- a/lib/public/ilogger.php +++ b/lib/public/ilogger.php @@ -39,7 +39,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function emergency($message, array $context = array()); + public function emergency($message, array $context = array()); /** * Action must be taken immediately. @@ -49,7 +49,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function alert($message, array $context = array()); + public function alert($message, array $context = array()); /** * Critical conditions. @@ -59,7 +59,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function critical($message, array $context = array()); + public function critical($message, array $context = array()); /** * Runtime errors that do not require immediate action but should typically @@ -70,7 +70,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function error($message, array $context = array()); + public function error($message, array $context = array()); /** * Exceptional occurrences that are not errors. @@ -80,7 +80,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function warning($message, array $context = array()); + public function warning($message, array $context = array()); /** * Normal but significant events. @@ -90,7 +90,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function notice($message, array $context = array()); + public function notice($message, array $context = array()); /** * Interesting events. @@ -100,7 +100,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function info($message, array $context = array()); + public function info($message, array $context = array()); /** * Detailed debug information. @@ -110,7 +110,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - function debug($message, array $context = array()); + public function debug($message, array $context = array()); /** * Logs with an arbitrary level. @@ -121,5 +121,5 @@ interface ILogger { * @return mixed * @since 7.0.0 */ - function log($level, $message, array $context = array()); + public function log($level, $message, array $context = array()); } diff --git a/lib/public/irequest.php b/lib/public/irequest.php index a236c5df9a0..20fa543dd69 100644 --- a/lib/public/irequest.php +++ b/lib/public/irequest.php @@ -68,7 +68,7 @@ interface IRequest { * @return string * @since 6.0.0 */ - function getHeader($name); + public function getHeader($name); /** * Lets you access post and get parameters by the index @@ -131,7 +131,7 @@ interface IRequest { * @return array the value in the $_COOKIE element * @since 6.0.0 */ - function getCookie($key); + public function getCookie($key); /** diff --git a/lib/public/isearch.php b/lib/public/isearch.php index bb7ada86e31..f7a9b5fb55c 100644 --- a/lib/public/isearch.php +++ b/lib/public/isearch.php @@ -37,7 +37,7 @@ interface ISearch { * @param string $query * @param string[] $inApps optionally limit results to the given apps * @return array An array of OCP\Search\Result's - * @deprecated use searchPaged() with page and size + * @deprecated 8.0.0 use searchPaged() with page and size * @since 7.0.0 - parameter $inApps was added in 8.0.0 */ public function search($query, array $inApps = array()); diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php index f1eabda033c..9af1582dae9 100644 --- a/lib/public/iservercontainer.php +++ b/lib/public/iservercontainer.php @@ -175,7 +175,7 @@ interface IServerContainer { /** * Returns an instance of the db facade - * @deprecated use getDatabaseConnection, will be removed in ownCloud 10 + * @deprecated 8.1.0 use getDatabaseConnection, will be removed in ownCloud 10 * @return \OCP\IDb * @since 7.0.0 */ @@ -334,7 +334,7 @@ interface IServerContainer { /** * Returns an instance of the HTTP helper class * @return \OC\HTTPHelper - * @deprecated Use \OCP\Http\Client\IClientService + * @deprecated 8.1.0 Use \OCP\Http\Client\IClientService * @since 8.0.0 */ public function getHTTPHelper(); diff --git a/lib/public/json.php b/lib/public/json.php index d07d0014e23..ddb94dffdbe 100644 --- a/lib/public/json.php +++ b/lib/public/json.php @@ -36,14 +36,14 @@ namespace OCP; /** * This class provides convenient functions to generate and send JSON data. Useful for Ajax calls - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ class JSON { /** * Encode and print $data in JSON format * @param array $data The data to use * @param bool $setContentType the optional content type - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function encodedPrint( $data, $setContentType=true ) { \OC_JSON::encodedPrint($data, $setContentType); @@ -61,7 +61,7 @@ class JSON { * * Add this call to the start of all ajax method files that requires * an authenticated user. - * @deprecated Use annotation based ACLs from the AppFramework instead + * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead */ public static function checkLoggedIn() { \OC_JSON::checkLoggedIn(); @@ -84,7 +84,7 @@ class JSON { * a submittable form, you will need to add the requesttoken first as a * parameter to the ajax call, then assign it to the template and finally * add a hidden input field also named 'requesttoken' containing the value. - * @deprecated Use annotation based CSRF checks from the AppFramework instead + * @deprecated 8.1.0 Use annotation based CSRF checks from the AppFramework instead */ public static function callCheck() { \OC_JSON::callCheck(); @@ -98,7 +98,7 @@ class JSON { * * @param array $data The data to use * @return string json formatted string. - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function success( $data = array() ) { \OC_JSON::success($data); @@ -121,7 +121,7 @@ class JSON { * * @param array $data The data to use * @return string json formatted error string. - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function error( $data = array() ) { \OC_JSON::error( $data ); @@ -130,7 +130,7 @@ class JSON { /** * Set Content-Type header to jsonrequest * @param string $type The content type header - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function setContentTypeHeader( $type='application/json' ) { \OC_JSON::setContentTypeHeader($type); @@ -150,7 +150,7 @@ class JSON { * a specific app to be enabled. * * @param string $app The app to check - * @deprecated Use the AppFramework instead. It will automatically check if the app is enabled. + * @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled. */ public static function checkAppEnabled( $app ) { \OC_JSON::checkAppEnabled($app); @@ -169,7 +169,7 @@ class JSON { * Add this call to the start of all ajax method files that requires * administrative rights. * - * @deprecated Use annotation based ACLs from the AppFramework instead + * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead */ public static function checkAdminUser() { \OC_JSON::checkAdminUser(); @@ -179,7 +179,7 @@ class JSON { * Encode JSON * @param array $data * @return string - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function encode($data) { return \OC_JSON::encode($data); @@ -188,7 +188,7 @@ class JSON { /** * Check is a given user exists - send json error msg if not * @param string $user - * @deprecated Use a AppFramework JSONResponse instead + * @deprecated 8.1.0 Use a AppFramework JSONResponse instead */ public static function checkUserExists($user) { \OC_JSON::checkUserExists($user); diff --git a/lib/public/response.php b/lib/public/response.php index 1942c1ec373..42220e4cf9c 100644 --- a/lib/public/response.php +++ b/lib/public/response.php @@ -37,6 +37,7 @@ namespace OCP; /** * This class provides convenient functions to send the correct http response headers * @since 4.0.0 + * @deprecated 8.1.0 - Use AppFramework controllers instead and modify the response object */ class Response { /** @@ -103,6 +104,7 @@ class Response { * Send file as response, checking and setting caching headers * @param string $filepath of file to send * @since 4.0.0 + * @deprecated 8.1.0 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead */ static public function sendFile( $filepath ) { \OC_Response::sendFile( $filepath ); diff --git a/lib/public/template.php b/lib/public/template.php index be891369869..63079c0fc30 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -47,7 +47,7 @@ namespace OCP; * @return string to the image * * @see OC_Helper::imagePath - * @deprecated Use \OCP\Template::image_path() instead + * @deprecated 8.0.0 Use \OCP\Template::image_path() instead */ function image_path( $app, $image ) { return(\image_path( $app, $image )); @@ -58,7 +58,7 @@ function image_path( $app, $image ) { * Make OC_Helper::mimetypeIcon available as a simple function * @param string $mimetype * @return string to the image of this file type. - * @deprecated Use \OCP\Template::mimetype_icon() instead + * @deprecated 8.0.0 Use \OCP\Template::mimetype_icon() instead */ function mimetype_icon( $mimetype ) { return(\mimetype_icon( $mimetype )); @@ -68,7 +68,7 @@ function mimetype_icon( $mimetype ) { * Make preview_icon available as a simple function * @param string $path path to file * @return string to the preview of the image - * @deprecated Use \OCP\Template::preview_icon() instead + * @deprecated 8.0.0 Use \OCP\Template::preview_icon() instead */ function preview_icon( $path ) { return(\preview_icon( $path )); @@ -80,7 +80,7 @@ function preview_icon( $path ) { * @param string $path of file * @param string $token * @return string link to the preview - * @deprecated Use \OCP\Template::publicPreview_icon() instead + * @deprecated 8.0.0 Use \OCP\Template::publicPreview_icon() instead */ function publicPreview_icon ( $path, $token ) { return(\publicPreview_icon( $path, $token )); @@ -91,7 +91,7 @@ function publicPreview_icon ( $path, $token ) { * Example: 2048 to 2 kB. * @param int $bytes in bytes * @return string size as string - * @deprecated Use \OCP\Template::human_file_size() instead + * @deprecated 8.0.0 Use \OCP\Template::human_file_size() instead */ function human_file_size( $bytes ) { return(\human_file_size( $bytes )); @@ -104,7 +104,7 @@ function human_file_size( $bytes ) { * @param boolean $dateOnly * @return \OC_L10N_String human readable interpretation of the timestamp * - * @deprecated Use \OCP\Template::relative_modified_date() instead + * @deprecated 8.0.0 Use \OCP\Template::relative_modified_date() instead */ function relative_modified_date( $timestamp, $dateOnly = false ) { return(\relative_modified_date($timestamp, null, $dateOnly)); @@ -115,7 +115,7 @@ function relative_modified_date( $timestamp, $dateOnly = false ) { * Return a human readable outout for a file size. * @param integer $bytes size of a file in byte * @return string human readable interpretation of a file size - * @deprecated Use \OCP\Template::human_file_size() instead + * @deprecated 8.0.0 Use \OCP\Template::human_file_size() instead */ function simple_file_size($bytes) { return(\human_file_size($bytes)); @@ -128,7 +128,7 @@ function simple_file_size($bytes) { * @param mixed $selected which one is selected? * @param array $params the parameters * @return string html options - * @deprecated Use \OCP\Template::html_select_options() instead + * @deprecated 8.0.0 Use \OCP\Template::html_select_options() instead */ function html_select_options($options, $selected, $params=array()) { return(\html_select_options($options, $selected, $params)); diff --git a/lib/public/user.php b/lib/public/user.php index 24dd7690e3f..e2413e32783 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -48,7 +48,7 @@ class User { /** * Get the user id of the user currently logged in. * @return string uid or false - * @deprecated Use \OC::$server->getUserSession()->getUser()->getUID() + * @deprecated 8.0.0 Use \OC::$server->getUserSession()->getUser()->getUID() * @since 5.0.0 */ public static function getUser() { @@ -116,7 +116,7 @@ class User { /** * Logs the user out including all the session data * Logout, destroys session - * @deprecated Use \OC::$server->getUserSession()->logout(); + * @deprecated 8.0.0 Use \OC::$server->getUserSession()->logout(); * @since 5.0.0 */ public static function logout() { @@ -130,7 +130,7 @@ class User { * @return string|false username on success, false otherwise * * Check if the password is correct without logging in the user - * @deprecated Use \OC::$server->getUserManager()->checkPassword(); + * @deprecated 8.0.0 Use \OC::$server->getUserManager()->checkPassword(); * @since 5.0.0 */ public static function checkPassword( $uid, $password ) { diff --git a/lib/public/util.php b/lib/public/util.php index bc7f1b1f443..6eb5c6034c1 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -83,7 +83,7 @@ class Util { * @param string $ccaddress * @param string $ccname * @param string $bcc - * @deprecated Use \OCP\Mail\IMailer instead + * @deprecated 8.1.0 Use \OCP\Mail\IMailer instead * @since 4.0.0 */ public static function sendMail($toaddress, $toname, $subject, $mailtext, $fromaddress, $fromname, @@ -222,7 +222,7 @@ class Util { * @param DateTimeZone|string $timeZone where the given timestamp shall be converted to * @return string timestamp * - * @deprecated Use \OC::$server->query('DateTimeFormatter') instead + * @deprecated 8.0.0 Use \OC::$server->query('DateTimeFormatter') instead * @since 4.0.0 */ public static function formatDate($timestamp, $dateOnly=false, $timeZone = null) { @@ -233,7 +233,7 @@ class Util { * check if some encrypted files are stored * @return bool * - * @deprecated No longer required + * @deprecated 8.1.0 No longer required * @since 6.0.0 */ public static function encryptedFiles() { @@ -279,7 +279,7 @@ class Util { * @param array $parameters * @internal param array $args with param=>value, will be appended to the returned url * @return string the url - * @deprecated Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters) + * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkToRoute($route, $parameters) * @since 5.0.0 */ public static function linkToRoute( $route, $parameters = array() ) { @@ -293,7 +293,7 @@ class Util { * @param array $args array with param=>value, will be appended to the returned url * The value of $args will be urlencoded * @return string the url - * @deprecated Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args) + * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args) * @since 4.0.0 - parameter $args was added in 4.5.0 */ public static function linkTo( $app, $file, $args = array() ) { @@ -303,7 +303,7 @@ class Util { /** * Returns the server host, even if the website uses one or more reverse proxy * @return string the server host - * @deprecated Use \OCP\IRequest::getServerHost + * @deprecated 8.1.0 Use \OCP\IRequest::getServerHost * @since 4.0.0 */ public static function getServerHost() { @@ -359,7 +359,7 @@ class Util { /** * Returns the server protocol. It respects reverse proxy servers and load balancers * @return string the server protocol - * @deprecated Use \OCP\IRequest::getServerProtocol + * @deprecated 8.1.0 Use \OCP\IRequest::getServerProtocol * @since 4.5.0 */ public static function getServerProtocol() { @@ -369,7 +369,7 @@ class Util { /** * Returns the request uri, even if the website uses one or more reverse proxies * @return string the request uri - * @deprecated Use \OCP\IRequest::getRequestUri + * @deprecated 8.1.0 Use \OCP\IRequest::getRequestUri * @since 5.0.0 */ public static function getRequestUri() { @@ -379,7 +379,7 @@ class Util { /** * Returns the script name, even if the website uses one or more reverse proxies * @return string the script name - * @deprecated Use \OCP\IRequest::getScriptName + * @deprecated 8.1.0 Use \OCP\IRequest::getScriptName * @since 5.0.0 */ public static function getScriptName() { @@ -391,11 +391,11 @@ class Util { * @param string $app app * @param string $image image name * @return string the url - * @deprecated Use \OC::$server->getURLGenerator()->imagePath($app, $image) + * @deprecated 8.1.0 Use \OC::$server->getURLGenerator()->imagePath($app, $image) * @since 4.0.0 */ public static function imagePath( $app, $image ) { - return(\OC_Helper::imagePath( $app, $image )); + return \OC::$server->getURLGenerator()->imagePath($app, $image); } /** @@ -591,7 +591,7 @@ class Util { * Returns whether the given file name is valid * @param string $file file name to check * @return bool true if the file name is valid, false otherwise - * @deprecated use \OC\Files\View::verifyPath() + * @deprecated 8.1.0 use \OC\Files\View::verifyPath() * @since 7.0.0 */ public static function isValidFileName($file) { @@ -602,7 +602,7 @@ class Util { * Generates a cryptographic secure pseudo-random string * @param int $length of the random string * @return string - * @deprecated Use \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length); instead + * @deprecated 8.0.0 Use \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length); instead * @since 7.0.0 */ public static function generateRandomBytes($length = 30) { diff --git a/lib/repair/repairlegacystorages.php b/lib/repair/repairlegacystorages.php index 7086f2a8d2d..1bc49678f0d 100644 --- a/lib/repair/repairlegacystorages.php +++ b/lib/repair/repairlegacystorages.php @@ -102,7 +102,7 @@ class RepairLegacyStorages extends BasicEmitter { $newNumericId = (int)$newNumericId; // try and resolve the conflict // check which one of "local::" or "home::" needs to be kept - $result = $this->findStorageInCacheStatement->execute(array($oldNumericId, $newNumericId)); + $this->findStorageInCacheStatement->execute(array($oldNumericId, $newNumericId)); $row1 = $this->findStorageInCacheStatement->fetch(); $row2 = $this->findStorageInCacheStatement->fetch(); $this->findStorageInCacheStatement->closeCursor(); diff --git a/ocs/routes.php b/ocs/routes.php index 2a8fe5dc2af..751a16d538e 100644 --- a/ocs/routes.php +++ b/ocs/routes.php @@ -23,109 +23,111 @@ * */ +use OCP\API; + // Config -OC_API::register( +API::register( 'get', '/config', array('OC_OCS_Config', 'apiConfig'), 'core', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); // Person -OC_API::register( +API::register( 'post', '/person/check', array('OC_OCS_Person', 'check'), 'core', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); // Privatedata -OC_API::register( +API::register( 'get', '/privatedata/getattribute', array('OC_OCS_Privatedata', 'get'), 'core', - OC_API::USER_AUTH, + API::USER_AUTH, array('app' => '', 'key' => '') ); -OC_API::register( +API::register( 'get', '/privatedata/getattribute/{app}', array('OC_OCS_Privatedata', 'get'), 'core', - OC_API::USER_AUTH, + API::USER_AUTH, array('key' => '') ); -OC_API::register( +API::register( 'get', '/privatedata/getattribute/{app}/{key}', array('OC_OCS_Privatedata', 'get'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); -OC_API::register( +API::register( 'post', '/privatedata/setattribute/{app}/{key}', array('OC_OCS_Privatedata', 'set'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); -OC_API::register( +API::register( 'post', '/privatedata/deleteattribute/{app}/{key}', array('OC_OCS_Privatedata', 'delete'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); // cloud -OC_API::register( +API::register( 'get', '/cloud/capabilities', array('OC_OCS_Cloud', 'getCapabilities'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); -OC_API::register( +API::register( 'get', '/cloud/users/{userid}', array('OC_OCS_Cloud', 'getUser'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); -OC_API::register( +API::register( 'get', '/cloud/user', array('OC_OCS_Cloud', 'getCurrentUser'), 'core', - OC_API::USER_AUTH + API::USER_AUTH ); // Server-to-Server Sharing $s2s = new \OCA\Files_Sharing\API\Server2Server(); -OC_API::register('post', +API::register('post', '/cloud/shares', array($s2s, 'createShare'), 'files_sharing', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); -OC_API::register('post', +API::register('post', '/cloud/shares/{id}/accept', array($s2s, 'acceptShare'), 'files_sharing', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); -OC_API::register('post', +API::register('post', '/cloud/shares/{id}/decline', array($s2s, 'declineShare'), 'files_sharing', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); -OC_API::register('post', +API::register('post', '/cloud/shares/{id}/unshare', array($s2s, 'unshare'), 'files_sharing', - OC_API::GUEST_AUTH + API::GUEST_AUTH ); diff --git a/settings/ajax/addRootCertificate.php b/settings/ajax/addRootCertificate.php deleted file mode 100644 index 64a55eaede9..00000000000 --- a/settings/ajax/addRootCertificate.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * @author Lukas Reschke <lukas@owncloud.com> - * @author Robin Appelman <icewind@owncloud.com> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$l = new OC_L10N('core'); - -if (!isset($_FILES['rootcert_import'])) { - OCP\JSON::error(array('error' => 'No certificate uploaded')); - exit; -} - -$data = file_get_contents($_FILES['rootcert_import']['tmp_name']); -$filename = basename($_FILES['rootcert_import']['name']); - -$certificateManager = \OC::$server->getCertificateManager(); - -try { - $cert = $certificateManager->addCertificate($data, $filename); - OCP\JSON::success(array( - 'name' => $cert->getName(), - 'commonName' => $cert->getCommonName(), - 'organization' => $cert->getOrganization(), - 'validFrom' => $cert->getIssueDate()->getTimestamp(), - 'validTill' => $cert->getExpireDate()->getTimestamp(), - 'validFromString' => $l->l('date', $cert->getIssueDate()), - 'validTillString' => $l->l('date', $cert->getExpireDate()), - 'issuer' => $cert->getIssuerName(), - 'issuerOrganization' => $cert->getIssuerOrganization() - )); -} catch(\Exception $e) { - OCP\JSON::error(array('error' => 'Couldn\'t import SSL root certificate, allowed formats: PEM and DER')); -} diff --git a/settings/ajax/removeRootCertificate.php b/settings/ajax/removeRootCertificate.php deleted file mode 100644 index 4ef5fe32aed..00000000000 --- a/settings/ajax/removeRootCertificate.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * @author Björn Schießle <schiessle@owncloud.com> - * @author Lukas Reschke <lukas@owncloud.com> - * @author Robin Appelman <icewind@owncloud.com> - * - * @copyright Copyright (c) 2015, ownCloud, Inc. - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); - -$name = (string)$_POST['cert']; -$certificateManager = \OC::$server->getCertificateManager(); -$certificateManager->removeCertificate($name); diff --git a/settings/application.php b/settings/application.php index 59fe9f6b65a..920d172c93d 100644 --- a/settings/application.php +++ b/settings/application.php @@ -25,6 +25,7 @@ namespace OC\Settings; use OC\Files\View; use OC\Settings\Controller\AppSettingsController; +use OC\Settings\Controller\CertificateController; use OC\Settings\Controller\CheckSetupController; use OC\Settings\Controller\EncryptionController; use OC\Settings\Controller\GroupsController; @@ -97,6 +98,14 @@ class Application extends App { $c->query('Config') ); }); + $container->registerService('CertificateController', function(IContainer $c) { + return new CertificateController( + $c->query('AppName'), + $c->query('Request'), + $c->query('CertificateManager'), + $c->query('L10N') + ); + }); $container->registerService('GroupsController', function(IContainer $c) { return new GroupsController( $c->query('AppName'), @@ -223,5 +232,8 @@ class Application extends App { $container->registerService('DatabaseConnection', function(IContainer $c) { return $c->query('ServerContainer')->getDatabaseConnection(); }); + $container->registerService('CertificateManager', function(IContainer $c){ + return $c->query('ServerContainer')->getCertificateManager(); + }); } } diff --git a/settings/controller/certificatecontroller.php b/settings/controller/certificatecontroller.php new file mode 100644 index 00000000000..d9026cd42af --- /dev/null +++ b/settings/controller/certificatecontroller.php @@ -0,0 +1,93 @@ +<?php +/** + * @author Lukas Reschke <lukas@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OC\Settings\Controller; + +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\DataResponse; +use OCP\ICertificateManager; +use OCP\IL10N; +use OCP\IRequest; + +/** + * @package OC\Settings\Controller + */ +class CertificateController extends Controller { + /** @var ICertificateManager */ + private $certificateManager; + /** @var IL10N */ + private $l10n; + + /** + * @param string $appName + * @param IRequest $request + * @param ICertificateManager $certificateManager + * @param IL10N $l10n + */ + public function __construct($appName, + IRequest $request, + ICertificateManager $certificateManager, + IL10N $l10n) { + parent::__construct($appName, $request); + $this->certificateManager = $certificateManager; + $this->l10n = $l10n; + } + + /** + * Add a new personal root certificate to the users' trust store + * @return array + */ + public function addPersonalRootCertificate() { + $file = $this->request->getUploadedFile('rootcert_import'); + if(empty($file)) { + return new DataResponse(['message' => 'No file uploaded'], Http::STATUS_UNPROCESSABLE_ENTITY); + } + + try { + $certificate = $this->certificateManager->addCertificate(file_get_contents($file['tmp_name']), $file['name']); + return new DataResponse([ + 'name' => $certificate->getName(), + 'commonName' => $certificate->getCommonName(), + 'organization' => $certificate->getOrganization(), + 'validFrom' => $certificate->getIssueDate()->getTimestamp(), + 'validTill' => $certificate->getExpireDate()->getTimestamp(), + 'validFromString' => $this->l10n->l('date', $certificate->getIssueDate()), + 'validTillString' => $this->l10n->l('date', $certificate->getExpireDate()), + 'issuer' => $certificate->getIssuerName(), + 'issuerOrganization' => $certificate->getIssuerOrganization(), + ]); + } catch (\Exception $e) { + return new DataResponse('An error occurred.', Http::STATUS_UNPROCESSABLE_ENTITY); + } + } + + /** + * Removes a personal root certificate from the users' trust store + * @param string $certificateIdentifier + * @return DataResponse + */ + public function removePersonalRootCertificate($certificateIdentifier) { + $this->certificateManager->removeCertificate($certificateIdentifier); + return new DataResponse(); + } + +} diff --git a/settings/js/personal.js b/settings/js/personal.js index 687b02399a7..f3fcf614bfa 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -297,8 +297,8 @@ $(document).ready(function () { $('#sslCertificate').on('click', 'td.remove > img', function () { var row = $(this).parent().parent(); - $.post(OC.generateUrl('settings/ajax/removeRootCertificate'), { - cert: row.data('name') + $.ajax(OC.generateUrl('settings/personal/certificate/{certificate}', {certificate: row.data('name')}), { + type: 'DELETE' }); row.remove(); return true; @@ -307,18 +307,19 @@ $(document).ready(function () { $('#sslCertificate tr > td').tipsy({gravity: 'n', live: true}); $('#rootcert_import').fileupload({ - done: function (e, data) { - var issueDate = new Date(data.result.validFrom * 1000); - var expireDate = new Date(data.result.validTill * 1000); + success: function (data) { + var issueDate = new Date(data.validFrom * 1000); + var expireDate = new Date(data.validTill * 1000); var now = new Date(); var isExpired = !(issueDate <= now && now <= expireDate); var row = $('<tr/>'); + row.data('name', data.name); row.addClass(isExpired? 'expired': 'valid'); - row.append($('<td/>').attr('title', data.result.organization).text(data.result.commonName)); - row.append($('<td/>').attr('title', t('core,', 'Valid until {date}', {date: data.result.validFromString})) - .text(data.result.validTillString)); - row.append($('<td/>').attr('title', data.result.issuerOrganization).text(data.result.issuer)); + row.append($('<td/>').attr('title', data.organization).text(data.commonName)); + row.append($('<td/>').attr('title', t('core,', 'Valid until {date}', {date: data.validTillString})) + .text(data.validTillString)); + row.append($('<td/>').attr('title', data.issuerOrganization).text(data.issuer)); row.append($('<td/>').addClass('remove').append( $('<img/>').attr({ alt: t('core', 'Delete'), @@ -328,6 +329,10 @@ $(document).ready(function () { )); $('#sslCertificate tbody').append(row); + }, + fail: function () { + OC.Notification.showTemporary( + t('settings', 'An error occurred. Please upload an ASCII-encoded PEM certificate.')); } }); @@ -336,8 +341,9 @@ $(document).ready(function () { }); }); -OC.Encryption = { -}; +if (!OC.Encryption) { + OC.Encryption = {}; +} OC.Encryption.msg = { start: function (selector, msg) { diff --git a/settings/l10n/cs_CZ.js b/settings/l10n/cs_CZ.js index e18898a072a..5ffadd910bc 100644 --- a/settings/l10n/cs_CZ.js +++ b/settings/l10n/cs_CZ.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Upozornění zabezpečení a nastavení", "Sharing" : "Sdílení", "External Storage" : "Externí úložiště", + "Server-side encryption" : "Šifrování na serveru", "Cron" : "Cron", + "Email server" : "Emailový server", "Log" : "Záznam", "Tips & tricks" : "Tipy a triky", "Updates" : "Aktualizace", @@ -26,6 +28,8 @@ OC.L10N.register( "Unable to change password" : "Změna hesla se nezdařila", "Enabled" : "Povoleno", "Not enabled" : "Vypnuto", + "A problem occurred, please check your log files (Error: %s)" : "Došlo k chybě, zkontrolujte prosím log (Chyba: %s)", + "Migration Completed" : "Migrace dokončena", "Group already exists." : "Skupina již existuje.", "Unable to add group." : "Nelze přidat skupinu.", "Unable to delete group." : "Nelze smazat skupinu.", diff --git a/settings/l10n/cs_CZ.json b/settings/l10n/cs_CZ.json index fd24779b135..3cc70bbaf0f 100644 --- a/settings/l10n/cs_CZ.json +++ b/settings/l10n/cs_CZ.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Upozornění zabezpečení a nastavení", "Sharing" : "Sdílení", "External Storage" : "Externí úložiště", + "Server-side encryption" : "Šifrování na serveru", "Cron" : "Cron", + "Email server" : "Emailový server", "Log" : "Záznam", "Tips & tricks" : "Tipy a triky", "Updates" : "Aktualizace", @@ -24,6 +26,8 @@ "Unable to change password" : "Změna hesla se nezdařila", "Enabled" : "Povoleno", "Not enabled" : "Vypnuto", + "A problem occurred, please check your log files (Error: %s)" : "Došlo k chybě, zkontrolujte prosím log (Chyba: %s)", + "Migration Completed" : "Migrace dokončena", "Group already exists." : "Skupina již existuje.", "Unable to add group." : "Nelze přidat skupinu.", "Unable to delete group." : "Nelze smazat skupinu.", diff --git a/settings/l10n/el.js b/settings/l10n/el.js index 75871aecf3f..c554075686b 100644 --- a/settings/l10n/el.js +++ b/settings/l10n/el.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Προειδοποιήσεις ασφάλειας & ρυθμίσεων", "Sharing" : "Διαμοιρασμός", "External Storage" : "Εξωτερικό Αποθηκευτικό Μέσο", + "Server-side encryption" : "Κρυπτογράφηση από τον Διακομιστή", "Cron" : "Cron", + "Email server" : "Διακομιστής Email", "Log" : "Καταγραφές", "Tips & tricks" : "Συμβουλές & τεχνάσματα", "Updates" : "Ενημερώσεις", @@ -137,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Εκτελεί μια διεργασία κάθε φορά που φορτώνεται μια σελίδα", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "Το cron.php είναι καταχωρημένο σε μια υπηρεσία webcron ώστε να καλεί το cron.php κάθε 15 λεπτά μέσω http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Χρησιμοποιήστε την cron υπηρεσία του συτήματος για να καλέσετε το cron.php αρχείο κάθε 15 λεπτά.", + "Enable server-side encryption" : "Ενεργοποίηση κρυπτογράφησης από το διακομιστή", "Start migration" : "Έναρξη μετάβασης", "This is used for sending out notifications." : "Χρησιμοποιείται για αποστολή ειδοποιήσεων.", "Send mode" : "Κατάσταση αποστολής", diff --git a/settings/l10n/el.json b/settings/l10n/el.json index 368a7d292b6..79574e1ae72 100644 --- a/settings/l10n/el.json +++ b/settings/l10n/el.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Προειδοποιήσεις ασφάλειας & ρυθμίσεων", "Sharing" : "Διαμοιρασμός", "External Storage" : "Εξωτερικό Αποθηκευτικό Μέσο", + "Server-side encryption" : "Κρυπτογράφηση από τον Διακομιστή", "Cron" : "Cron", + "Email server" : "Διακομιστής Email", "Log" : "Καταγραφές", "Tips & tricks" : "Συμβουλές & τεχνάσματα", "Updates" : "Ενημερώσεις", @@ -135,6 +137,7 @@ "Execute one task with each page loaded" : "Εκτελεί μια διεργασία κάθε φορά που φορτώνεται μια σελίδα", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "Το cron.php είναι καταχωρημένο σε μια υπηρεσία webcron ώστε να καλεί το cron.php κάθε 15 λεπτά μέσω http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Χρησιμοποιήστε την cron υπηρεσία του συτήματος για να καλέσετε το cron.php αρχείο κάθε 15 λεπτά.", + "Enable server-side encryption" : "Ενεργοποίηση κρυπτογράφησης από το διακομιστή", "Start migration" : "Έναρξη μετάβασης", "This is used for sending out notifications." : "Χρησιμοποιείται για αποστολή ειδοποιήσεων.", "Send mode" : "Κατάσταση αποστολής", diff --git a/settings/l10n/es.js b/settings/l10n/es.js index dfbbcb0566e..4a9a7dd0d00 100644 --- a/settings/l10n/es.js +++ b/settings/l10n/es.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Avisos de seguidad y configuración", "Sharing" : "Compartiendo", "External Storage" : "Almacenamiento externo", + "Server-side encryption" : "Cifrado en el servidor", "Cron" : "Cron", + "Email server" : "Servidor de correo electrónico", "Log" : "Registro", "Tips & tricks" : "Sugerencias y trucos", "Updates" : "Actualizaciones", @@ -26,6 +28,8 @@ OC.L10N.register( "Unable to change password" : "No se ha podido cambiar la contraseña", "Enabled" : "Habilitado", "Not enabled" : "No habilitado", + "A problem occurred, please check your log files (Error: %s)" : "Ocurrió un problema, por favor verifique los archivos de registro (Error: %s)", + "Migration Completed" : "Migración finalizada", "Group already exists." : "El grupo ya existe.", "Unable to add group." : "No se pudo agregar el grupo.", "Unable to delete group." : "No se pudo eliminar el grupo.", @@ -46,6 +50,8 @@ OC.L10N.register( "Email saved" : "Correo electrónico guardado", "Are you really sure you want add \"{domain}\" as trusted domain?" : "¿Está seguro de querer agregar \"{domain}\" como un dominio de confianza?", "Add trusted domain" : "Agregar dominio de confianza", + "Migration in progress. Please wait until the migration is finished" : "Migración en curso. Por favor espere hasta que la migración esté finalizada.", + "Migration started …" : "Migración iniciada...", "Sending..." : "Enviando...", "All" : "Todos", "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Aplicaciones oficiales son desarrolladas por y dentro de la comunidad ownCloud. Estas ofrecen una funcionalidad central con ownCloud y están listas para su uso en producción. ", @@ -133,6 +139,8 @@ OC.L10N.register( "Execute one task with each page loaded" : "Ejecutar una tarea con cada página cargada", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php se registra en un servicio webcron para llamar a cron.php cada 15 minutos a través de HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Usar el servicio cron del sistema para llamar al archivo cron.php cada 15 minutos.", + "Enable server-side encryption" : "Habilitar cifrado en el servidor", + "Start migration" : "Iniciar migración", "This is used for sending out notifications." : "Esto se usa para enviar notificaciones.", "Send mode" : "Modo de envío", "Encryption" : "Cifrado", diff --git a/settings/l10n/es.json b/settings/l10n/es.json index 7cefb5d83c4..5cb239acb78 100644 --- a/settings/l10n/es.json +++ b/settings/l10n/es.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Avisos de seguidad y configuración", "Sharing" : "Compartiendo", "External Storage" : "Almacenamiento externo", + "Server-side encryption" : "Cifrado en el servidor", "Cron" : "Cron", + "Email server" : "Servidor de correo electrónico", "Log" : "Registro", "Tips & tricks" : "Sugerencias y trucos", "Updates" : "Actualizaciones", @@ -24,6 +26,8 @@ "Unable to change password" : "No se ha podido cambiar la contraseña", "Enabled" : "Habilitado", "Not enabled" : "No habilitado", + "A problem occurred, please check your log files (Error: %s)" : "Ocurrió un problema, por favor verifique los archivos de registro (Error: %s)", + "Migration Completed" : "Migración finalizada", "Group already exists." : "El grupo ya existe.", "Unable to add group." : "No se pudo agregar el grupo.", "Unable to delete group." : "No se pudo eliminar el grupo.", @@ -44,6 +48,8 @@ "Email saved" : "Correo electrónico guardado", "Are you really sure you want add \"{domain}\" as trusted domain?" : "¿Está seguro de querer agregar \"{domain}\" como un dominio de confianza?", "Add trusted domain" : "Agregar dominio de confianza", + "Migration in progress. Please wait until the migration is finished" : "Migración en curso. Por favor espere hasta que la migración esté finalizada.", + "Migration started …" : "Migración iniciada...", "Sending..." : "Enviando...", "All" : "Todos", "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Aplicaciones oficiales son desarrolladas por y dentro de la comunidad ownCloud. Estas ofrecen una funcionalidad central con ownCloud y están listas para su uso en producción. ", @@ -131,6 +137,8 @@ "Execute one task with each page loaded" : "Ejecutar una tarea con cada página cargada", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php se registra en un servicio webcron para llamar a cron.php cada 15 minutos a través de HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Usar el servicio cron del sistema para llamar al archivo cron.php cada 15 minutos.", + "Enable server-side encryption" : "Habilitar cifrado en el servidor", + "Start migration" : "Iniciar migración", "This is used for sending out notifications." : "Esto se usa para enviar notificaciones.", "Send mode" : "Modo de envío", "Encryption" : "Cifrado", diff --git a/settings/l10n/fi_FI.js b/settings/l10n/fi_FI.js index 14097570157..4476213e711 100644 --- a/settings/l10n/fi_FI.js +++ b/settings/l10n/fi_FI.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Turvallisuus- ja asetusvaroitukset", "Sharing" : "Jakaminen", "External Storage" : "Erillinen tallennusväline", + "Server-side encryption" : "Palvelinpään salaus", "Cron" : "Cron", + "Email server" : "Sähköpostipalvelin", "Log" : "Loki", "Tips & tricks" : "Vinkit", "Updates" : "Päivitykset", @@ -131,6 +133,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Suorita yksi tehtävä jokaista ladattua sivua kohden", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php kutsuu webcron-palvelun kautta cron.php:ta 15 minuutin välein http:tä käyttäen.", "Use system's cron service to call the cron.php file every 15 minutes." : "Käytä järjestelmän cron-palvelua cron.php-tiedoston kutsumista varten 15 minuutin välein.", + "Enable server-side encryption" : "Käytä palvelinpään salausta", "Start migration" : "Käynnistä migraatio", "This is used for sending out notifications." : "Tätä käytetään ilmoitusten lähettämiseen.", "Send mode" : "Lähetystila", diff --git a/settings/l10n/fi_FI.json b/settings/l10n/fi_FI.json index 43f9244b343..99cae5e8880 100644 --- a/settings/l10n/fi_FI.json +++ b/settings/l10n/fi_FI.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Turvallisuus- ja asetusvaroitukset", "Sharing" : "Jakaminen", "External Storage" : "Erillinen tallennusväline", + "Server-side encryption" : "Palvelinpään salaus", "Cron" : "Cron", + "Email server" : "Sähköpostipalvelin", "Log" : "Loki", "Tips & tricks" : "Vinkit", "Updates" : "Päivitykset", @@ -129,6 +131,7 @@ "Execute one task with each page loaded" : "Suorita yksi tehtävä jokaista ladattua sivua kohden", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php kutsuu webcron-palvelun kautta cron.php:ta 15 minuutin välein http:tä käyttäen.", "Use system's cron service to call the cron.php file every 15 minutes." : "Käytä järjestelmän cron-palvelua cron.php-tiedoston kutsumista varten 15 minuutin välein.", + "Enable server-side encryption" : "Käytä palvelinpään salausta", "Start migration" : "Käynnistä migraatio", "This is used for sending out notifications." : "Tätä käytetään ilmoitusten lähettämiseen.", "Send mode" : "Lähetystila", diff --git a/settings/l10n/fr.js b/settings/l10n/fr.js index 3be50ae0ee2..4109a602df1 100644 --- a/settings/l10n/fr.js +++ b/settings/l10n/fr.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Avertissements de sécurité ou de configuration", "Sharing" : "Partage", "External Storage" : "Stockage externe", + "Server-side encryption" : "Chiffrement côté serveur", "Cron" : "Cron", + "Email server" : "Serveur mail", "Log" : "Log", "Tips & tricks" : "Trucs et astuces", "Updates" : "Mises à jour", @@ -137,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Exécute une tâche à chaque chargement de page", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php est enregistré auprès d'un service webcron qui l'exécutera toutes les 15 minutes via http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Utilisez le service cron du système pour appeler le fichier cron.php toutes les 15 minutes.", + "Enable server-side encryption" : "Activer le chiffrement côté serveur", "Start migration" : "Démarrer la migration", "This is used for sending out notifications." : "Ceci est utilisé pour l'envoi des notifications.", "Send mode" : "Mode d'envoi", @@ -159,7 +162,7 @@ OC.L10N.register( "Less" : "Moins", "The logfile is bigger than 100 MB. Downloading it may take some time!" : "La taille du fichier journal excède 100 Mo. Le télécharger peut prendre un certain temps!", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "SQLite est actuellement utilisé comme gestionnaire de base de données. Pour des installations plus volumineuses, nous vous conseillons d'utiliser un autre gestionnaire de base de données.", - "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "En particulier si vous utilisez le client de bureau pour synchroniser vos données : l'utilisation de SQLite est alors déconseillée.", + "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "L'utilisation de SQLite est particulièrement déconseillée si vous utilisez le client de bureau pour synchroniser vos données.", "To migrate to another database use the command line tool: 'occ db:convert-type', or see the <a target=\"_blank\" href=\"%s\">documentation ↗</a>." : "Pour migrer vers un autre type de base de données, utilisez la ligne de commande : 'occ db:convert-type' ou consultez la <a target=\"_blank\" href=\"%s\">documentation ↗</a>.", "How to do backups" : "Comment faire des sauvegardes", "Advanced monitoring" : "Surveillance avancée", diff --git a/settings/l10n/fr.json b/settings/l10n/fr.json index eac4dabeb00..0a3902925bc 100644 --- a/settings/l10n/fr.json +++ b/settings/l10n/fr.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Avertissements de sécurité ou de configuration", "Sharing" : "Partage", "External Storage" : "Stockage externe", + "Server-side encryption" : "Chiffrement côté serveur", "Cron" : "Cron", + "Email server" : "Serveur mail", "Log" : "Log", "Tips & tricks" : "Trucs et astuces", "Updates" : "Mises à jour", @@ -135,6 +137,7 @@ "Execute one task with each page loaded" : "Exécute une tâche à chaque chargement de page", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php est enregistré auprès d'un service webcron qui l'exécutera toutes les 15 minutes via http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Utilisez le service cron du système pour appeler le fichier cron.php toutes les 15 minutes.", + "Enable server-side encryption" : "Activer le chiffrement côté serveur", "Start migration" : "Démarrer la migration", "This is used for sending out notifications." : "Ceci est utilisé pour l'envoi des notifications.", "Send mode" : "Mode d'envoi", @@ -157,7 +160,7 @@ "Less" : "Moins", "The logfile is bigger than 100 MB. Downloading it may take some time!" : "La taille du fichier journal excède 100 Mo. Le télécharger peut prendre un certain temps!", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "SQLite est actuellement utilisé comme gestionnaire de base de données. Pour des installations plus volumineuses, nous vous conseillons d'utiliser un autre gestionnaire de base de données.", - "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "En particulier si vous utilisez le client de bureau pour synchroniser vos données : l'utilisation de SQLite est alors déconseillée.", + "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "L'utilisation de SQLite est particulièrement déconseillée si vous utilisez le client de bureau pour synchroniser vos données.", "To migrate to another database use the command line tool: 'occ db:convert-type', or see the <a target=\"_blank\" href=\"%s\">documentation ↗</a>." : "Pour migrer vers un autre type de base de données, utilisez la ligne de commande : 'occ db:convert-type' ou consultez la <a target=\"_blank\" href=\"%s\">documentation ↗</a>.", "How to do backups" : "Comment faire des sauvegardes", "Advanced monitoring" : "Surveillance avancée", diff --git a/settings/l10n/gl.js b/settings/l10n/gl.js index 415d67822c2..c681ce9fd0c 100644 --- a/settings/l10n/gl.js +++ b/settings/l10n/gl.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Avisos de seguridade e configuración", "Sharing" : "Compartindo", "External Storage" : "Almacenamento externo", + "Server-side encryption" : "Cifrado na parte do servidor", "Cron" : "Cron", + "Email server" : "Servidor de correo", "Log" : "Rexistro", "Tips & tricks" : "Trucos e consellos", "Updates" : "Actualizacións", @@ -137,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Executar unha tarefa con cada páxina cargada", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php está rexistrado nun servizo de WebCron para chamar a cron.php cada 15 minutos a través de HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Use o servizo «cron» do sistema para chamar ao ficheiro cron.php cada 15 minutos.", + "Enable server-side encryption" : "Activar o cifrado na parte do servidor", "Start migration" : "Iniciar a migración", "This is used for sending out notifications." : "Isto utilizase para o envío de notificacións.", "Send mode" : "Modo de envío", diff --git a/settings/l10n/gl.json b/settings/l10n/gl.json index b1f998a3152..91c62b05f0a 100644 --- a/settings/l10n/gl.json +++ b/settings/l10n/gl.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Avisos de seguridade e configuración", "Sharing" : "Compartindo", "External Storage" : "Almacenamento externo", + "Server-side encryption" : "Cifrado na parte do servidor", "Cron" : "Cron", + "Email server" : "Servidor de correo", "Log" : "Rexistro", "Tips & tricks" : "Trucos e consellos", "Updates" : "Actualizacións", @@ -135,6 +137,7 @@ "Execute one task with each page loaded" : "Executar unha tarefa con cada páxina cargada", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php está rexistrado nun servizo de WebCron para chamar a cron.php cada 15 minutos a través de HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Use o servizo «cron» do sistema para chamar ao ficheiro cron.php cada 15 minutos.", + "Enable server-side encryption" : "Activar o cifrado na parte do servidor", "Start migration" : "Iniciar a migración", "This is used for sending out notifications." : "Isto utilizase para o envío de notificacións.", "Send mode" : "Modo de envío", diff --git a/settings/l10n/it.js b/settings/l10n/it.js index f44c9d77b0b..117be757d98 100644 --- a/settings/l10n/it.js +++ b/settings/l10n/it.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Avvisi di sicurezza e di configurazione", "Sharing" : "Condivisione", "External Storage" : "Archiviazione esterna", + "Server-side encryption" : "Cifratura lato server", "Cron" : "Cron", + "Email server" : "Server di posta", "Log" : "Log", "Tips & tricks" : "Suggerimenti e trucchi", "Updates" : "Aggiornamenti", @@ -26,6 +28,7 @@ OC.L10N.register( "Unable to change password" : "Impossibile cambiare la password", "Enabled" : "Abilitata", "Not enabled" : "Non abilitata", + "A problem occurred, please check your log files (Error: %s)" : "Si è verificato un problema, controlla i tuoi file di log (Errore: %s)", "Migration Completed" : "Migrazione completata", "Group already exists." : "Il gruppo esiste già.", "Unable to add group." : "Impossibile aggiungere il gruppo.", @@ -47,6 +50,7 @@ OC.L10N.register( "Email saved" : "Email salvata", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Sei sicuro di voler aggiungere \"{domain}\" come dominio attendibile?", "Add trusted domain" : "Aggiungi dominio attendibile", + "Migration in progress. Please wait until the migration is finished" : "Migrazione in corso. Attendi fino al completamento della migrazione", "Migration started …" : "Migrazione avviata...", "Sending..." : "Invio in corso...", "All" : "Tutti", @@ -135,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Esegui un'operazione con ogni pagina caricata", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php è registrato su un servizio webcron per invocare cron.php ogni 15 minuti su http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Usa il servizio cron di sistema per invocare il file cron.php ogni 15 minuti.", + "Enable server-side encryption" : "Abilita cifratura lato server", "Start migration" : "Avvia migrazione", "This is used for sending out notifications." : "Viene utilizzato per inviare le notifiche.", "Send mode" : "Modalità di invio", diff --git a/settings/l10n/it.json b/settings/l10n/it.json index 1683ffef203..c4844c17ff7 100644 --- a/settings/l10n/it.json +++ b/settings/l10n/it.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Avvisi di sicurezza e di configurazione", "Sharing" : "Condivisione", "External Storage" : "Archiviazione esterna", + "Server-side encryption" : "Cifratura lato server", "Cron" : "Cron", + "Email server" : "Server di posta", "Log" : "Log", "Tips & tricks" : "Suggerimenti e trucchi", "Updates" : "Aggiornamenti", @@ -24,6 +26,7 @@ "Unable to change password" : "Impossibile cambiare la password", "Enabled" : "Abilitata", "Not enabled" : "Non abilitata", + "A problem occurred, please check your log files (Error: %s)" : "Si è verificato un problema, controlla i tuoi file di log (Errore: %s)", "Migration Completed" : "Migrazione completata", "Group already exists." : "Il gruppo esiste già.", "Unable to add group." : "Impossibile aggiungere il gruppo.", @@ -45,6 +48,7 @@ "Email saved" : "Email salvata", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Sei sicuro di voler aggiungere \"{domain}\" come dominio attendibile?", "Add trusted domain" : "Aggiungi dominio attendibile", + "Migration in progress. Please wait until the migration is finished" : "Migrazione in corso. Attendi fino al completamento della migrazione", "Migration started …" : "Migrazione avviata...", "Sending..." : "Invio in corso...", "All" : "Tutti", @@ -133,6 +137,7 @@ "Execute one task with each page loaded" : "Esegui un'operazione con ogni pagina caricata", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php è registrato su un servizio webcron per invocare cron.php ogni 15 minuti su http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Usa il servizio cron di sistema per invocare il file cron.php ogni 15 minuti.", + "Enable server-side encryption" : "Abilita cifratura lato server", "Start migration" : "Avvia migrazione", "This is used for sending out notifications." : "Viene utilizzato per inviare le notifiche.", "Send mode" : "Modalità di invio", diff --git a/settings/l10n/ko.js b/settings/l10n/ko.js index 03b9b29a989..853fa76e4b6 100644 --- a/settings/l10n/ko.js +++ b/settings/l10n/ko.js @@ -114,6 +114,7 @@ OC.L10N.register( "Exclude groups from sharing" : "공유에서 그룹 제외", "These groups will still be able to receive shares, but not to initiate them." : "이 그룹의 사용자들은 다른 사용자가 공유한 파일을 받을 수는 있지만, 자기 파일을 공유할 수는 없습니다.", "Cron was not executed yet!" : "Cron이 실행되지 않았습니다!", + "Open documentation" : "문서 열기", "Execute one task with each page loaded" : "개별 페이지를 불러올 때마다 실행", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php는 webcron 서비스에 등록되어 HTTP로 15분마다 cron.php에 접근합니다.", "Use system's cron service to call the cron.php file every 15 minutes." : "시스템의 cron 서비스를 통하여 15분마다 cron.php 파일을 실행합니다.", diff --git a/settings/l10n/ko.json b/settings/l10n/ko.json index ccdaa3fdd39..536184f0faf 100644 --- a/settings/l10n/ko.json +++ b/settings/l10n/ko.json @@ -112,6 +112,7 @@ "Exclude groups from sharing" : "공유에서 그룹 제외", "These groups will still be able to receive shares, but not to initiate them." : "이 그룹의 사용자들은 다른 사용자가 공유한 파일을 받을 수는 있지만, 자기 파일을 공유할 수는 없습니다.", "Cron was not executed yet!" : "Cron이 실행되지 않았습니다!", + "Open documentation" : "문서 열기", "Execute one task with each page loaded" : "개별 페이지를 불러올 때마다 실행", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php는 webcron 서비스에 등록되어 HTTP로 15분마다 cron.php에 접근합니다.", "Use system's cron service to call the cron.php file every 15 minutes." : "시스템의 cron 서비스를 통하여 15분마다 cron.php 파일을 실행합니다.", diff --git a/settings/l10n/nl.js b/settings/l10n/nl.js index fedce057925..d4c532575c5 100644 --- a/settings/l10n/nl.js +++ b/settings/l10n/nl.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Beveiligings- en instellingswaarschuwingen", "Sharing" : "Delen", "External Storage" : "Externe opslag", + "Server-side encryption" : "Server-side versleuteling", "Cron" : "Cron", + "Email server" : "E-mailserver", "Log" : "Log", "Tips & tricks" : "Tips & trucs", "Updates" : "Updates", @@ -26,6 +28,8 @@ OC.L10N.register( "Unable to change password" : "Kan wachtwoord niet wijzigen", "Enabled" : "Geactiveerd", "Not enabled" : "Niet ingeschakeld", + "A problem occurred, please check your log files (Error: %s)" : "Er trad een een probleem op, controleer uw logbestanden (Fout: %s).", + "Migration Completed" : "Migratie gereed", "Group already exists." : "Groep bestaat al.", "Unable to add group." : "Kan groep niet toevoegen.", "Unable to delete group." : "Kan groep niet verwijderen.", @@ -46,6 +50,8 @@ OC.L10N.register( "Email saved" : "E-mail bewaard", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Weet u zeker dat u \"{domain}\" als een vertrouwd domein wilt toevoegen?", "Add trusted domain" : "Vertrouwd domein toevoegen", + "Migration in progress. Please wait until the migration is finished" : "Migratie bezig. Wacht tot het proces klaar is.", + "Migration started …" : "Migratie gestart...", "Sending..." : "Versturen...", "All" : "Alle", "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Officiële apps zijn ontwikkeld door en binnen de ownCloud community. Ze bieden functionaliteit binnen ownCloud en zijn klaar voor gebruik in een productie omgeving.", @@ -133,6 +139,8 @@ OC.L10N.register( "Execute one task with each page loaded" : "Bij laden van elke pagina één taak uitvoeren", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php is geregisteerd bij een webcron service om elke 15 minuten cron.php over http aan te roepen.", "Use system's cron service to call the cron.php file every 15 minutes." : "Gebruik de systeem cron service om cron.php elke 15 minuten aan te roepen.", + "Enable server-side encryption" : "Server-side versleuteling inschakelen", + "Start migration" : "Start migratie", "This is used for sending out notifications." : "Dit wordt gebruikt voor het verzenden van meldingen.", "Send mode" : "Verstuurmodus", "Encryption" : "Versleuteling", diff --git a/settings/l10n/nl.json b/settings/l10n/nl.json index fe1e94296a4..358740613b9 100644 --- a/settings/l10n/nl.json +++ b/settings/l10n/nl.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Beveiligings- en instellingswaarschuwingen", "Sharing" : "Delen", "External Storage" : "Externe opslag", + "Server-side encryption" : "Server-side versleuteling", "Cron" : "Cron", + "Email server" : "E-mailserver", "Log" : "Log", "Tips & tricks" : "Tips & trucs", "Updates" : "Updates", @@ -24,6 +26,8 @@ "Unable to change password" : "Kan wachtwoord niet wijzigen", "Enabled" : "Geactiveerd", "Not enabled" : "Niet ingeschakeld", + "A problem occurred, please check your log files (Error: %s)" : "Er trad een een probleem op, controleer uw logbestanden (Fout: %s).", + "Migration Completed" : "Migratie gereed", "Group already exists." : "Groep bestaat al.", "Unable to add group." : "Kan groep niet toevoegen.", "Unable to delete group." : "Kan groep niet verwijderen.", @@ -44,6 +48,8 @@ "Email saved" : "E-mail bewaard", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Weet u zeker dat u \"{domain}\" als een vertrouwd domein wilt toevoegen?", "Add trusted domain" : "Vertrouwd domein toevoegen", + "Migration in progress. Please wait until the migration is finished" : "Migratie bezig. Wacht tot het proces klaar is.", + "Migration started …" : "Migratie gestart...", "Sending..." : "Versturen...", "All" : "Alle", "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Officiële apps zijn ontwikkeld door en binnen de ownCloud community. Ze bieden functionaliteit binnen ownCloud en zijn klaar voor gebruik in een productie omgeving.", @@ -131,6 +137,8 @@ "Execute one task with each page loaded" : "Bij laden van elke pagina één taak uitvoeren", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php is geregisteerd bij een webcron service om elke 15 minuten cron.php over http aan te roepen.", "Use system's cron service to call the cron.php file every 15 minutes." : "Gebruik de systeem cron service om cron.php elke 15 minuten aan te roepen.", + "Enable server-side encryption" : "Server-side versleuteling inschakelen", + "Start migration" : "Start migratie", "This is used for sending out notifications." : "Dit wordt gebruikt voor het verzenden van meldingen.", "Send mode" : "Verstuurmodus", "Encryption" : "Versleuteling", diff --git a/settings/l10n/ru.js b/settings/l10n/ru.js index 7f7670c960e..e63bf95add1 100644 --- a/settings/l10n/ru.js +++ b/settings/l10n/ru.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Предупреждения безопасности и установки", "Sharing" : "Общий доступ", "External Storage" : "Внешнее хранилище", + "Server-side encryption" : "Шифрование на стороне сервера", "Cron" : "Cron (планировщик задач)", + "Email server" : "Почтовый сервер", "Log" : "Журнал", "Tips & tricks" : "Советы и трюки", "Updates" : "Обновления", @@ -137,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Выполнять одно задание с каждой загруженной страницей", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php зарегистрирован в webcron и будет вызываться каждые 15 минут по http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Использовать системный cron для вызова cron.php каждые 15 минут.", + "Enable server-side encryption" : "Включить шифрование на стороне сервера", "Start migration" : "Запустить миграцию", "This is used for sending out notifications." : "Используется для отправки уведомлений.", "Send mode" : "Способ отправки", diff --git a/settings/l10n/ru.json b/settings/l10n/ru.json index 14a2b1144e3..51f468d4d07 100644 --- a/settings/l10n/ru.json +++ b/settings/l10n/ru.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Предупреждения безопасности и установки", "Sharing" : "Общий доступ", "External Storage" : "Внешнее хранилище", + "Server-side encryption" : "Шифрование на стороне сервера", "Cron" : "Cron (планировщик задач)", + "Email server" : "Почтовый сервер", "Log" : "Журнал", "Tips & tricks" : "Советы и трюки", "Updates" : "Обновления", @@ -135,6 +137,7 @@ "Execute one task with each page loaded" : "Выполнять одно задание с каждой загруженной страницей", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php зарегистрирован в webcron и будет вызываться каждые 15 минут по http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Использовать системный cron для вызова cron.php каждые 15 минут.", + "Enable server-side encryption" : "Включить шифрование на стороне сервера", "Start migration" : "Запустить миграцию", "This is used for sending out notifications." : "Используется для отправки уведомлений.", "Send mode" : "Способ отправки", diff --git a/settings/l10n/sr.js b/settings/l10n/sr.js index c4eaa14084b..cc2ed54ea41 100644 --- a/settings/l10n/sr.js +++ b/settings/l10n/sr.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Безбедносна и упозорења поставе", "Sharing" : "Дељење", "External Storage" : "Спољашње складиште", + "Server-side encryption" : "Шифровање на страни сервера", "Cron" : "Крон", + "Email server" : "Сервер е-поште", "Log" : "Бележење", "Tips & tricks" : "Савети и трикови", "Updates" : "Ажурирања", @@ -137,6 +139,7 @@ OC.L10N.register( "Execute one task with each page loaded" : "Изврши један задатак са сваком учитаном страницом", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php је регистрован код вебкрон сервиса за позивање cron.php сваких 15 минута преко протокола http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Користите системски крон сервис за позивање cron.php фајла сваких 15 минута.", + "Enable server-side encryption" : "Укључи шифровање на страни сервера", "Start migration" : "Покрени пресељење", "This is used for sending out notifications." : "Ово се користи за слање обавештења.", "Send mode" : "Режим слања", diff --git a/settings/l10n/sr.json b/settings/l10n/sr.json index c613cae0d8a..f753ad2199f 100644 --- a/settings/l10n/sr.json +++ b/settings/l10n/sr.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Безбедносна и упозорења поставе", "Sharing" : "Дељење", "External Storage" : "Спољашње складиште", + "Server-side encryption" : "Шифровање на страни сервера", "Cron" : "Крон", + "Email server" : "Сервер е-поште", "Log" : "Бележење", "Tips & tricks" : "Савети и трикови", "Updates" : "Ажурирања", @@ -135,6 +137,7 @@ "Execute one task with each page loaded" : "Изврши један задатак са сваком учитаном страницом", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php је регистрован код вебкрон сервиса за позивање cron.php сваких 15 минута преко протокола http.", "Use system's cron service to call the cron.php file every 15 minutes." : "Користите системски крон сервис за позивање cron.php фајла сваких 15 минута.", + "Enable server-side encryption" : "Укључи шифровање на страни сервера", "Start migration" : "Покрени пресељење", "This is used for sending out notifications." : "Ово се користи за слање обавештења.", "Send mode" : "Режим слања", diff --git a/settings/l10n/tr.js b/settings/l10n/tr.js index 7b89faba329..6c3f3dc9cd0 100644 --- a/settings/l10n/tr.js +++ b/settings/l10n/tr.js @@ -4,7 +4,9 @@ OC.L10N.register( "Security & setup warnings" : "Güvenlik ve kurulum uyarıları", "Sharing" : "Paylaşım", "External Storage" : "Harici Depolama", + "Server-side encryption" : "Sunucu taraflı şifreleme", "Cron" : "Cron", + "Email server" : "E-Posta sunucusu", "Log" : "Günlük", "Tips & tricks" : "İpuçları ve hileler", "Updates" : "Güncellemeler", diff --git a/settings/l10n/tr.json b/settings/l10n/tr.json index 440b67241c0..5503223e53d 100644 --- a/settings/l10n/tr.json +++ b/settings/l10n/tr.json @@ -2,7 +2,9 @@ "Security & setup warnings" : "Güvenlik ve kurulum uyarıları", "Sharing" : "Paylaşım", "External Storage" : "Harici Depolama", + "Server-side encryption" : "Sunucu taraflı şifreleme", "Cron" : "Cron", + "Email server" : "E-Posta sunucusu", "Log" : "Günlük", "Tips & tricks" : "İpuçları ve hileler", "Updates" : "Güncellemeler", diff --git a/settings/l10n/uk.js b/settings/l10n/uk.js index d2d571ca2af..cd0a51fc157 100644 --- a/settings/l10n/uk.js +++ b/settings/l10n/uk.js @@ -1,10 +1,14 @@ OC.L10N.register( "settings", { + "Security & setup warnings" : "Попередження безпеки та налаштування", "Sharing" : "Спільний доступ", "External Storage" : "Зовнішні сховища", + "Server-side encryption" : "Серверне шіфрування", "Cron" : "Планувальник Cron", + "Email server" : "Сервер електронної пошти", "Log" : "Журнал", + "Tips & tricks" : "Поради і трюки", "Updates" : "Оновлення", "Authentication error" : "Помилка автентифікації", "Your full name has been changed." : "Ваше ім'я було змінене", @@ -12,22 +16,24 @@ OC.L10N.register( "Couldn't remove app." : "Неможливо видалити додаток.", "Language changed" : "Мова змінена", "Invalid request" : "Некоректний запит", - "Admins can't remove themself from the admin group" : "Адміністратор не може видалити себе з групи адмінів", + "Admins can't remove themself from the admin group" : "Адміністратор не може видалити себе з групи адміністраторів", "Unable to add user to group %s" : "Не вдалося додати користувача у групу %s", "Unable to remove user from group %s" : "Не вдалося видалити користувача із групи %s", "Couldn't update app." : "Не вдалося оновити програму. ", "Wrong password" : "Невірний пароль", - "No user supplied" : "Користувач не знайден", + "No user supplied" : "Користувач не знайдений", "Please provide an admin recovery password, otherwise all user data will be lost" : "Будь ласка введіть пароль адміністратора для відновлення, інакше всі дані будуть втрачені", "Wrong admin recovery password. Please check the password and try again." : "Невірний пароль адміністратора для відновлення. Будь ласка, перевірте пароль та спробуйте ще раз.", "Backend doesn't support password change, but the user's encryption key was successfully updated." : "Використовуваний механізм не підтримує зміну паролів, але користувальницький ключ шифрування був успішно змінено", "Unable to change password" : "Неможливо змінити пароль", "Enabled" : "Увімкнено", "Not enabled" : "Вимкнено", + "A problem occurred, please check your log files (Error: %s)" : "Виникла проблема, будь ласка, перевірте свої журнальні файли (Помилка:%s)", + "Migration Completed" : "Міграцію завершено", "Group already exists." : "Група вже існує.", "Unable to add group." : "Неможливо додати групу.", "Unable to delete group." : "Неможливо видалити групу.", - "log-level out of allowed range" : "Перевищений розмір файлу-логу", + "log-level out of allowed range" : "Перевищений розмір файлу-журналу", "Saved" : "Збереженно", "test email settings" : "перевірити налаштування електронної пошти", "A problem occurred while sending the email. Please revise your settings. (Error: %s)" : "Під час відправки email сталася помилка. Будь ласка перевірте налаштування. (Помилка:%s)", @@ -44,8 +50,13 @@ OC.L10N.register( "Email saved" : "Адресу збережено", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Ви дійсно бажаєте додати \"{domain}\" як довірений домен?", "Add trusted domain" : "Додати довірений домен", + "Migration in progress. Please wait until the migration is finished" : "Міграція триває. Будь ласка, зачекайте доки процес міграції завершиться", + "Migration started …" : "Міграцію розпочато ...", "Sending..." : "Надсилання...", "All" : "Всі", + "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Офіційні застосунки розроблені спільнотою ownCloud. Вони реалізують основні можливості ownCloud і готові до використання в продакшні.", + "Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Схвалені застосунки розроблені довіреними розробниками і пройшли незалежну перевірку безпеки. Їх активно супроводжують у репозиторії з відкритим кодом, а їх розробники стежать, щоб вони були стабільні й прийнятні для повсякденного використання.", + "This app is not checked for security issues and is new or known to be unstable. Install on your own risk." : "Ця програма не перевірена на вразливості безпеки і є новою або нестабільною. Встановлюйте її на власний ризик.", "Please wait...." : "Зачекайте, будь ласка...", "Error while disabling app" : "Помилка відключення додатка", "Disable" : "Вимкнути", @@ -81,7 +92,9 @@ OC.L10N.register( "A valid password must be provided" : "Потрібно задати вірний пароль", "A valid email must be provided" : "Вкажіть дійсний e-mail", "__language_name__" : "__language_name__", - "SSL root certificates" : "SSL корневі сертифікати", + "Sync clients" : "Синхронізація клієнтів", + "Personal info" : "Особиста інформація", + "SSL root certificates" : "SSL кореневі сертифікати", "Everything (fatal issues, errors, warnings, info, debug)" : "Усі (критичні проблеми, помилки, попередження, інформаційні, налагодження)", "Info, warnings, errors and fatal issues" : "Інформаційні, попередження, помилки та критичні проблеми", "Warnings, errors and fatal issues" : "Попередження, помилки та критичні проблеми", @@ -102,7 +115,7 @@ OC.L10N.register( "System locale can not be set to a one which supports UTF-8." : "Неможливо встановити системну локаль, яка б підтримувала UTF-8.", "This means that there might be problems with certain characters in file names." : "Це означає, що можуть виникати проблеми з деякими символами в іменах файлів.", "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Пропонуємо встановити необхідні пакети для вашої системи для підтримки однієї з наступних мов %s.", - "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію \"overwrite.cli.url\" файла config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", + "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію \"overwrite.cli.url\" файлу config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Не вдалося запустити завдання планувальника через CLI. Відбулися наступні технічні помилки:", "Allow apps to use the Share API" : "Дозволити програмам використовувати API спільного доступу", "Allow users to share via link" : "Дозволити користувачам ділитися через посилання", @@ -121,9 +134,12 @@ OC.L10N.register( "Last cron job execution: %s." : "Останне виконане Cron завдання: %s.", "Last cron job execution: %s. Something seems wrong." : "Останне виконане Cron завдання: %s. Щось здається неправильним.", "Cron was not executed yet!" : "Cron-задачі ще не запускалися!", + "Open documentation" : "Відкрити документацію", "Execute one task with each page loaded" : "Виконати одне завдання для кожної завантаженої сторінки ", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php зареєстрований в службі webcron та буде викликатися кожні 15 хвилин через HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Використовувати системний cron для виклику cron.php кожні 15 хвилин.", + "Enable server-side encryption" : "Увімкнути серверне шіфрування", + "Start migration" : "Розпочати міграцію", "This is used for sending out notifications." : "Використовується для відсилання повідомлень.", "Send mode" : "Надіслати повідомлення", "Encryption" : "Шифрування", @@ -146,9 +162,17 @@ OC.L10N.register( "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Журнал-файл - більше 100 МБ. Його скачування може зайняти деякий час!", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "В якості бази даних використовується SQLite. Для великих установок ми рекомендуємо переключитися на інший тип серверу баз даних.", "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "Особливо викликає сумнів використання SQLite при синхронізації файлів з використанням клієнта для ПК.", + "How to do backups" : "Як робити резервне копіювання", + "Advanced monitoring" : "Просунутий моніторинг", + "Performance tuning" : "Налаштування продуктивності", + "Improving the config.php" : "Покращення ", + "Theming" : "Оформлення", + "Hardening and security guidance" : "Інструктування з безпеки та захисту", "Version" : "Версія", "More apps" : "Більше додатків", "Developer documentation" : "Документація для розробників", + "Experimental applications ahead" : "Спершу експериментальні застосунки", + "Experimental apps are not checked for security issues, new or known to be unstable and under heavy development. Installing them can cause data loss or security breaches." : "Експериментальні застосунки не перевірені на наявність проблем безпеки, нові або нестабільні і в процесі активної розробки. Встановлення їх може спричинити втрату даних або дірки в безпеці.", "by" : "по", "licensed" : "Ліцензовано", "Documentation:" : "Документація:", @@ -160,10 +184,17 @@ OC.L10N.register( "Update to %s" : "Оновити до %s", "Enable only for specific groups" : "Включити тільки для конкретних груп", "Uninstall App" : "Видалити додаток", + "Enable experimental apps" : "Увімкнути експериментальні застосунки", + "No apps found for your version" : "Немає застосунків для вашої версії", "Hey there,<br><br>just letting you know that you now have an %s account.<br><br>Your username: %s<br>Access it: <a href=\"%s\">%s</a><br><br>" : "Агов,<br><br>просто щоб ви знали, у вас є аккаунт %s.<br><br>Ваше ім'я користувача: %s<br>Перейдіть сюди: <a href=\"%s\">%s</a><br><br>", "Cheers!" : "Будьмо!", "Hey there,\n\njust letting you know that you now have an %s account.\n\nYour username: %s\nAccess it: %s\n\n" : "Агов,\n\nпросто щоб ви знали, у вас є аккаунт %s.\n\nВаше ім'я користувача: %s\nПерейдіть сюди: %s\n\n", + "User documentation" : "Користувацька документація", + "Administrator documentation" : "Документація адміністратора", + "Online documentation" : "Документація онлайн", "Forum" : "Форум", + "Issue tracker" : "Вирішення проблем", + "Commercial support" : "Комерційна підтримка", "Get the apps to sync your files" : "Отримати додатки для синхронізації ваших файлів", "Desktop client" : "Клієнт для ПК", "Android app" : "Android-додаток", @@ -176,8 +207,9 @@ OC.L10N.register( "Current password" : "Поточний пароль", "New password" : "Новий пароль", "Change password" : "Змінити пароль", + "Full name" : "Повне ім'я", "No display name set" : "Коротке ім'я не вказано", - "Email" : "Ел.пошта", + "Email" : "E-mail", "Your email address" : "Ваша адреса електронної пошти", "Fill in an email address to enable password recovery and receive notifications" : "Введіть адресу електронної пошти, щоб ввімкнути відновлення паролю та отримання повідомлень", "No email address set" : "E-mail не вказано", @@ -196,6 +228,7 @@ OC.L10N.register( "Valid until" : "Дійсно до", "Issued By" : "Виданий", "Valid until %s" : "Дійсно до %s", + "Import root certificate" : "Імпортувати кореневий сертифікат", "Developed by the {communityopen}ownCloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}<abbr title=\"Affero General Public License\">AGPL</abbr>{linkclose}." : "Розроблено {communityopen} спільнотою ownCloud {linkclose}, {githubopen} вихідний код {linkclose} ліцензується відповідно до {licenseopen} <abbr title = \"Публічної ліцензії Affero General\"> AGPL </ abbr> {linkclose}.", "Show storage location" : "Показати місцезнаходження сховища", "Show last log in" : "Показати останній вхід в систему", diff --git a/settings/l10n/uk.json b/settings/l10n/uk.json index 567297e384d..1dceebe4b75 100644 --- a/settings/l10n/uk.json +++ b/settings/l10n/uk.json @@ -1,8 +1,12 @@ { "translations": { + "Security & setup warnings" : "Попередження безпеки та налаштування", "Sharing" : "Спільний доступ", "External Storage" : "Зовнішні сховища", + "Server-side encryption" : "Серверне шіфрування", "Cron" : "Планувальник Cron", + "Email server" : "Сервер електронної пошти", "Log" : "Журнал", + "Tips & tricks" : "Поради і трюки", "Updates" : "Оновлення", "Authentication error" : "Помилка автентифікації", "Your full name has been changed." : "Ваше ім'я було змінене", @@ -10,22 +14,24 @@ "Couldn't remove app." : "Неможливо видалити додаток.", "Language changed" : "Мова змінена", "Invalid request" : "Некоректний запит", - "Admins can't remove themself from the admin group" : "Адміністратор не може видалити себе з групи адмінів", + "Admins can't remove themself from the admin group" : "Адміністратор не може видалити себе з групи адміністраторів", "Unable to add user to group %s" : "Не вдалося додати користувача у групу %s", "Unable to remove user from group %s" : "Не вдалося видалити користувача із групи %s", "Couldn't update app." : "Не вдалося оновити програму. ", "Wrong password" : "Невірний пароль", - "No user supplied" : "Користувач не знайден", + "No user supplied" : "Користувач не знайдений", "Please provide an admin recovery password, otherwise all user data will be lost" : "Будь ласка введіть пароль адміністратора для відновлення, інакше всі дані будуть втрачені", "Wrong admin recovery password. Please check the password and try again." : "Невірний пароль адміністратора для відновлення. Будь ласка, перевірте пароль та спробуйте ще раз.", "Backend doesn't support password change, but the user's encryption key was successfully updated." : "Використовуваний механізм не підтримує зміну паролів, але користувальницький ключ шифрування був успішно змінено", "Unable to change password" : "Неможливо змінити пароль", "Enabled" : "Увімкнено", "Not enabled" : "Вимкнено", + "A problem occurred, please check your log files (Error: %s)" : "Виникла проблема, будь ласка, перевірте свої журнальні файли (Помилка:%s)", + "Migration Completed" : "Міграцію завершено", "Group already exists." : "Група вже існує.", "Unable to add group." : "Неможливо додати групу.", "Unable to delete group." : "Неможливо видалити групу.", - "log-level out of allowed range" : "Перевищений розмір файлу-логу", + "log-level out of allowed range" : "Перевищений розмір файлу-журналу", "Saved" : "Збереженно", "test email settings" : "перевірити налаштування електронної пошти", "A problem occurred while sending the email. Please revise your settings. (Error: %s)" : "Під час відправки email сталася помилка. Будь ласка перевірте налаштування. (Помилка:%s)", @@ -42,8 +48,13 @@ "Email saved" : "Адресу збережено", "Are you really sure you want add \"{domain}\" as trusted domain?" : "Ви дійсно бажаєте додати \"{domain}\" як довірений домен?", "Add trusted domain" : "Додати довірений домен", + "Migration in progress. Please wait until the migration is finished" : "Міграція триває. Будь ласка, зачекайте доки процес міграції завершиться", + "Migration started …" : "Міграцію розпочато ...", "Sending..." : "Надсилання...", "All" : "Всі", + "Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use." : "Офіційні застосунки розроблені спільнотою ownCloud. Вони реалізують основні можливості ownCloud і готові до використання в продакшні.", + "Approved apps are developed by trusted developers and have passed a cursory security check. They are actively maintained in an open code repository and their maintainers deem them to be stable for casual to normal use." : "Схвалені застосунки розроблені довіреними розробниками і пройшли незалежну перевірку безпеки. Їх активно супроводжують у репозиторії з відкритим кодом, а їх розробники стежать, щоб вони були стабільні й прийнятні для повсякденного використання.", + "This app is not checked for security issues and is new or known to be unstable. Install on your own risk." : "Ця програма не перевірена на вразливості безпеки і є новою або нестабільною. Встановлюйте її на власний ризик.", "Please wait...." : "Зачекайте, будь ласка...", "Error while disabling app" : "Помилка відключення додатка", "Disable" : "Вимкнути", @@ -79,7 +90,9 @@ "A valid password must be provided" : "Потрібно задати вірний пароль", "A valid email must be provided" : "Вкажіть дійсний e-mail", "__language_name__" : "__language_name__", - "SSL root certificates" : "SSL корневі сертифікати", + "Sync clients" : "Синхронізація клієнтів", + "Personal info" : "Особиста інформація", + "SSL root certificates" : "SSL кореневі сертифікати", "Everything (fatal issues, errors, warnings, info, debug)" : "Усі (критичні проблеми, помилки, попередження, інформаційні, налагодження)", "Info, warnings, errors and fatal issues" : "Інформаційні, попередження, помилки та критичні проблеми", "Warnings, errors and fatal issues" : "Попередження, помилки та критичні проблеми", @@ -100,7 +113,7 @@ "System locale can not be set to a one which supports UTF-8." : "Неможливо встановити системну локаль, яка б підтримувала UTF-8.", "This means that there might be problems with certain characters in file names." : "Це означає, що можуть виникати проблеми з деякими символами в іменах файлів.", "We strongly suggest installing the required packages on your system to support one of the following locales: %s." : "Пропонуємо встановити необхідні пакети для вашої системи для підтримки однієї з наступних мов %s.", - "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію \"overwrite.cli.url\" файла config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", + "If your installation is not installed in the root of the domain and uses system cron, there can be issues with the URL generation. To avoid these problems, please set the \"overwrite.cli.url\" option in your config.php file to the webroot path of your installation (Suggested: \"%s\")" : "Якщо ваша копія ownCloud встановлена не в корені домену та використовує систему планування CRON, можливі проблеми з генерацією правильних URL. Щоб уникнути цього, встановіть опцію \"overwrite.cli.url\" файлу config.php відповідно до теки розташування установки (Ймовірніше за все, це \"%s\")", "It was not possible to execute the cronjob via CLI. The following technical errors have appeared:" : "Не вдалося запустити завдання планувальника через CLI. Відбулися наступні технічні помилки:", "Allow apps to use the Share API" : "Дозволити програмам використовувати API спільного доступу", "Allow users to share via link" : "Дозволити користувачам ділитися через посилання", @@ -119,9 +132,12 @@ "Last cron job execution: %s." : "Останне виконане Cron завдання: %s.", "Last cron job execution: %s. Something seems wrong." : "Останне виконане Cron завдання: %s. Щось здається неправильним.", "Cron was not executed yet!" : "Cron-задачі ще не запускалися!", + "Open documentation" : "Відкрити документацію", "Execute one task with each page loaded" : "Виконати одне завдання для кожної завантаженої сторінки ", "cron.php is registered at a webcron service to call cron.php every 15 minutes over http." : "cron.php зареєстрований в службі webcron та буде викликатися кожні 15 хвилин через HTTP.", "Use system's cron service to call the cron.php file every 15 minutes." : "Використовувати системний cron для виклику cron.php кожні 15 хвилин.", + "Enable server-side encryption" : "Увімкнути серверне шіфрування", + "Start migration" : "Розпочати міграцію", "This is used for sending out notifications." : "Використовується для відсилання повідомлень.", "Send mode" : "Надіслати повідомлення", "Encryption" : "Шифрування", @@ -144,9 +160,17 @@ "The logfile is bigger than 100 MB. Downloading it may take some time!" : "Журнал-файл - більше 100 МБ. Його скачування може зайняти деякий час!", "SQLite is used as database. For larger installations we recommend to switch to a different database backend." : "В якості бази даних використовується SQLite. Для великих установок ми рекомендуємо переключитися на інший тип серверу баз даних.", "Especially when using the desktop client for file syncing the use of SQLite is discouraged." : "Особливо викликає сумнів використання SQLite при синхронізації файлів з використанням клієнта для ПК.", + "How to do backups" : "Як робити резервне копіювання", + "Advanced monitoring" : "Просунутий моніторинг", + "Performance tuning" : "Налаштування продуктивності", + "Improving the config.php" : "Покращення ", + "Theming" : "Оформлення", + "Hardening and security guidance" : "Інструктування з безпеки та захисту", "Version" : "Версія", "More apps" : "Більше додатків", "Developer documentation" : "Документація для розробників", + "Experimental applications ahead" : "Спершу експериментальні застосунки", + "Experimental apps are not checked for security issues, new or known to be unstable and under heavy development. Installing them can cause data loss or security breaches." : "Експериментальні застосунки не перевірені на наявність проблем безпеки, нові або нестабільні і в процесі активної розробки. Встановлення їх може спричинити втрату даних або дірки в безпеці.", "by" : "по", "licensed" : "Ліцензовано", "Documentation:" : "Документація:", @@ -158,10 +182,17 @@ "Update to %s" : "Оновити до %s", "Enable only for specific groups" : "Включити тільки для конкретних груп", "Uninstall App" : "Видалити додаток", + "Enable experimental apps" : "Увімкнути експериментальні застосунки", + "No apps found for your version" : "Немає застосунків для вашої версії", "Hey there,<br><br>just letting you know that you now have an %s account.<br><br>Your username: %s<br>Access it: <a href=\"%s\">%s</a><br><br>" : "Агов,<br><br>просто щоб ви знали, у вас є аккаунт %s.<br><br>Ваше ім'я користувача: %s<br>Перейдіть сюди: <a href=\"%s\">%s</a><br><br>", "Cheers!" : "Будьмо!", "Hey there,\n\njust letting you know that you now have an %s account.\n\nYour username: %s\nAccess it: %s\n\n" : "Агов,\n\nпросто щоб ви знали, у вас є аккаунт %s.\n\nВаше ім'я користувача: %s\nПерейдіть сюди: %s\n\n", + "User documentation" : "Користувацька документація", + "Administrator documentation" : "Документація адміністратора", + "Online documentation" : "Документація онлайн", "Forum" : "Форум", + "Issue tracker" : "Вирішення проблем", + "Commercial support" : "Комерційна підтримка", "Get the apps to sync your files" : "Отримати додатки для синхронізації ваших файлів", "Desktop client" : "Клієнт для ПК", "Android app" : "Android-додаток", @@ -174,8 +205,9 @@ "Current password" : "Поточний пароль", "New password" : "Новий пароль", "Change password" : "Змінити пароль", + "Full name" : "Повне ім'я", "No display name set" : "Коротке ім'я не вказано", - "Email" : "Ел.пошта", + "Email" : "E-mail", "Your email address" : "Ваша адреса електронної пошти", "Fill in an email address to enable password recovery and receive notifications" : "Введіть адресу електронної пошти, щоб ввімкнути відновлення паролю та отримання повідомлень", "No email address set" : "E-mail не вказано", @@ -194,6 +226,7 @@ "Valid until" : "Дійсно до", "Issued By" : "Виданий", "Valid until %s" : "Дійсно до %s", + "Import root certificate" : "Імпортувати кореневий сертифікат", "Developed by the {communityopen}ownCloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}<abbr title=\"Affero General Public License\">AGPL</abbr>{linkclose}." : "Розроблено {communityopen} спільнотою ownCloud {linkclose}, {githubopen} вихідний код {linkclose} ліцензується відповідно до {licenseopen} <abbr title = \"Публічної ліцензії Affero General\"> AGPL </ abbr> {linkclose}.", "Show storage location" : "Показати місцезнаходження сховища", "Show last log in" : "Показати останній вхід в систему", diff --git a/settings/personal.php b/settings/personal.php index 12b320ac001..7bf1110c03e 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -37,6 +37,7 @@ OC_Util::checkLoggedIn(); $defaults = new OC_Defaults(); // initialize themable default strings and urls $certificateManager = \OC::$server->getCertificateManager(); $config = \OC::$server->getConfig(); +$urlGenerator = \OC::$server->getURLGenerator(); // Highlight navigation entry OC_Util::addScript( 'settings', 'personal' ); @@ -118,6 +119,7 @@ $tmpl->assign('displayName', OC_User::getDisplayName()); $tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true)); $tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser())); $tmpl->assign('certs', $certificateManager->listCertificates()); +$tmpl->assign('urlGenerator', $urlGenerator); // Get array of group ids for this user $groups = \OC::$server->getGroupManager()->getUserIdGroups(OC_User::getUser()); diff --git a/settings/routes.php b/settings/routes.php index 462b4ab543f..52b320cbdb5 100644 --- a/settings/routes.php +++ b/settings/routes.php @@ -53,6 +53,8 @@ $application->registerRoutes($this, [ ['name' => 'LogSettings#getEntries', 'url' => '/settings/admin/log/entries', 'verb' => 'GET'], ['name' => 'LogSettings#download', 'url' => '/settings/admin/log/download', 'verb' => 'GET'], ['name' => 'CheckSetup#check', 'url' => '/settings/ajax/checksetup', 'verb' => 'GET'], + ['name' => 'Certificate#addPersonalRootCertificate', 'url' => '/settings/personal/certificate', 'verb' => 'POST'], + ['name' => 'Certificate#removePersonalRootCertificate', 'url' => '/settings/personal/certificate/{certificateIdentifier}', 'verb' => 'DELETE'], ] ]); @@ -90,10 +92,6 @@ $this->create('settings_personal_changepassword', '/settings/personal/changepass ->action('OC\Settings\ChangePassword\Controller', 'changePersonalPassword'); $this->create('settings_ajax_setlanguage', '/settings/ajax/setlanguage.php') ->actionInclude('settings/ajax/setlanguage.php'); -$this->create('settings_cert_post', '/settings/ajax/addRootCertificate') - ->actionInclude('settings/ajax/addRootCertificate.php'); -$this->create('settings_cert_remove', '/settings/ajax/removeRootCertificate') - ->actionInclude('settings/ajax/removeRootCertificate.php'); // apps $this->create('settings_ajax_enableapp', '/settings/ajax/enableapp.php') ->actionInclude('settings/ajax/enableapp.php'); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index dfdc6191805..02ee261cd1d 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -5,6 +5,7 @@ */ /** @var $_ array */ +/** @var $_['urlGenerator'] */ ?> <div id="app-navigation"> @@ -236,7 +237,7 @@ if($_['passwordChangeSupported']) { <?php endforeach; ?> </tbody> </table> - <form class="uploadButton" method="post" action="<?php p(\OC_Helper::linkToRoute('settings_cert_post')); ?>" target="certUploadFrame"> + <form class="uploadButton" method="post" action="<?php p($_['urlGenerator']->linkToRoute('settings.Certificate.addPersonalRootCertificate')); ?>" target="certUploadFrame"> <input type="file" id="rootcert_import" name="rootcert_import" class="hidden"> <input type="button" id="rootcert_import_button" value="<?php p($l->t('Import root certificate')); ?>"/> </form> diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php index f52fd0e16cc..4d932abfa39 100644 --- a/tests/lib/files/stream/encryption.php +++ b/tests/lib/files/stream/encryption.php @@ -8,8 +8,10 @@ use OCA\Encryption_Dummy\DummyModule; class Encryption extends \Test\TestCase { /** + * @param string $fileName * @param string $mode - * @param integer $limit + * @param integer $unencryptedSize + * @return resource */ protected function getStream($fileName, $mode, $unencryptedSize) { @@ -45,6 +47,98 @@ class Encryption extends \Test\TestCase { $util, $file, $mode, $size, $unencryptedSize); } + /** + * @dataProvider dataProviderStreamOpen() + */ + public function testStreamOpen($mode, + $fullPath, + $fileExists, + $expectedSharePath, + $expectedSize, + $expectedReadOnly) { + + // build mocks + $encryptionModuleMock = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule') + ->disableOriginalConstructor()->getMock(); + $encryptionModuleMock->expects($this->once()) + ->method('getUnencryptedBlockSize')->willReturn(99); + $encryptionModuleMock->expects($this->once()) + ->method('begin')->willReturn(true); + + $storageMock = $this->getMockBuilder('\OC\Files\Storage\Storage') + ->disableOriginalConstructor()->getMock(); + $storageMock->expects($this->once())->method('file_exists')->willReturn($fileExists); + + $fileMock = $this->getMockBuilder('\OC\Encryption\File') + ->disableOriginalConstructor()->getMock(); + $fileMock->expects($this->once())->method('getAccessList') + ->will($this->returnCallback(function($sharePath) use ($expectedSharePath) { + $this->assertSame($expectedSharePath, $sharePath); + return array(); + })); + + // get a instance of the stream wrapper + $streamWrapper = $this->getMockBuilder('\OC\Files\Stream\Encryption') + ->setMethods(['loadContext'])->disableOriginalConstructor()->getMock(); + + // set internal properties of the stream wrapper + $stream = new \ReflectionClass('\OC\Files\Stream\Encryption'); + $encryptionModule = $stream->getProperty('encryptionModule'); + $encryptionModule->setAccessible(true); + $encryptionModule->setValue($streamWrapper, $encryptionModuleMock); + $encryptionModule->setAccessible(false); + $storage = $stream->getProperty('storage'); + $storage->setAccessible(true); + $storage->setValue($streamWrapper, $storageMock); + $storage->setAccessible(false); + $file = $stream->getProperty('file'); + $file->setAccessible(true); + $file->setValue($streamWrapper, $fileMock); + $file->setAccessible(false); + $fullPathP = $stream->getProperty('fullPath'); + $fullPathP->setAccessible(true); + $fullPathP->setValue($streamWrapper, $fullPath); + $fullPathP->setAccessible(false); + $header = $stream->getProperty('header'); + $header->setAccessible(true); + $header->setValue($streamWrapper, array()); + $header->setAccessible(false); + + // call stream_open, that's the method we want to test + $dummyVar = 'foo'; + $streamWrapper->stream_open('', $mode, '', $dummyVar); + + // check internal properties + $size = $stream->getProperty('size'); + $size->setAccessible(true); + $this->assertSame($expectedSize, + $size->getValue($streamWrapper) + ); + $size->setAccessible(false); + + $unencryptedSize = $stream->getProperty('unencryptedSize'); + $unencryptedSize->setAccessible(true); + $this->assertSame($expectedSize, + $unencryptedSize->getValue($streamWrapper) + ); + $unencryptedSize->setAccessible(false); + + $readOnly = $stream->getProperty('readOnly'); + $readOnly->setAccessible(true); + $this->assertSame($expectedReadOnly, + $readOnly->getValue($streamWrapper) + ); + $readOnly->setAccessible(false); + } + + public function dataProviderStreamOpen() { + return array( + array('r', '/foo/bar/test.txt', true, '/foo/bar/test.txt', null, true), + array('r', '/foo/bar/test.txt', false, '/foo/bar', null, true), + array('w', '/foo/bar/test.txt', true, '/foo/bar/test.txt', 0, false), + ); + } + public function testWriteRead() { $fileName = tempnam("/tmp", "FOO"); $stream = $this->getStream($fileName, 'w+', 0); diff --git a/tests/lib/geo.php b/tests/lib/geo.php deleted file mode 100644 index 0678297b55a..00000000000 --- a/tests/lib/geo.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Lukas Reschke <lukas@statuscode.ch> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -class Test_Geo extends \Test\TestCase { - - /** - * @medium - */ - function testTimezone() { - $result = OC_Geo::timezone(3, 3); - $expected = 'Africa/Porto-Novo'; - $this->assertEquals($expected, $result); - - $result = OC_Geo::timezone(-3,-3333); - $expected = 'Pacific/Enderbury'; - $this->assertEquals($expected, $result); - } -} diff --git a/tests/lib/security/certificate.php b/tests/lib/security/certificate.php index 361f2f8c38d..7fc8bbbdf25 100644 --- a/tests/lib/security/certificate.php +++ b/tests/lib/security/certificate.php @@ -1,9 +1,22 @@ <?php /** - * Copyright (c) 2014 Lukas Reschke <lukas@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. + * @author Lukas Reschke <lukas@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * */ use \OC\Security\Certificate; @@ -32,33 +45,34 @@ class CertificateTest extends \Test\TestCase { * @expectedException \Exception * @expectedExceptionMessage Certificate could not get parsed. */ - function testBogusData() { - new Certificate('foo', 'bar'); + public function testBogusData() { + $certificate = new Certificate('foo', 'bar'); + $certificate->getIssueDate(); } - function testGetName() { + public function testGetName() { $this->assertSame('GoodCertificate', $this->goodCertificate->getName()); $this->assertSame('BadCertificate', $this->invalidCertificate->getName()); } - function testGetCommonName() { + public function testGetCommonName() { $this->assertSame('security.owncloud.com', $this->goodCertificate->getCommonName()); $this->assertSame(null, $this->invalidCertificate->getCommonName()); } - function testGetOrganization() { + public function testGetOrganization() { $this->assertSame('ownCloud Inc.', $this->goodCertificate->getOrganization()); $this->assertSame('Internet Widgits Pty Ltd', $this->invalidCertificate->getOrganization()); } - function testGetIssueDate() { + public function testGetIssueDate() { $expected = new DateTime('2014-08-27 08:45:52 GMT'); $this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getIssueDate()->getTimestamp()); $expected = new DateTime('2014-08-27 08:48:51 GMT'); $this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getIssueDate()->getTimestamp()); } - function testGetExpireDate() { + public function testGetExpireDate() { $expected = new DateTime('2015-08-27 08:45:52 GMT'); $this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getExpireDate()->getTimestamp()); $expected = new DateTime('2015-08-27 08:48:51 GMT'); @@ -70,19 +84,19 @@ class CertificateTest extends \Test\TestCase { /** * Obviously the following test case might fail after 2015-08-27, just create a new certificate with longer validity then */ - function testIsExpired() { + public function testIsExpired() { $this->assertSame(false, $this->goodCertificate->isExpired()); $this->assertSame(false, $this->invalidCertificate->isExpired()); $this->assertSame(true, $this->expiredCertificate->isExpired()); } - function testGetIssuerName() { + public function testGetIssuerName() { $this->assertSame('security.owncloud.com', $this->goodCertificate->getIssuerName()); $this->assertSame(null, $this->invalidCertificate->getIssuerName()); $this->assertSame(null, $this->expiredCertificate->getIssuerName()); } - function testGetIssuerOrganization() { + public function testGetIssuerOrganization() { $this->assertSame('ownCloud Inc.', $this->goodCertificate->getIssuerOrganization()); $this->assertSame('Internet Widgits Pty Ltd', $this->invalidCertificate->getIssuerOrganization()); $this->assertSame('Internet Widgits Pty Ltd', $this->expiredCertificate->getIssuerOrganization()); diff --git a/tests/lib/security/certificatemanager.php b/tests/lib/security/certificatemanager.php index 1167fe3d868..fab1c208443 100644 --- a/tests/lib/security/certificatemanager.php +++ b/tests/lib/security/certificatemanager.php @@ -14,8 +14,6 @@ class CertificateManagerTest extends \Test\TestCase { private $certificateManager; /** @var String */ private $username; - /** @var \OC\User\User */ - private $user; protected function setUp() { parent::setUp(); @@ -67,9 +65,25 @@ class CertificateManagerTest extends \Test\TestCase { $this->certificateManager->addCertificate('InvalidCertificate', 'invalidCertificate'); } - function testAddDangerousFile() { - $this->assertFalse($this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '.htaccess')); - $this->assertFalse($this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), '../../foo.txt')); + /** + * @return array + */ + public function dangerousFileProvider() { + return [ + ['.htaccess'], + ['../../foo.txt'], + ['..\..\foo.txt'], + ]; + } + + /** + * @expectedException \Exception + * @expectedExceptionMessage Filename is not valid + * @dataProvider dangerousFileProvider + * @param string $filename + */ + function testAddDangerousFile($filename) { + $this->certificateManager->addCertificate(file_get_contents(__DIR__.'/../../data/certificates/expiredCertificate.crt'), $filename); } function testRemoveDangerousFile() { diff --git a/tests/lib/template/resourcelocator.php b/tests/lib/template/resourcelocator.php index b0851621fd2..ef5e2ed1357 100644 --- a/tests/lib/template/resourcelocator.php +++ b/tests/lib/template/resourcelocator.php @@ -6,8 +6,12 @@ * See the COPYING-README file. */ -class Test_ResourceLocator extends \Test\TestCase { - /** @var PHPUnit_Framework_MockObject_MockObject */ +namespace Test\Template; + +use OC\Template\ResourceNotFoundException; + +class ResourceLocator extends \Test\TestCase { + /** @var \PHPUnit_Framework_MockObject_MockObject */ protected $logger; protected function setUp() { @@ -17,10 +21,14 @@ class Test_ResourceLocator extends \Test\TestCase { /** * @param string $theme + * @param array $core_map + * @param array $party_map + * @param array $appsRoots + * @return \PHPUnit_Framework_MockObject_MockObject */ - public function getResourceLocator( $theme, $core_map, $party_map, $appsroots ) { + public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) { return $this->getMockForAbstractClass('OC\Template\ResourceLocator', - array($this->logger, $theme, $core_map, $party_map, $appsroots ), + array($this->logger, $theme, $core_map, $party_map, $appsRoots ), '', true, true, true, array()); } @@ -44,6 +52,7 @@ class Test_ResourceLocator extends \Test\TestCase { $locator->expects($this->once()) ->method('doFindTheme') ->with('foo'); + /** @var \OC\Template\ResourceLocator $locator */ $locator->find(array('foo')); } @@ -53,20 +62,23 @@ class Test_ResourceLocator extends \Test\TestCase { $locator->expects($this->once()) ->method('doFind') ->with('foo') - ->will($this->throwException(new \OC\Template\ResourceNotFoundException('foo', 'map'))); + ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); $locator->expects($this->once()) ->method('doFindTheme') ->with('foo') - ->will($this->throwException(new \OC\Template\ResourceNotFoundException('foo', 'map'))); + ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); $this->logger->expects($this->exactly(2)) - ->method('error'); + ->method('error') + ->with($this->stringContains('map/foo')); + /** @var \OC\Template\ResourceLocator $locator */ $locator->find(array('foo')); } public function testAppendIfExist() { $locator = $this->getResourceLocator('theme', array(__DIR__=>'map'), array('3rd'=>'party'), array('foo'=>'bar')); - $method = new ReflectionMethod($locator, 'appendIfExist'); + /** @var \OC\Template\ResourceLocator $locator */ + $method = new \ReflectionMethod($locator, 'appendIfExist'); $method->setAccessible(true); $method->invoke($locator, __DIR__, basename(__FILE__), 'webroot'); diff --git a/tests/settings/controller/CertificateControllerTest.php b/tests/settings/controller/CertificateControllerTest.php new file mode 100644 index 00000000000..b6981195034 --- /dev/null +++ b/tests/settings/controller/CertificateControllerTest.php @@ -0,0 +1,174 @@ +<?php +/** + * @author Lukas Reschke <lukas@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OC\Settings\Controller; + +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; +use OCP\IL10N; +use OCP\ICertificateManager; + +/** + * Class CertificateControllerTest + * + * @package OC\Settings\Controller + */ +class CertificateControllerTest extends \Test\TestCase { + /** @var CertificateController */ + private $certificateController; + /** @var IRequest */ + private $request; + /** @var ICertificateManager */ + private $certificateManager; + /** @var IL10N */ + private $l10n; + + public function setUp() { + parent::setUp(); + + $this->request = $this->getMock('\OCP\IRequest'); + $this->certificateManager = $this->getMock('\OCP\ICertificateManager'); + $this->l10n = $this->getMock('\OCP\IL10N'); + + $this->certificateController = new CertificateController( + 'settings', + $this->request, + $this->certificateManager, + $this->l10n + ); + } + + public function testAddPersonalRootCertificateWithEmptyFile() { + $this->request + ->expects($this->once()) + ->method('getUploadedFile') + ->with('rootcert_import') + ->will($this->returnValue(null)); + + $expected = new DataResponse(['message' => 'No file uploaded'], Http::STATUS_UNPROCESSABLE_ENTITY); + $this->assertEquals($expected, $this->certificateController->addPersonalRootCertificate()); + } + + public function testAddPersonalRootCertificateValidCertificate() { + $uploadedFile = [ + 'tmp_name' => __DIR__ . '/../../data/certificates/goodCertificate.crt', + 'name' => 'goodCertificate.crt', + ]; + + $certificate = $this->getMock('\OCP\ICertificate'); + $certificate + ->expects($this->once()) + ->method('getName') + ->will($this->returnValue('Name')); + $certificate + ->expects($this->once()) + ->method('getCommonName') + ->will($this->returnValue('CommonName')); + $certificate + ->expects($this->once()) + ->method('getOrganization') + ->will($this->returnValue('Organization')); + $certificate + ->expects($this->exactly(2)) + ->method('getIssueDate') + ->will($this->returnValue(new \DateTime('@1429099555'))); + $certificate + ->expects($this->exactly(2)) + ->method('getExpireDate') + ->will($this->returnValue(new \DateTime('@1529099555'))); + $certificate + ->expects($this->once()) + ->method('getIssuerName') + ->will($this->returnValue('Issuer')); + $certificate + ->expects($this->once()) + ->method('getIssuerOrganization') + ->will($this->returnValue('IssuerOrganization')); + + $this->request + ->expects($this->once()) + ->method('getUploadedFile') + ->with('rootcert_import') + ->will($this->returnValue($uploadedFile)); + $this->certificateManager + ->expects($this->once()) + ->method('addCertificate') + ->with(file_get_contents($uploadedFile['tmp_name'], 'goodCertificate.crt')) + ->will($this->returnValue($certificate)); + + $this->l10n + ->expects($this->at(0)) + ->method('l') + ->with('date', new \DateTime('@1429099555')) + ->will($this->returnValue('Valid From as String')); + $this->l10n + ->expects($this->at(1)) + ->method('l') + ->with('date', new \DateTime('@1529099555')) + ->will($this->returnValue('Valid Till as String')); + + + $expected = new DataResponse([ + 'name' => 'Name', + 'commonName' => 'CommonName', + 'organization' => 'Organization', + 'validFrom' => 1429099555, + 'validTill' => 1529099555, + 'validFromString' => 'Valid From as String', + 'validTillString' => 'Valid Till as String', + 'issuer' => 'Issuer', + 'issuerOrganization' => 'IssuerOrganization', + ]); + $this->assertEquals($expected, $this->certificateController->addPersonalRootCertificate()); + } + + public function testAddPersonalRootCertificateInvalidCertificate() { + $uploadedFile = [ + 'tmp_name' => __DIR__ . '/../../data/certificates/badCertificate.crt', + 'name' => 'badCertificate.crt', + ]; + + $this->request + ->expects($this->once()) + ->method('getUploadedFile') + ->with('rootcert_import') + ->will($this->returnValue($uploadedFile)); + $this->certificateManager + ->expects($this->once()) + ->method('addCertificate') + ->with(file_get_contents($uploadedFile['tmp_name'], 'badCertificate.crt')) + ->will($this->throwException(new \Exception())); + + $expected = new DataResponse('An error occurred.', Http::STATUS_UNPROCESSABLE_ENTITY); + $this->assertEquals($expected, $this->certificateController->addPersonalRootCertificate()); + } + + public function testRemoveCertificate() { + $this->certificateManager + ->expects($this->once()) + ->method('removeCertificate') + ->with('CertificateToRemove'); + + $this->assertEquals(new DataResponse(), $this->certificateController->removePersonalRootCertificate('CertificateToRemove')); + } + +} |