diff options
Diffstat (limited to 'apps/files_external')
41 files changed, 602 insertions, 89 deletions
diff --git a/apps/files_external/appinfo/database.xml b/apps/files_external/appinfo/database.xml index 27918bf9819..2c3615a4d4c 100644 --- a/apps/files_external/appinfo/database.xml +++ b/apps/files_external/appinfo/database.xml @@ -80,14 +80,12 @@ <length>64</length> </field> <index> - <name>mount_id_app_index</name> <field> <name>mount_id</name> <sorting>ascending</sorting> </field> </index> <index> - <name>applicable_value_index</name> <field> <name>type</name> <sorting>ascending</sorting> @@ -98,7 +96,6 @@ </field> </index> <index> - <name>applicable_value_mount_index</name> <unique>true</unique> <field> <name>type</name> @@ -147,14 +144,12 @@ </field> <index> - <name>config_mount_id</name> <field> <name>mount_id</name> <sorting>ascending</sorting> </field> </index> <index> - <name>config_mount_key</name> <unique>true</unique> <field> <name>mount_id</name> @@ -199,7 +194,6 @@ </field> <index> - <name>option_mount_id</name> <field> <name>mount_id</name> <sorting>ascending</sorting> diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index f6d583d0a5a..355d9feb4b9 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -14,7 +14,7 @@ <admin>admin-external-storage</admin> </documentation> <rememberlogin>false</rememberlogin> - <version>0.5.0</version> + <version>0.5.1</version> <types> <filesystem/> </types> diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 94c8194e328..13ca22abcc9 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -36,6 +36,14 @@ OC.L10N.register( "(group)" : "(skupina)", "Admin defined" : "Nastaveno administrátorem", "Saved" : "Uloženo", + "Empty response from the server" : "Prázdná odpověď serveru", + "Couldn't access. Please logout and login to activate this mount point" : "Nelze připojit. Pro aktivaci tohoto přípojného bodu se prosím odhlašte a znovu přihlašte", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Nelze obdržet informaci z ownCloud serveru: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Nelze obdržet seznam vzdálených přípojných bodů: {type}", + "There was an error with message: " : "Došlo k chybě s tímto hlášením:", + "External mount error" : "Chyba vzdáleného úložiště", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Nelze obdržet seznam síťových úložišť systému Windows: prázdná odpověď serveru", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Některá z nastavených vzdálených úložišť nejsou připojena. Pro více informací prosím klikněte na červenou šipku(y)", "Access key" : "Přístupový klíč", "Secret key" : "Tajný klíč", "Builtin" : "Zabudované", diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index 4adba2f4d04..bfcd3a30f46 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -34,6 +34,14 @@ "(group)" : "(skupina)", "Admin defined" : "Nastaveno administrátorem", "Saved" : "Uloženo", + "Empty response from the server" : "Prázdná odpověď serveru", + "Couldn't access. Please logout and login to activate this mount point" : "Nelze připojit. Pro aktivaci tohoto přípojného bodu se prosím odhlašte a znovu přihlašte", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Nelze obdržet informaci z ownCloud serveru: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Nelze obdržet seznam vzdálených přípojných bodů: {type}", + "There was an error with message: " : "Došlo k chybě s tímto hlášením:", + "External mount error" : "Chyba vzdáleného úložiště", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Nelze obdržet seznam síťových úložišť systému Windows: prázdná odpověď serveru", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Některá z nastavených vzdálených úložišť nejsou připojena. Pro více informací prosím klikněte na červenou šipku(y)", "Access key" : "Přístupový klíč", "Secret key" : "Tajný klíč", "Builtin" : "Zabudované", diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js index d4d00e7f83e..18f67db420f 100644 --- a/apps/files_external/l10n/de.js +++ b/apps/files_external/l10n/de.js @@ -10,10 +10,12 @@ OC.L10N.register( "Storage with id \"%i\" not found" : "Der Speicher mit der ID „%i“ wurde nicht gefunden", "Invalid mount point" : "Ungültiger mount point", "Invalid storage backend \"%s\"" : "Ungültiges Speicher-Backend „%s“", + "%s" : "%s", "Personal" : "Persönlich", "System" : "System", "Grant access" : "Zugriff gestatten", "Access granted" : "Zugriff gestattet", + "Error configuring OAuth1" : "Fehler beim konfigurieren von OAuth1", "Error configuring OAuth2" : "Fehler beim Einrichten von OAuth2", "Generate keys" : "Schlüssel erzeugen", "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", @@ -25,7 +27,9 @@ OC.L10N.register( "Every time the filesystem is used" : "Immer, wenn das Dateisystem benutzt wird", "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", + "Admin defined" : "Administrator festlegen", "Saved" : "Gespeichert", + "There was an error with message: " : "Es ist ein Fehler mit folgender Meldung aufgetreten:", "Access key" : "Zugangsschlüssel", "Secret key" : "Geheimer Schlüssel", "None" : "Keine", diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json index a65f58b0fdb..cae7672260e 100644 --- a/apps/files_external/l10n/de.json +++ b/apps/files_external/l10n/de.json @@ -8,10 +8,12 @@ "Storage with id \"%i\" not found" : "Der Speicher mit der ID „%i“ wurde nicht gefunden", "Invalid mount point" : "Ungültiger mount point", "Invalid storage backend \"%s\"" : "Ungültiges Speicher-Backend „%s“", + "%s" : "%s", "Personal" : "Persönlich", "System" : "System", "Grant access" : "Zugriff gestatten", "Access granted" : "Zugriff gestattet", + "Error configuring OAuth1" : "Fehler beim konfigurieren von OAuth1", "Error configuring OAuth2" : "Fehler beim Einrichten von OAuth2", "Generate keys" : "Schlüssel erzeugen", "Error generating key pair" : "Fehler beim Erzeugen des Schlüsselpaares", @@ -23,7 +25,9 @@ "Every time the filesystem is used" : "Immer, wenn das Dateisystem benutzt wird", "All users. Type to select user or group." : "Alle Benutzer. Benutzer oder Gruppe zur Auswahl eingeben.", "(group)" : "(group)", + "Admin defined" : "Administrator festlegen", "Saved" : "Gespeichert", + "There was an error with message: " : "Es ist ein Fehler mit folgender Meldung aufgetreten:", "Access key" : "Zugangsschlüssel", "Secret key" : "Geheimer Schlüssel", "None" : "Keine", diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index 294ec9da6ff..6de2ebb2101 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -17,6 +17,7 @@ OC.L10N.register( "Unsatisfied backend parameters" : "Ελλιπείς παράμετροι συστήματος", "Unsatisfied authentication mechanism parameters" : "Ελλιπείς παράμετροι μηχανισμού πιστοποίησης", "Insufficient data: %s" : "Μη επαρκή δεδομένα: %s", + "%s" : "%s", "Personal" : "Προσωπικά", "System" : "Σύστημα", "Grant access" : "Παροχή πρόσβασης", diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index 431e81c3d7a..1c5d7fb6dfc 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -15,6 +15,7 @@ "Unsatisfied backend parameters" : "Ελλιπείς παράμετροι συστήματος", "Unsatisfied authentication mechanism parameters" : "Ελλιπείς παράμετροι μηχανισμού πιστοποίησης", "Insufficient data: %s" : "Μη επαρκή δεδομένα: %s", + "%s" : "%s", "Personal" : "Προσωπικά", "System" : "Σύστημα", "Grant access" : "Παροχή πρόσβασης", diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index 6d8bf0d3139..5aaa3884fd0 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -1,8 +1,8 @@ OC.L10N.register( "files_external", { - "Fetching request tokens failed. Verify that your app key and secret are correct." : "Fallo al acceder a los tokens solicitados. Verfique que su clave de app y la clave secreta son correctas.", - "Fetching access tokens failed. Verify that your app key and secret are correct." : "Fallo al acceder a los tokens solicitados. Verfique que su clave de app y la clave secreta son correctas.", + "Fetching request tokens failed. Verify that your app key and secret are correct." : "Falló al acceder a los tokens solicitados. Verifique que su clave de app y la clave secreta sean correctas.", + "Fetching access tokens failed. Verify that your app key and secret are correct." : "Falló al acceder a los tokens solicitados. Verifique que su clave de app y la clave secreta sean correctas.", "Please provide a valid app key and secret." : "Por favor facilite una clave de app y una clave secreta válidas.", "Step 1 failed. Exception: %s" : "El paso 1 falló. Excepción: %s", "Step 2 failed. Exception: %s" : "El paso 2 falló. Excepción: %s", @@ -36,6 +36,7 @@ OC.L10N.register( "(group)" : "(grupo)", "Admin defined" : "Admin definido", "Saved" : "Guardado", + "There was an error with message: " : "Hubo un error con el mensaje:", "Access key" : "Clave de acceso", "Secret key" : "Clave secreta", "None" : "Ninguno", @@ -100,6 +101,7 @@ OC.L10N.register( "Add storage" : "Añadir almacenamiento", "Advanced settings" : "Configuración avanzada", "Delete" : "Eliminar", + "Allow users to mount external storage" : "Permitir a los usuarios montar un almacenamiento externo", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamiento externo" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index bf0624e96db..60722de1f41 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -1,6 +1,6 @@ { "translations": { - "Fetching request tokens failed. Verify that your app key and secret are correct." : "Fallo al acceder a los tokens solicitados. Verfique que su clave de app y la clave secreta son correctas.", - "Fetching access tokens failed. Verify that your app key and secret are correct." : "Fallo al acceder a los tokens solicitados. Verfique que su clave de app y la clave secreta son correctas.", + "Fetching request tokens failed. Verify that your app key and secret are correct." : "Falló al acceder a los tokens solicitados. Verifique que su clave de app y la clave secreta sean correctas.", + "Fetching access tokens failed. Verify that your app key and secret are correct." : "Falló al acceder a los tokens solicitados. Verifique que su clave de app y la clave secreta sean correctas.", "Please provide a valid app key and secret." : "Por favor facilite una clave de app y una clave secreta válidas.", "Step 1 failed. Exception: %s" : "El paso 1 falló. Excepción: %s", "Step 2 failed. Exception: %s" : "El paso 2 falló. Excepción: %s", @@ -34,6 +34,7 @@ "(group)" : "(grupo)", "Admin defined" : "Admin definido", "Saved" : "Guardado", + "There was an error with message: " : "Hubo un error con el mensaje:", "Access key" : "Clave de acceso", "Secret key" : "Clave secreta", "None" : "Ninguno", @@ -98,6 +99,7 @@ "Add storage" : "Añadir almacenamiento", "Advanced settings" : "Configuración avanzada", "Delete" : "Eliminar", + "Allow users to mount external storage" : "Permitir a los usuarios montar un almacenamiento externo", "Allow users to mount the following external storage" : "Permitir a los usuarios montar el siguiente almacenamiento externo" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/files_external/l10n/et_EE.js b/apps/files_external/l10n/et_EE.js index fa22b4c6591..e21ce7e39ae 100644 --- a/apps/files_external/l10n/et_EE.js +++ b/apps/files_external/l10n/et_EE.js @@ -7,10 +7,14 @@ OC.L10N.register( "Storage with id \"%i\" not found" : "Salvestuskohta ID-ga \"%i\" ei leitud", "Invalid mount point" : "Vigane ühenduspunkt", "Invalid storage backend \"%s\"" : "Vigane salvestuskoha taustsüsteem \"%s\"", + "Unsatisfied backend parameters" : "Rahuldamata taustarakenduse parameetrid", + "%s" : "%s", "Personal" : "Isiklik", "System" : "Süsteem", "Grant access" : "Anna ligipääs", "Access granted" : "Ligipääs on antud", + "Error configuring OAuth1" : "OAuth1 seadistamise tõrge", + "Error configuring OAuth2" : "OAuth2 seadistamise tõrge", "Generate keys" : "Loo võtmed", "Error generating key pair" : "Viga võtmepaari loomisel", "Enable encryption" : "Luba krüpteerimine", @@ -21,18 +25,26 @@ OC.L10N.register( "Every time the filesystem is used" : "Iga kord, kui failisüsteemi kasutatakse", "All users. Type to select user or group." : "Kõik kasutajad. Kirjuta, et valida kasutaja või grupp.", "(group)" : "(grupp)", + "Admin defined" : "Admini poolt määratud", "Saved" : "Salvestatud", + "Couldn't get the list of external mount points: {type}" : "Välise ühenduspunkti hankimine ebaõnnestus: {type}", + "There was an error with message: " : "Sõnumiga tekkis tõrge:", + "External mount error" : "Välise seostamise tõrge", + "Access key" : "Ligipääsuvõti", + "Secret key" : "Salavõti", "Builtin" : "Sisseehitatud", "None" : "Pole", "OAuth1" : "OAuth1", "App key" : "Rakenduse võti", "App secret" : "Rakenduse salasõna", + "OAuth2" : "OAuth2", "Client ID" : "Kliendi ID", "Client secret" : "Kliendi salasõna", "OpenStack" : "OpenStack", "Username" : "Kasutajanimi", "Password" : "Parool", "API key" : "API võti", + "RSA public key" : "RSA avalik võti", "Public key" : "Avalik võti", "Amazon S3" : "Amazon S3", "Bucket" : "Korv", diff --git a/apps/files_external/l10n/et_EE.json b/apps/files_external/l10n/et_EE.json index 37e7cc282ce..ad7b8622be8 100644 --- a/apps/files_external/l10n/et_EE.json +++ b/apps/files_external/l10n/et_EE.json @@ -5,10 +5,14 @@ "Storage with id \"%i\" not found" : "Salvestuskohta ID-ga \"%i\" ei leitud", "Invalid mount point" : "Vigane ühenduspunkt", "Invalid storage backend \"%s\"" : "Vigane salvestuskoha taustsüsteem \"%s\"", + "Unsatisfied backend parameters" : "Rahuldamata taustarakenduse parameetrid", + "%s" : "%s", "Personal" : "Isiklik", "System" : "Süsteem", "Grant access" : "Anna ligipääs", "Access granted" : "Ligipääs on antud", + "Error configuring OAuth1" : "OAuth1 seadistamise tõrge", + "Error configuring OAuth2" : "OAuth2 seadistamise tõrge", "Generate keys" : "Loo võtmed", "Error generating key pair" : "Viga võtmepaari loomisel", "Enable encryption" : "Luba krüpteerimine", @@ -19,18 +23,26 @@ "Every time the filesystem is used" : "Iga kord, kui failisüsteemi kasutatakse", "All users. Type to select user or group." : "Kõik kasutajad. Kirjuta, et valida kasutaja või grupp.", "(group)" : "(grupp)", + "Admin defined" : "Admini poolt määratud", "Saved" : "Salvestatud", + "Couldn't get the list of external mount points: {type}" : "Välise ühenduspunkti hankimine ebaõnnestus: {type}", + "There was an error with message: " : "Sõnumiga tekkis tõrge:", + "External mount error" : "Välise seostamise tõrge", + "Access key" : "Ligipääsuvõti", + "Secret key" : "Salavõti", "Builtin" : "Sisseehitatud", "None" : "Pole", "OAuth1" : "OAuth1", "App key" : "Rakenduse võti", "App secret" : "Rakenduse salasõna", + "OAuth2" : "OAuth2", "Client ID" : "Kliendi ID", "Client secret" : "Kliendi salasõna", "OpenStack" : "OpenStack", "Username" : "Kasutajanimi", "Password" : "Parool", "API key" : "API võti", + "RSA public key" : "RSA avalik võti", "Public key" : "Avalik võti", "Amazon S3" : "Amazon S3", "Bucket" : "Korv", diff --git a/apps/files_external/l10n/fi_FI.js b/apps/files_external/l10n/fi_FI.js index b56ad195ce6..c358a2b3260 100644 --- a/apps/files_external/l10n/fi_FI.js +++ b/apps/files_external/l10n/fi_FI.js @@ -25,6 +25,8 @@ OC.L10N.register( "(group)" : "(ryhmä)", "Admin defined" : "Ylläpitäjän määrittämä", "Saved" : "Tallennettu", + "Empty response from the server" : "Tyhjä vastaus palvelimelta", + "There was an error with message: " : "Tapahtui virhe viestillä:", "Builtin" : "Sisäänrakennettu", "None" : "Ei mitään", "OAuth1" : "OAuth1", @@ -39,6 +41,7 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "API-avain", "Username and password" : "Käyttäjätunnus ja salasana", + "Session credentials" : "Istunnon tunnistetiedot", "RSA public key" : "Julkinen RSA-avain", "Public key" : "Julkinen avain", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/fi_FI.json b/apps/files_external/l10n/fi_FI.json index 9ff2748b7f6..4e72d861d6f 100644 --- a/apps/files_external/l10n/fi_FI.json +++ b/apps/files_external/l10n/fi_FI.json @@ -23,6 +23,8 @@ "(group)" : "(ryhmä)", "Admin defined" : "Ylläpitäjän määrittämä", "Saved" : "Tallennettu", + "Empty response from the server" : "Tyhjä vastaus palvelimelta", + "There was an error with message: " : "Tapahtui virhe viestillä:", "Builtin" : "Sisäänrakennettu", "None" : "Ei mitään", "OAuth1" : "OAuth1", @@ -37,6 +39,7 @@ "Rackspace" : "Rackspace", "API key" : "API-avain", "Username and password" : "Käyttäjätunnus ja salasana", + "Session credentials" : "Istunnon tunnistetiedot", "RSA public key" : "Julkinen RSA-avain", "Public key" : "Julkinen avain", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js index 8d5f7e911b7..eb99f0aaeba 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -36,6 +36,14 @@ OC.L10N.register( "(group)" : "(groupe)", "Admin defined" : "Défini par l'administrateur", "Saved" : "Sauvegardé", + "Empty response from the server" : "Réponse vide du serveur", + "Couldn't access. Please logout and login to activate this mount point" : "Impossible d'accéder. Veuillez vous déconnecter et vous reconnecter pour activer ce point de montage.", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur ownCloud : {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Impossible de récupérer la liste des points de montage externes : {type}", + "There was an error with message: " : "Il y a eu une erreur avec le message :", + "External mount error" : "Erreur de montage externe", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Impossible d'obtenir la liste des points de montage des disques réseaux Windows : Réponse vide du serveur", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Certains points de montage externes configurés ne sont pas connectés. Veuillez cliquer sur la(les) ligne(s) rouge(s) pour plus d'informations", "Access key" : "Clé d'accès", "Secret key" : "Clé secrète", "Builtin" : "Intégré", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index cae66119a4f..a399872c208 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -34,6 +34,14 @@ "(group)" : "(groupe)", "Admin defined" : "Défini par l'administrateur", "Saved" : "Sauvegardé", + "Empty response from the server" : "Réponse vide du serveur", + "Couldn't access. Please logout and login to activate this mount point" : "Impossible d'accéder. Veuillez vous déconnecter et vous reconnecter pour activer ce point de montage.", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur ownCloud : {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Impossible de récupérer la liste des points de montage externes : {type}", + "There was an error with message: " : "Il y a eu une erreur avec le message :", + "External mount error" : "Erreur de montage externe", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Impossible d'obtenir la liste des points de montage des disques réseaux Windows : Réponse vide du serveur", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Certains points de montage externes configurés ne sont pas connectés. Veuillez cliquer sur la(les) ligne(s) rouge(s) pour plus d'informations", "Access key" : "Clé d'accès", "Secret key" : "Clé secrète", "Builtin" : "Intégré", diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index daca1d3a896..85fb70cf1a7 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -36,6 +36,15 @@ OC.L10N.register( "(group)" : "(gruppo)", "Admin defined" : "Definito dall'amministratore", "Saved" : "Salvato", + "Empty response from the server" : "Risposta vuota dal server", + "Couldn't access. Please logout and login to activate this mount point" : "Impossibile accedere. Termina la sessione e accedi nuovamente per attivare questo punto di mount", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossibile ottenere le informazioni dal server ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Impossibile ottenere l'elenco dei punti di mount esterni: {type}", + "There was an error with message: " : "Si è verificato un errore con il messaggio:", + "External mount error" : "Errore di mount esterno", + "goto-external-storage" : "goto-external-storage", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Impossibile ottenere l'elenco dei punti di mount delle unità di rete Windows: risposta vuota dal server", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alcuni dei punti di mount esterni configurati non sono connessi. Fai clic sulle righe rosse per ulteriori informazioni", "Access key" : "Chiave di accesso", "Secret key" : "Chiave segreta", "Builtin" : "Integrata", diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index 67f7fe3595b..08da52362d6 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -34,6 +34,15 @@ "(group)" : "(gruppo)", "Admin defined" : "Definito dall'amministratore", "Saved" : "Salvato", + "Empty response from the server" : "Risposta vuota dal server", + "Couldn't access. Please logout and login to activate this mount point" : "Impossibile accedere. Termina la sessione e accedi nuovamente per attivare questo punto di mount", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossibile ottenere le informazioni dal server ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Impossibile ottenere l'elenco dei punti di mount esterni: {type}", + "There was an error with message: " : "Si è verificato un errore con il messaggio:", + "External mount error" : "Errore di mount esterno", + "goto-external-storage" : "goto-external-storage", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Impossibile ottenere l'elenco dei punti di mount delle unità di rete Windows: risposta vuota dal server", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alcuni dei punti di mount esterni configurati non sono connessi. Fai clic sulle righe rosse per ulteriori informazioni", "Access key" : "Chiave di accesso", "Secret key" : "Chiave segreta", "Builtin" : "Integrata", diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index 5518f6afa78..d99eca69d2b 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -17,6 +17,7 @@ OC.L10N.register( "Unsatisfied backend parameters" : "バックエンドのためのパラメーターが不十分です。", "Unsatisfied authentication mechanism parameters" : "認証のためのパラメータが不十分です", "Insufficient data: %s" : "データが不足しています: %s", + "%s" : "%s", "Personal" : "個人", "System" : "システム", "Grant access" : "アクセスを許可", @@ -35,6 +36,13 @@ OC.L10N.register( "(group)" : "(グループ)", "Admin defined" : "管理者設定済", "Saved" : "保存されました", + "Empty response from the server" : "サーバーから空の応答がありました", + "Couldn't access. Please logout and login to activate this mount point" : "アクセス出来ませんでした。このマウントポイントを有効にするには一度ログアウトしてからログインしてください。", + "Couldn't get the information from the ownCloud server: {code} {type}" : "ownCloud サーバーから情報を取得出来ませんでした。: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "外部マウントポイントのリストを取得出来ませんでした。: {type}", + "There was an error with message: " : "メッセージ付きのエラーが発生しました:", + "External mount error" : "外部マウントエラー", + "goto-external-storage" : "外部ストレージに行く", "Access key" : "アクセスキー", "Secret key" : "シークレットキー", "Builtin" : "ビルトイン", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index 8134ed16cd5..2675c3e18e5 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -15,6 +15,7 @@ "Unsatisfied backend parameters" : "バックエンドのためのパラメーターが不十分です。", "Unsatisfied authentication mechanism parameters" : "認証のためのパラメータが不十分です", "Insufficient data: %s" : "データが不足しています: %s", + "%s" : "%s", "Personal" : "個人", "System" : "システム", "Grant access" : "アクセスを許可", @@ -33,6 +34,13 @@ "(group)" : "(グループ)", "Admin defined" : "管理者設定済", "Saved" : "保存されました", + "Empty response from the server" : "サーバーから空の応答がありました", + "Couldn't access. Please logout and login to activate this mount point" : "アクセス出来ませんでした。このマウントポイントを有効にするには一度ログアウトしてからログインしてください。", + "Couldn't get the information from the ownCloud server: {code} {type}" : "ownCloud サーバーから情報を取得出来ませんでした。: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "外部マウントポイントのリストを取得出来ませんでした。: {type}", + "There was an error with message: " : "メッセージ付きのエラーが発生しました:", + "External mount error" : "外部マウントエラー", + "goto-external-storage" : "外部ストレージに行く", "Access key" : "アクセスキー", "Secret key" : "シークレットキー", "Builtin" : "ビルトイン", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 5051689216f..3200988ec2b 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -36,6 +36,15 @@ OC.L10N.register( "(group)" : "(groep)", "Admin defined" : "Beheerder gedefinieerd", "Saved" : "Bewaard", + "Empty response from the server" : "Lege reactie van de server", + "Couldn't access. Please logout and login to activate this mount point" : "Geen toegang. Log uit en opnieuw in om dit koppelpunt te activeren", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Kon geen informatie van de ownCloud server krijgen: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Kon geen overzicht met externe koppelpunten krijgen: {type}", + "There was an error with message: " : "Er was een fout met de volgende melding:", + "External mount error" : "Extern koppelpunt fout", + "goto-external-storage" : "goto-external-storage", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Kon geen overzicht met Windows netwerk koppelpunten krijgen: lege reactie van de server", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Sommige van de geconfigureerde koppelpunten zijn niet verbonden. Klok op de rode rij(en) voor meer informatie", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", "Builtin" : "Ingebouwd", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index d8a254bad1b..09b912445c1 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -34,6 +34,15 @@ "(group)" : "(groep)", "Admin defined" : "Beheerder gedefinieerd", "Saved" : "Bewaard", + "Empty response from the server" : "Lege reactie van de server", + "Couldn't access. Please logout and login to activate this mount point" : "Geen toegang. Log uit en opnieuw in om dit koppelpunt te activeren", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Kon geen informatie van de ownCloud server krijgen: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Kon geen overzicht met externe koppelpunten krijgen: {type}", + "There was an error with message: " : "Er was een fout met de volgende melding:", + "External mount error" : "Extern koppelpunt fout", + "goto-external-storage" : "goto-external-storage", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Kon geen overzicht met Windows netwerk koppelpunten krijgen: lege reactie van de server", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Sommige van de geconfigureerde koppelpunten zijn niet verbonden. Klok op de rode rij(en) voor meer informatie", "Access key" : "Access Key", "Secret key" : "Geheime sleutel", "Builtin" : "Ingebouwd", diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 0d4f04ae226..296d51836ca 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -17,6 +17,7 @@ OC.L10N.register( "Unsatisfied backend parameters" : "Parâmetros de back-end não-atendidos", "Unsatisfied authentication mechanism parameters" : "Parâmetros de mecanismos de autenticação não satisfeitos", "Insufficient data: %s" : "Dados insuficientes: %s", + "%s" : "%s", "Personal" : "Pessoal", "System" : "Sistema", "Grant access" : "Permitir acesso", @@ -35,6 +36,15 @@ OC.L10N.register( "(group)" : "(grupo)", "Admin defined" : "Definido pelo administrador", "Saved" : "Salvo", + "Empty response from the server" : "Resposta vazia a partir do servidor", + "Couldn't access. Please logout and login to activate this mount point" : "Não foi possível acessar. Por favor, desconectar e conectar novamente para ativar este ponto de montagem", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Não foi possível obter as informações do servidor ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Não foi possível obter a lista de pontos de montagem externos: {type}", + "There was an error with message: " : "Houve um erro com a mensagem:", + "External mount error" : "Erro de montagem externa", + "goto-external-storage" : "ir-montagem-externa", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Não foi possível obter a lista unidades de pontos de montagem da rede do Windows: resposta vazia a partir do servidor", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alguns dos pontos de montagem externos configurados não estão conectados. Por favor clique na linha vermelha(s) para mais informações", "Access key" : "Chave da acesso", "Secret key" : "Chave secreta", "Builtin" : "Construídas em", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index d49e818ea0f..5e4aed0b191 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -15,6 +15,7 @@ "Unsatisfied backend parameters" : "Parâmetros de back-end não-atendidos", "Unsatisfied authentication mechanism parameters" : "Parâmetros de mecanismos de autenticação não satisfeitos", "Insufficient data: %s" : "Dados insuficientes: %s", + "%s" : "%s", "Personal" : "Pessoal", "System" : "Sistema", "Grant access" : "Permitir acesso", @@ -33,6 +34,15 @@ "(group)" : "(grupo)", "Admin defined" : "Definido pelo administrador", "Saved" : "Salvo", + "Empty response from the server" : "Resposta vazia a partir do servidor", + "Couldn't access. Please logout and login to activate this mount point" : "Não foi possível acessar. Por favor, desconectar e conectar novamente para ativar este ponto de montagem", + "Couldn't get the information from the ownCloud server: {code} {type}" : "Não foi possível obter as informações do servidor ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "Não foi possível obter a lista de pontos de montagem externos: {type}", + "There was an error with message: " : "Houve um erro com a mensagem:", + "External mount error" : "Erro de montagem externa", + "goto-external-storage" : "ir-montagem-externa", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Não foi possível obter a lista unidades de pontos de montagem da rede do Windows: resposta vazia a partir do servidor", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alguns dos pontos de montagem externos configurados não estão conectados. Por favor clique na linha vermelha(s) para mais informações", "Access key" : "Chave da acesso", "Secret key" : "Chave secreta", "Builtin" : "Construídas em", diff --git a/apps/files_external/l10n/sq.js b/apps/files_external/l10n/sq.js index a708bca92d0..3e2de744b15 100644 --- a/apps/files_external/l10n/sq.js +++ b/apps/files_external/l10n/sq.js @@ -36,6 +36,14 @@ OC.L10N.register( "(group)" : "(grup)", "Admin defined" : "Përcaktuar nga përgjegjësi", "Saved" : "U ruajt", + "Empty response from the server" : "Përgjigje e zbrazët prej shërbyesit", + "Couldn't access. Please logout and login to activate this mount point" : "S’fut dot. Ju lutemi, dilni dhe hyni që të aktivizohet kjo pikë montimi", + "Couldn't get the information from the ownCloud server: {code} {type}" : "S’u morën dot të dhëna nga shërbyesi ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "S’u mor dot lista e pikave të jashtme të montimit: {type}", + "There was an error with message: " : "Pati një gabim me këtë mesazh:", + "External mount error" : "Gabim i jashtëm montimi", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "S’u mor dot lista e pikave të montimit Windows network drive: përgjigje e zbrazët nga shërbyesi", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Disa nga pikat e jashtme të formësuara të montimit s’janë të lidhura. Ju lutemi, klikoni në shigjetën(at) e kuqe për më tepër të dhëna", "Access key" : "Kyç hyrjesh", "Secret key" : "Kyç i fshehtë", "Builtin" : "I brendshëm", diff --git a/apps/files_external/l10n/sq.json b/apps/files_external/l10n/sq.json index 655a419c389..f184caf061e 100644 --- a/apps/files_external/l10n/sq.json +++ b/apps/files_external/l10n/sq.json @@ -34,6 +34,14 @@ "(group)" : "(grup)", "Admin defined" : "Përcaktuar nga përgjegjësi", "Saved" : "U ruajt", + "Empty response from the server" : "Përgjigje e zbrazët prej shërbyesit", + "Couldn't access. Please logout and login to activate this mount point" : "S’fut dot. Ju lutemi, dilni dhe hyni që të aktivizohet kjo pikë montimi", + "Couldn't get the information from the ownCloud server: {code} {type}" : "S’u morën dot të dhëna nga shërbyesi ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "S’u mor dot lista e pikave të jashtme të montimit: {type}", + "There was an error with message: " : "Pati një gabim me këtë mesazh:", + "External mount error" : "Gabim i jashtëm montimi", + "Couldn't get the list of Windows network drive mount points: empty response from the server" : "S’u mor dot lista e pikave të montimit Windows network drive: përgjigje e zbrazët nga shërbyesi", + "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Disa nga pikat e jashtme të formësuara të montimit s’janë të lidhura. Ju lutemi, klikoni në shigjetën(at) e kuqe për më tepër të dhëna", "Access key" : "Kyç hyrjesh", "Secret key" : "Kyç i fshehtë", "Builtin" : "I brendshëm", diff --git a/apps/files_external/l10n/th_TH.js b/apps/files_external/l10n/th_TH.js index bb9c2dc909d..97a64e78e40 100644 --- a/apps/files_external/l10n/th_TH.js +++ b/apps/files_external/l10n/th_TH.js @@ -36,6 +36,13 @@ OC.L10N.register( "(group)" : "(กลุ่ม)", "Admin defined" : "ถูกกำหนดโดยผู้ดูแลระบบ", "Saved" : "บันทึกแล้ว", + "Empty response from the server" : "ไม่มีการตอบสนองจากเซิร์ฟเวอร์", + "Couldn't access. Please logout and login to activate this mount point" : "ไม่สามารถเข้าถึง กรุณออกจากระบบและาเข้าสู่ระบบใหม่เพื่อเปิดใช้งานจุดเชื่อมต่อนี้", + "Couldn't get the information from the ownCloud server: {code} {type}" : "ไม่สามารถรับข้อมูลจากเซิร์ฟเวอร์ ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "ไม่สามารถรับรายชื่อของจุดเชื่อมต่อภายนอก: {type}", + "There was an error with message: " : "มีข้อความแสดงข้อผิดพลาด", + "External mount error" : "การติดจากตั้งภายนอกเกิดข้อผิดพลาด", + "goto-external-storage" : "ไปยังพื้นที่จัดเก็บข้อมูลภายนอก", "Access key" : "คีย์การเข้าถึง", "Secret key" : "คีย์ลับ", "Builtin" : "ในตัว", diff --git a/apps/files_external/l10n/th_TH.json b/apps/files_external/l10n/th_TH.json index f38d99ae88b..de569c9d61f 100644 --- a/apps/files_external/l10n/th_TH.json +++ b/apps/files_external/l10n/th_TH.json @@ -34,6 +34,13 @@ "(group)" : "(กลุ่ม)", "Admin defined" : "ถูกกำหนดโดยผู้ดูแลระบบ", "Saved" : "บันทึกแล้ว", + "Empty response from the server" : "ไม่มีการตอบสนองจากเซิร์ฟเวอร์", + "Couldn't access. Please logout and login to activate this mount point" : "ไม่สามารถเข้าถึง กรุณออกจากระบบและาเข้าสู่ระบบใหม่เพื่อเปิดใช้งานจุดเชื่อมต่อนี้", + "Couldn't get the information from the ownCloud server: {code} {type}" : "ไม่สามารถรับข้อมูลจากเซิร์ฟเวอร์ ownCloud: {code} {type}", + "Couldn't get the list of external mount points: {type}" : "ไม่สามารถรับรายชื่อของจุดเชื่อมต่อภายนอก: {type}", + "There was an error with message: " : "มีข้อความแสดงข้อผิดพลาด", + "External mount error" : "การติดจากตั้งภายนอกเกิดข้อผิดพลาด", + "goto-external-storage" : "ไปยังพื้นที่จัดเก็บข้อมูลภายนอก", "Access key" : "คีย์การเข้าถึง", "Secret key" : "คีย์ลับ", "Builtin" : "ในตัว", diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 7a869847a63..f29e08dad25 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -90,6 +90,7 @@ class OC_Mount_Config { $userStoragesService->setUser($user); foreach ($userGlobalStoragesService->getStorages() as $storage) { + /** @var \OCA\Files_external\Lib\StorageConfig $storage */ $mountPoint = '/'.$uid.'/files'.$storage->getMountPoint(); $mountEntry = self::prepareMountPointEntry($storage, false); foreach ($mountEntry['options'] as &$option) { @@ -267,26 +268,6 @@ class OC_Mount_Config { } /** - * Write the mount points to the config file - * - * @param string|null $user If not null, personal for $user, otherwise system - * @param array $data Mount points - */ - public static function writeData($user, $data) { - if (isset($user)) { - $file = \OC::$server->getUserManager()->get($user)->getHome() . '/mount.json'; - } else { - $config = \OC::$server->getConfig(); - $datadir = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/'); - $file = $config->getSystemValue('mount_file', $datadir . '/mount.json'); - } - - $content = json_encode($data, JSON_PRETTY_PRINT); - @file_put_contents($file, $content); - @chmod($file, 0640); - } - - /** * Get backend dependency message * TODO: move into AppFramework along with templates * @@ -397,39 +378,9 @@ class OC_Mount_Config { } /** - * Merges mount points - * - * @param array $data Existing mount points - * @param array $mountPoint New mount point - * @param string $mountType - * @return array - */ - private static function mergeMountPoints($data, $mountPoint, $mountType) { - $applicable = key($mountPoint); - $mountPath = key($mountPoint[$applicable]); - if (isset($data[$mountType])) { - if (isset($data[$mountType][$applicable])) { - // Merge priorities - if (isset($data[$mountType][$applicable][$mountPath]) - && isset($data[$mountType][$applicable][$mountPath]['priority']) - && !isset($mountPoint[$applicable][$mountPath]['priority']) - ) { - $mountPoint[$applicable][$mountPath]['priority'] - = $data[$mountType][$applicable][$mountPath]['priority']; - } - $data[$mountType][$applicable] - = array_merge($data[$mountType][$applicable], $mountPoint[$applicable]); - } else { - $data[$mountType] = array_merge($data[$mountType], $mountPoint); - } - } else { - $data[$mountType] = $mountPoint; - } - return $data; - } - - /** * Returns the encryption cipher + * + * @return AES */ private static function getCipher() { $cipher = new AES(AES::MODE_CBC); @@ -441,6 +392,9 @@ class OC_Mount_Config { * Computes a hash based on the given configuration. * This is mostly used to find out whether configurations * are the same. + * + * @param array $config + * @return string */ public static function makeConfigHash($config) { $data = json_encode( diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php index 4e37e6a4004..4f68c3c7fde 100644 --- a/apps/files_external/lib/config/configadapter.php +++ b/apps/files_external/lib/config/configadapter.php @@ -114,7 +114,7 @@ class ConfigAdapter implements IMountProvider { * @return \OCP\Files\Mount\IMountPoint[] */ public function getMountsForUser(IUser $user, IStorageFactory $loader) { - $this->migrator->migrateUser(); + $this->migrator->migrateUser($user); $mounts = []; diff --git a/apps/files_external/lib/personalmount.php b/apps/files_external/lib/personalmount.php index 26f68ba32db..34ae516ea5e 100644 --- a/apps/files_external/lib/personalmount.php +++ b/apps/files_external/lib/personalmount.php @@ -35,12 +35,12 @@ class PersonalMount extends MountPoint implements MoveableMount { protected $storagesService; /** @var int */ - protected $storageId; + protected $numericStorageId; /** * @param UserStoragesService $storagesService * @param int $storageId - * @param string|\OC\Files\Storage\Storage $storage + * @param \OCP\Files\Storage $storage * @param string $mountpoint * @param array $arguments (optional) configuration for the storage backend * @param \OCP\Files\Storage\IStorageFactory $loader @@ -57,7 +57,7 @@ class PersonalMount extends MountPoint implements MoveableMount { ) { parent::__construct($storage, $mountpoint, $arguments, $loader, $mountOptions); $this->storagesService = $storagesService; - $this->storageId = $storageId; + $this->numericStorageId = $storageId; } /** @@ -67,7 +67,7 @@ class PersonalMount extends MountPoint implements MoveableMount { * @return bool */ public function moveMount($target) { - $storage = $this->storagesService->getStorage($this->storageId); + $storage = $this->storagesService->getStorage($this->numericStorageId); // remove "/$user/files" prefix $targetParts = explode('/', trim($target, '/'), 3); $storage->setMountPoint($targetParts[2]); @@ -82,7 +82,7 @@ class PersonalMount extends MountPoint implements MoveableMount { * @return bool */ public function removeMount() { - $this->storagesService->removeStorage($this->storageId); + $this->storagesService->removeStorage($this->numericStorageId); return true; } } diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index a94840ead59..80b44a4cbdf 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -33,6 +33,7 @@ use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\NotFoundException; use Icewind\SMB\NativeServer; use Icewind\SMB\Server; +use Icewind\Streams\CallbackWrapper; use Icewind\Streams\IteratorDirectory; use OC\Files\Filesystem; @@ -189,7 +190,10 @@ class SMB extends Common { return $this->share->read($fullPath); case 'w': case 'wb': - return $this->share->write($fullPath); + $source = $this->share->write($fullPath); + return CallBackWrapper::wrap($source, null, null, function () use ($fullPath) { + unset($this->statCache[$fullPath]); + }); case 'a': case 'ab': case 'r+': @@ -219,7 +223,8 @@ class SMB extends Common { } $source = fopen($tmpFile, $mode); $share = $this->share; - return CallBackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { + return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { + unset($this->statCache[$fullPath]); $share->put($tmpFile, $fullPath); unlink($tmpFile); }); diff --git a/apps/files_external/migration/dummyusersession.php b/apps/files_external/migration/dummyusersession.php new file mode 100644 index 00000000000..9ffbfd6309f --- /dev/null +++ b/apps/files_external/migration/dummyusersession.php @@ -0,0 +1,51 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_external\Migration; + +use OCP\IUser; +use OCP\IUserSession; + +class DummyUserSession implements IUserSession { + + /** + * @var IUser + */ + private $user; + + public function login($user, $password) { + } + + public function logout() { + } + + public function setUser($user) { + $this->user = $user; + } + + public function getUser() { + return $this->user; + } + + public function isLoggedIn() { + return !is_null($this->user); + } +} diff --git a/apps/files_external/migration/storagemigrator.php b/apps/files_external/migration/storagemigrator.php index c8e323121ea..b469205ac55 100644 --- a/apps/files_external/migration/storagemigrator.php +++ b/apps/files_external/migration/storagemigrator.php @@ -32,6 +32,7 @@ use OCA\Files_external\Service\UserStoragesService; use OCP\IConfig; use OCP\IDBConnection; use OCP\ILogger; +use OCP\IUser; use OCP\IUserSession; /** @@ -49,11 +50,6 @@ class StorageMigrator { private $dbConfig; /** - * @var IUserSession - */ - private $userSession; - - /** * @var IConfig */ private $config; @@ -73,7 +69,6 @@ class StorageMigrator { * * @param BackendService $backendService * @param DBConfigService $dbConfig - * @param IUserSession $userSession * @param IConfig $config * @param IDBConnection $connection * @param ILogger $logger @@ -81,14 +76,12 @@ class StorageMigrator { public function __construct( BackendService $backendService, DBConfigService $dbConfig, - IUserSession $userSession, IConfig $config, IDBConnection $connection, ILogger $logger ) { $this->backendService = $backendService; $this->dbConfig = $dbConfig; - $this->userSession = $userSession; $this->config = $config; $this->connection = $connection; $this->logger = $logger; @@ -121,14 +114,18 @@ class StorageMigrator { /** * Migrate personal storages configured by the current user + * + * @param IUser $user */ - public function migrateUser() { - $userId = $this->userSession->getUser()->getUID(); + public function migrateUser(IUser $user) { + $dummySession = new DummyUserSession(); + $dummySession->setUser($user); + $userId = $user->getUID(); $userVersion = $this->config->getUserValue($userId, 'files_external', 'config_version', '0.0.0'); if (version_compare($userVersion, '0.5.0', '<')) { $this->config->setUserValue($userId, 'files_external', 'config_version', '0.5.0'); - $legacyService = new UserLegacyStoragesService($this->backendService, $this->userSession); - $storageService = new UserStoragesService($this->backendService, $this->dbConfig, $this->userSession); + $legacyService = new UserLegacyStoragesService($this->backendService, $dummySession); + $storageService = new UserStoragesService($this->backendService, $this->dbConfig, $dummySession); $this->migrate($legacyService, $storageService); } diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php index 9be6498435c..97f79c13324 100644 --- a/apps/files_external/service/storagesservice.php +++ b/apps/files_external/service/storagesservice.php @@ -185,6 +185,9 @@ abstract class StoragesService { */ abstract public function getVisibilityType(); + /** + * @return integer + */ protected function getType() { return DBConfigService::MOUNT_TYPE_ADMIN; } diff --git a/apps/files_external/service/userglobalstoragesservice.php b/apps/files_external/service/userglobalstoragesservice.php index cb49f0f6726..e58815f8a79 100644 --- a/apps/files_external/service/userglobalstoragesservice.php +++ b/apps/files_external/service/userglobalstoragesservice.php @@ -89,6 +89,9 @@ class UserGlobalStoragesService extends GlobalStoragesService { throw new \DomainException('UserGlobalStoragesService writing disallowed'); } + /** + * @param integer $id + */ public function removeStorage($id) { throw new \DomainException('UserGlobalStoragesService writing disallowed'); } diff --git a/apps/files_external/tests/env/entrypoint.sh b/apps/files_external/tests/env/entrypoint.sh new file mode 100755 index 00000000000..6dd6ef23fb6 --- /dev/null +++ b/apps/files_external/tests/env/entrypoint.sh @@ -0,0 +1,274 @@ +#!/bin/bash +set -e + +: ${CLUSTER:=ceph} +: ${RGW_NAME:=$(hostname -s)} +: ${MON_NAME:=$(hostname -s)} +: ${RGW_CIVETWEB_PORT:=80} +: ${OSD_SIZE:=100} + +: ${KEYSTONE_ADMIN_TOKEN:=admin} +: ${KEYSTONE_ADMIN_PORT:=35357} +: ${KEYSTONE_PUBLIC_PORT:=5001} + +: ${KEYSTONE_SERVICE:=${CLUSTER}} +: ${KEYSTONE_ENDPOINT_REGION:=region} + +: ${KEYSTONE_ADMIN_USER:=admin} +: ${KEYSTONE_ADMIN_TENANT:=admin} +: ${KEYSTONE_ADMIN_PASS:=admin} + +ip_address=$(head -n1 /etc/hosts | cut -d" " -f1) +: ${MON_IP:=${ip_address}} +subnet=$(ip route | grep "src ${ip_address}" | cut -d" " -f1) +: ${CEPH_NETWORK:=${subnet}} + +####### +# MON # +####### + +if [ ! -n "$CEPH_NETWORK" ]; then + echo "ERROR- CEPH_NETWORK must be defined as the name of the network for the OSDs" + exit 1 +fi + +if [ ! -n "$MON_IP" ]; then + echo "ERROR- MON_IP must be defined as the IP address of the monitor" + exit 1 +fi + +# bootstrap MON +if [ ! -e /etc/ceph/ceph.conf ]; then + fsid=$(uuidgen) + cat <<ENDHERE >/etc/ceph/${CLUSTER}.conf +[global] +fsid = $fsid +mon initial members = ${MON_NAME} +mon host = ${MON_IP} +auth cluster required = cephx +auth service required = cephx +auth client required = cephx +osd crush chooseleaf type = 0 +osd journal size = 100 +osd pool default pg num = 8 +osd pool default pgp num = 8 +osd pool default size = 1 +public network = ${CEPH_NETWORK} +cluster network = ${CEPH_NETWORK} +debug ms = 1 + +[mon] +debug mon = 20 +debug paxos = 20 +debug auth = 20 + +[osd] +debug osd = 20 +debug filestore = 20 +debug journal = 20 +debug monc = 20 + +[mds] +debug mds = 20 +debug mds balancer = 20 +debug mds log = 20 +debug mds migrator = 20 + +[client.radosgw.gateway] +rgw keystone url = http://${MON_IP}:${KEYSTONE_ADMIN_PORT} +rgw keystone admin token = ${KEYSTONE_ADMIN_TOKEN} +rgw keystone accepted roles = _member_ +ENDHERE + + # Generate administrator key + ceph-authtool /etc/ceph/${CLUSTER}.client.admin.keyring --create-keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow' + + # Generate the mon. key + ceph-authtool /etc/ceph/${CLUSTER}.mon.keyring --create-keyring --gen-key -n mon. --cap mon 'allow *' + + # Generate initial monitor map + monmaptool --create --add ${MON_NAME} ${MON_IP} --fsid ${fsid} /etc/ceph/monmap +fi + +# If we don't have a monitor keyring, this is a new monitor +if [ ! -e /var/lib/ceph/mon/${CLUSTER}-${MON_NAME}/keyring ]; then + + if [ ! -e /etc/ceph/${CLUSTER}.client.admin.keyring ]; then + echo "ERROR- /etc/ceph/${CLUSTER}.client.admin.keyring must exist; get it from your existing mon" + exit 2 + fi + + if [ ! -e /etc/ceph/${CLUSTER}.mon.keyring ]; then + echo "ERROR- /etc/ceph/${CLUSTER}.mon.keyring must exist. You can extract it from your current monitor by running 'ceph auth get mon. -o /tmp/${CLUSTER}.mon.keyring'" + exit 3 + fi + + if [ ! -e /etc/ceph/monmap ]; then + echo "ERROR- /etc/ceph/monmap must exist. You can extract it from your current monitor by running 'ceph mon getmap -o /tmp/monmap'" + exit 4 + fi + + # Import the client.admin keyring and the monitor keyring into a new, temporary one + ceph-authtool /tmp/${CLUSTER}.mon.keyring --create-keyring --import-keyring /etc/ceph/${CLUSTER}.client.admin.keyring + ceph-authtool /tmp/${CLUSTER}.mon.keyring --import-keyring /etc/ceph/${CLUSTER}.mon.keyring + + # Make the monitor directory + mkdir -p /var/lib/ceph/mon/${CLUSTER}-${MON_NAME} + + # Prepare the monitor daemon's directory with the map and keyring + ceph-mon --mkfs -i ${MON_NAME} --monmap /etc/ceph/monmap --keyring /tmp/${CLUSTER}.mon.keyring + + # Clean up the temporary key + rm /tmp/${CLUSTER}.mon.keyring +fi + +# start MON +ceph-mon -i ${MON_NAME} --public-addr ${MON_IP}:6789 + +# change replica size +ceph osd pool set rbd size 1 + + +####### +# OSD # +####### + +if [ ! -e /var/lib/ceph/osd/${CLUSTER}-0/keyring ]; then + # bootstrap OSD + mkdir -p /var/lib/ceph/osd/${CLUSTER}-0 + # skip btrfs HACK if btrfs is already in place + if [ "$(stat -f /var/lib/ceph/osd/${CLUSTER}-0 2>/dev/null | grep btrfs | wc -l)" == "0" ]; then + # HACK create btrfs loopback device + echo "creating osd storage image" + dd if=/dev/zero of=/tmp/osddata bs=1M count=${OSD_SIZE} + mkfs.btrfs /tmp/osddata + echo "mounting via loopback" + mount -o loop /tmp/osddata /var/lib/ceph/osd/${CLUSTER}-0 + echo "now mounted:" + mount + # end HACK + fi + echo "creating osd" + ceph osd create + echo "creating osd filesystem" + ceph-osd -i 0 --mkfs + echo "creating osd keyring" + ceph auth get-or-create osd.0 osd 'allow *' mon 'allow profile osd' -o /var/lib/ceph/osd/${CLUSTER}-0/keyring + echo "configuring osd crush" + ceph osd crush add 0 1 root=default host=$(hostname -s) + echo "adding osd keyring" + ceph-osd -i 0 -k /var/lib/ceph/osd/${CLUSTER}-0/keyring +fi + +# start OSD +echo "starting osd" +ceph-osd --cluster=${CLUSTER} -i 0 + +#sleep 10 + +####### +# MDS # +####### + +if [ ! -e /var/lib/ceph/mds/${CLUSTER}-0/keyring ]; then + # create ceph filesystem + echo "creating osd pool" + ceph osd pool create cephfs_data 8 + echo "creating osd pool metadata" + ceph osd pool create cephfs_metadata 8 + echo "creating cephfs" + ceph fs new cephfs cephfs_metadata cephfs_data + + # bootstrap MDS + mkdir -p /var/lib/ceph/mds/${CLUSTER}-0 + echo "creating mds auth" + ceph auth get-or-create mds.0 mds 'allow' osd 'allow *' mon 'allow profile mds' > /var/lib/ceph/mds/${CLUSTER}-0/keyring +fi + +# start MDS +echo "starting mds" +ceph-mds --cluster=${CLUSTER} -i 0 + +#sleep 10 + + +####### +# RGW # +####### + +if [ ! -e /var/lib/ceph/radosgw/${RGW_NAME}/keyring ]; then + # bootstrap RGW + mkdir -p /var/lib/ceph/radosgw/${RGW_NAME} + echo "creating rgw auth" + ceph auth get-or-create client.radosgw.gateway osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/${RGW_NAME}/keyring +fi + +# start RGW +echo "starting rgw" +radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway -k /var/lib/ceph/radosgw/${RGW_NAME}/keyring --rgw-socket-path="" --rgw-frontends="civetweb port=${RGW_CIVETWEB_PORT}" + + +####### +# API # +####### + +# start ceph-rest-api +echo "starting rest api" +ceph-rest-api -n client.admin & + +############ +# Keystone # +############ + +if [ ! -e /etc/keystone/${CLUSTER}.conf ]; then + cat <<ENDHERE > /etc/keystone/${CLUSTER}.conf +[DEFAULT] +admin_token=${KEYSTONE_ADMIN_TOKEN} +admin_port=${KEYSTONE_ADMIN_PORT} +public_port=${KEYSTONE_PUBLIC_PORT} + +[database] +connection = sqlite:////var/lib/keystone/keystone.db +ENDHERE + + # start Keystone + echo "starting keystone" + keystone-all --config-file /etc/keystone/${CLUSTER}.conf & + + # wait until up + while ! nc ${MON_IP} ${KEYSTONE_ADMIN_PORT} </dev/null; do + sleep 1 + done + + export OS_SERVICE_TOKEN=${KEYSTONE_ADMIN_TOKEN} + export OS_SERVICE_ENDPOINT=http://${MON_IP}:${KEYSTONE_ADMIN_PORT}/v2.0 + + echo "creating keystone service ${KEYSTONE_SERVICE}" + keystone service-create --name ${KEYSTONE_SERVICE} --type object-store + echo "creating keystone endpoint ${KEYSTONE_SERVICE}" + keystone endpoint-create --service ${KEYSTONE_SERVICE} \ + --region ${KEYSTONE_ENDPOINT_REGION} \ + --publicurl http://${MON_IP}:${RGW_CIVETWEB_PORT}/swift/v1 \ + --internalurl http://${MON_IP}:${RGW_CIVETWEB_PORT}/swift/v1 \ + --adminurl http://${MON_IP}:${RGW_CIVETWEB_PORT}/swift/v1 + + echo "creating keystone user ${KEYSTONE_ADMIN_USER}" + keystone user-create --name=${KEYSTONE_ADMIN_USER} --pass=${KEYSTONE_ADMIN_PASS} --email=dev@null.com + echo "creating keystone tenant ${KEYSTONE_ADMIN_TENANT}" + keystone tenant-create --name=${KEYSTONE_ADMIN_TENANT} --description=admin + echo "adding keystone role _member_" + keystone user-role-add --user=${KEYSTONE_ADMIN_USER} --tenant=${KEYSTONE_ADMIN_TENANT} --role=_member_ + + echo "creating keystone role admin" + keystone role-create --name=admin + echo "adding keystone role admin" + keystone user-role-add --user=${KEYSTONE_ADMIN_USER} --tenant=${KEYSTONE_ADMIN_TENANT} --role=admin +fi + + +######### +# WATCH # +######### + +echo "watching ceph" +exec ceph -w diff --git a/apps/files_external/tests/env/start-smb-windows.sh b/apps/files_external/tests/env/start-smb-windows.sh index 9453b4eb3e7..a23c879dd96 100755 --- a/apps/files_external/tests/env/start-smb-windows.sh +++ b/apps/files_external/tests/env/start-smb-windows.sh @@ -19,7 +19,7 @@ user=smb-test password=!owncloud123 host=WIN-9GTFAS08C15 -if ! "$thisFolder"/env/wait-for-connection ${host} 445 0; then +if ! "$thisFolder"/env/wait-for-connection ${host} 445; then echo "[ERROR] Server not reachable" >&2 exit 1 fi diff --git a/apps/files_external/tests/env/start-swift-ceph.sh b/apps/files_external/tests/env/start-swift-ceph.sh index 936bb667e94..f3707aa39f6 100755 --- a/apps/files_external/tests/env/start-swift-ceph.sh +++ b/apps/files_external/tests/env/start-swift-ceph.sh @@ -25,7 +25,7 @@ echo "Fetch recent ${docker_image} docker image" docker pull ${docker_image} # retrieve current folder to place the config in the parent folder -thisFolder=`echo $0 | replace "env/start-swift-ceph.sh" ""` +thisFolder=`echo $0 | sed 's#env/start-swift-ceph\.sh##'` if [ -z "$thisFolder" ]; then thisFolder="." @@ -38,6 +38,7 @@ pass=testing tenant=testenant region=testregion service=testceph +endpointFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" container=`docker run -d \ -e KEYSTONE_PUBLIC_PORT=${port} \ @@ -46,7 +47,10 @@ container=`docker run -d \ -e KEYSTONE_ADMIN_TENANT=${tenant} \ -e KEYSTONE_ENDPOINT_REGION=${region} \ -e KEYSTONE_SERVICE=${service} \ - ${docker_image}` + -e OSD_SIZE=300 \ + -v ${endpointFolder}/entrypoint.sh:/entrypoint.sh \ + --privileged \ + --entrypoint /entrypoint.sh ${docker_image}` host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container` @@ -57,8 +61,9 @@ echo "${docker_image} container: $container" echo $container >> $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift echo -n "Waiting for ceph initialization" -if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then - echo "[ERROR] Waited 60 seconds, no response" >&2 +if ! "$thisFolder"/env/wait-for-connection ${host} 80 600; then + echo "[ERROR] Waited 600 seconds, no response" >&2 + docker logs $container exit 1 fi sleep 1 diff --git a/apps/files_external/tests/personalmounttest.php b/apps/files_external/tests/personalmounttest.php new file mode 100644 index 00000000000..b56d69aa9be --- /dev/null +++ b/apps/files_external/tests/personalmounttest.php @@ -0,0 +1,50 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_external\Tests; + +use OC\Files\Mount\Manager; +use OCA\Files_External\Lib\PersonalMount; +use Test\TestCase; + +class PersonalMountTest extends TestCase { + public function testFindByStorageId() { + /** @var \OCA\Files_External\Service\UserStoragesService $storageService */ + $storageService = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') + ->disableOriginalConstructor() + ->getMock(); + + $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') + ->disableOriginalConstructor() + ->getMock(); + + $storage->expects($this->any()) + ->method('getId') + ->will($this->returnValue('dummy')); + + $mount = new PersonalMount($storageService, 10, $storage, '/foo'); + + $mountManager = new Manager(); + $mountManager->addMount($mount); + + $this->assertEquals([$mount], $mountManager->findByStorageId('dummy')); + } +} diff --git a/apps/files_external/tests/service/globalstoragesservicetest.php b/apps/files_external/tests/service/globalstoragesservicetest.php index 7c77616563c..e620b05a51e 100644 --- a/apps/files_external/tests/service/globalstoragesservicetest.php +++ b/apps/files_external/tests/service/globalstoragesservicetest.php @@ -23,7 +23,6 @@ namespace OCA\Files_external\Tests\Service; use \OC\Files\Filesystem; -use OCA\Files_External\Service\DBConfigService; use \OCA\Files_external\Service\GlobalStoragesService; use \OCA\Files_external\NotFoundException; use \OCA\Files_external\Lib\StorageConfig; |