diff options
Diffstat (limited to 'apps/files_external')
50 files changed, 125 insertions, 130 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index ccb1e858fa0..26df203091e 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -23,6 +23,10 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = ' <label for="mountOptionsPreviews">{{t "files_external" "Enable previews"}}</label>' + ' </div>' + ' <div class="optionRow">' + + ' <input id="mountOptionsSharing" name="enable_sharing" type="checkbox" value="true" checked="checked"/>' + + ' <label for="mountOptionsSharing">{{t "files_external" "Enable sharing"}}</label>' + + ' </div>' + + ' <div class="optionRow">' + ' <label for="mountOptionsFilesystemCheck">{{t "files_external" "Check for changes"}}</label>' + ' <select id="mountOptionsFilesystemCheck" name="filesystem_check_changes" data-type="int">' + ' <option value="0">{{t "files_external" "Never"}}</option>' + @@ -35,6 +39,7 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = templates therefore they are duplicated here t("files_external", "Enable encryption") t("files_external", "Enable previews") + t("files_external", "Enable sharing") t("files_external", "Check for changes") t("files_external", "Never") t("files_external", "Once every direct access") @@ -582,6 +587,19 @@ MountOptionsDropdown.prototype = { var MountConfigListView = function($el, options) { this.initialize($el, options); }; + +MountConfigListView.ParameterFlags = { + OPTIONAL: 1, + USER_PROVIDED: 2 +}; + +MountConfigListView.ParameterTypes = { + TEXT: 0, + BOOLEAN: 1, + PASSWORD: 2, + HIDDEN: 3 +}; + /** * @memberOf OCA.External.Settings */ @@ -870,6 +888,7 @@ MountConfigListView.prototype = _.extend({ $tr.find('input.mountOptions').val(JSON.stringify({ 'encrypt': true, 'previews': true, + 'enable_sharing': true, 'filesystem_check_changes': 1 })); } @@ -955,16 +974,15 @@ MountConfigListView.prototype = _.extend({ */ writeParameterInput: function($td, parameter, placeholder, classes) { var hasFlag = function(flag) { - return placeholder.indexOf(flag) !== -1; + return (placeholder.flags & flag) === flag; }; classes = $.isArray(classes) ? classes : []; classes.push('added'); - if (placeholder.indexOf('&') === 0) { + if (hasFlag(MountConfigListView.ParameterFlags.OPTIONAL)) { classes.push('optional'); - placeholder = placeholder.substring(1); } - if (hasFlag('@')) { + if (hasFlag(MountConfigListView.ParameterFlags.USER_PROVIDED)) { if (this._isPersonal) { classes.push('user_provided'); } else { @@ -974,17 +992,13 @@ MountConfigListView.prototype = _.extend({ var newElement; - var trimmedPlaceholder = placeholder; - var flags = ['@', '*', '!', '#', '&']; // used to determine what kind of parameter - while(flags.indexOf(trimmedPlaceholder[0]) !== -1) { - trimmedPlaceholder = trimmedPlaceholder.substr(1); - } - if (hasFlag('*')) { + var trimmedPlaceholder = placeholder.value; + if (placeholder.type === MountConfigListView.ParameterTypes.PASSWORD) { newElement = $('<input type="password" class="'+classes.join(' ')+'" data-parameter="'+parameter+'" placeholder="'+ trimmedPlaceholder+'" />'); - } else if (hasFlag('!')) { + } else if (placeholder.type === MountConfigListView.ParameterTypes.BOOLEAN) { var checkboxId = _.uniqueId('checkbox_'); newElement = $('<input type="checkbox" id="'+checkboxId+'" class="'+classes.join(' ')+'" data-parameter="'+parameter+'" /><label for="'+checkboxId+'">'+ trimmedPlaceholder+'</label>'); - } else if (hasFlag('#')) { + } else if (placeholder.type === MountConfigListView.ParameterTypes.HIDDEN) { newElement = $('<input type="hidden" class="'+classes.join(' ')+'" data-parameter="'+parameter+'" />'); } else { newElement = $('<input type="text" class="'+classes.join(' ')+'" data-parameter="'+parameter+'" placeholder="'+ trimmedPlaceholder+'" />'); @@ -1245,7 +1259,7 @@ MountConfigListView.prototype = _.extend({ var storage = this.getStorageConfig($tr); var $toggle = $tr.find('.mountOptionsToggle'); var dropDown = new MountOptionsDropdown(); - var enabledOptions = ['previews', 'filesystem_check_changes']; + var enabledOptions = ['previews', 'filesystem_check_changes', 'enable_sharing']; if (this._encryptionEnabled) { enabledOptions.push('encrypt'); } diff --git a/apps/files_external/l10n/cs_CZ.js b/apps/files_external/l10n/cs_CZ.js index 5ac3b82d67f..56a8147fd99 100644 --- a/apps/files_external/l10n/cs_CZ.js +++ b/apps/files_external/l10n/cs_CZ.js @@ -61,10 +61,7 @@ OC.L10N.register( "Identity endpoint URL" : "Identifikační koncový bod URL", "Rackspace" : "Rackspace", "API key" : "Klíč API", - "Login credentials" : "Přihlašovací údaje", "Username and password" : "Uživatelské jméno a heslo", - "Session credentials" : "Přihlašovací údaje sezení", - "User provided" : "Poskytnuto uživatelem", "RSA public key" : "RSA veřejný klíč", "Public key" : "Veřejný klíč", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/cs_CZ.json b/apps/files_external/l10n/cs_CZ.json index a21b78f02c7..f22bbc25e35 100644 --- a/apps/files_external/l10n/cs_CZ.json +++ b/apps/files_external/l10n/cs_CZ.json @@ -59,10 +59,7 @@ "Identity endpoint URL" : "Identifikační koncový bod URL", "Rackspace" : "Rackspace", "API key" : "Klíč API", - "Login credentials" : "Přihlašovací údaje", "Username and password" : "Uživatelské jméno a heslo", - "Session credentials" : "Přihlašovací údaje sezení", - "User provided" : "Poskytnuto uživatelem", "RSA public key" : "RSA veřejný klíč", "Public key" : "Veřejný klíč", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/da.js b/apps/files_external/l10n/da.js index 6b6db06d817..70f43819496 100644 --- a/apps/files_external/l10n/da.js +++ b/apps/files_external/l10n/da.js @@ -50,7 +50,6 @@ OC.L10N.register( "Rackspace" : "Hyldeplads", "API key" : "API nøgle", "Username and password" : "Brugernavn og kodeord", - "Session credentials" : "Brugeroplysninger for session", "RSA public key" : "RSA offentlig nøgle", "Public key" : "Offentlig nøgle", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/da.json b/apps/files_external/l10n/da.json index 61b1bab2d55..aaeaaa58ae0 100644 --- a/apps/files_external/l10n/da.json +++ b/apps/files_external/l10n/da.json @@ -48,7 +48,6 @@ "Rackspace" : "Hyldeplads", "API key" : "API nøgle", "Username and password" : "Brugernavn og kodeord", - "Session credentials" : "Brugeroplysninger for session", "RSA public key" : "RSA offentlig nøgle", "Public key" : "Offentlig nøgle", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/el.js b/apps/files_external/l10n/el.js index bae61dee741..c04d3d015d3 100644 --- a/apps/files_external/l10n/el.js +++ b/apps/files_external/l10n/el.js @@ -52,7 +52,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "Κλειδί Google API", "Username and password" : "Όνομα χρήστη και κωδικός πρόσβασης", - "Session credentials" : "Διαπιστευτήρια συνεδρίας", "RSA public key" : "Δημόσιο κλειδί RSA", "Public key" : "Δημόσιο κλειδί", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/el.json b/apps/files_external/l10n/el.json index e85059d88ba..98a6d18bfc3 100644 --- a/apps/files_external/l10n/el.json +++ b/apps/files_external/l10n/el.json @@ -50,7 +50,6 @@ "Rackspace" : "Rackspace", "API key" : "Κλειδί Google API", "Username and password" : "Όνομα χρήστη και κωδικός πρόσβασης", - "Session credentials" : "Διαπιστευτήρια συνεδρίας", "RSA public key" : "Δημόσιο κλειδί RSA", "Public key" : "Δημόσιο κλειδί", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js index 6db3afd6441..8a49dd4ec05 100644 --- a/apps/files_external/l10n/es.js +++ b/apps/files_external/l10n/es.js @@ -61,7 +61,6 @@ OC.L10N.register( "Rackspace" : "Espacio de Rack", "API key" : "Clave API", "Username and password" : "Nombre de usuario y contraseña", - "Session credentials" : "Credenciales de la sesión", "RSA public key" : "Clave pública RSA", "Public key" : "Clave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json index e9a3e317679..c3b81338776 100644 --- a/apps/files_external/l10n/es.json +++ b/apps/files_external/l10n/es.json @@ -59,7 +59,6 @@ "Rackspace" : "Espacio de Rack", "API key" : "Clave API", "Username and password" : "Nombre de usuario y contraseña", - "Session credentials" : "Credenciales de la sesión", "RSA public key" : "Clave pública RSA", "Public key" : "Clave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/fi_FI.js b/apps/files_external/l10n/fi_FI.js index 23b9227348c..ec969586d6d 100644 --- a/apps/files_external/l10n/fi_FI.js +++ b/apps/files_external/l10n/fi_FI.js @@ -45,9 +45,10 @@ OC.L10N.register( "Password" : "Salasana", "Rackspace" : "Rackspace", "API key" : "API-avain", - "Login credentials" : "Kirjautumistiedot", + "Log-in credentials, save in database" : "Kirjautumistiedot, tallenna tietokantaan", "Username and password" : "Käyttäjätunnus ja salasana", - "Session credentials" : "Istunnon tunnistetiedot", + "Log-in credentials, save in session" : "Kirjautumistiedot, tallenna istuntoon", + "User entered, store in database" : "Käyttäjän määrittämä, tallenna tietokantaan", "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 2c778205e10..8c39acff034 100644 --- a/apps/files_external/l10n/fi_FI.json +++ b/apps/files_external/l10n/fi_FI.json @@ -43,9 +43,10 @@ "Password" : "Salasana", "Rackspace" : "Rackspace", "API key" : "API-avain", - "Login credentials" : "Kirjautumistiedot", + "Log-in credentials, save in database" : "Kirjautumistiedot, tallenna tietokantaan", "Username and password" : "Käyttäjätunnus ja salasana", - "Session credentials" : "Istunnon tunnistetiedot", + "Log-in credentials, save in session" : "Kirjautumistiedot, tallenna istuntoon", + "User entered, store in database" : "Käyttäjän määrittämä, tallenna tietokantaan", "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 0c2bb063b29..cc1c1bc693c 100644 --- a/apps/files_external/l10n/fr.js +++ b/apps/files_external/l10n/fr.js @@ -18,6 +18,7 @@ OC.L10N.register( "Unsatisfied authentication mechanism parameters" : "Paramètres manquants pour la méthode d'authentification", "Insufficient data: %s" : "Données insuffisantes : %s", "%s" : "%s", + "Storage with id \"%i\" is not user editable" : "Le support de stockage d'id \"%i\" n'est pas modifiable par les utilisateurs", "Personal" : "Personnel", "System" : "Système", "Grant access" : "Autoriser l'accès", @@ -60,9 +61,7 @@ OC.L10N.register( "Identity endpoint URL" : "Identity endpoint URL", "Rackspace" : "Rackspace", "API key" : "Clé API", - "Login credentials" : "Informations d'identification", "Username and password" : "Nom d'utilisateur et mot de passe", - "Session credentials" : "Informations d'identification de session", "RSA public key" : "Clé publique RSA", "Public key" : "Clef publique", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json index 6f2fb0615bd..47a70fcd12a 100644 --- a/apps/files_external/l10n/fr.json +++ b/apps/files_external/l10n/fr.json @@ -16,6 +16,7 @@ "Unsatisfied authentication mechanism parameters" : "Paramètres manquants pour la méthode d'authentification", "Insufficient data: %s" : "Données insuffisantes : %s", "%s" : "%s", + "Storage with id \"%i\" is not user editable" : "Le support de stockage d'id \"%i\" n'est pas modifiable par les utilisateurs", "Personal" : "Personnel", "System" : "Système", "Grant access" : "Autoriser l'accès", @@ -58,9 +59,7 @@ "Identity endpoint URL" : "Identity endpoint URL", "Rackspace" : "Rackspace", "API key" : "Clé API", - "Login credentials" : "Informations d'identification", "Username and password" : "Nom d'utilisateur et mot de passe", - "Session credentials" : "Informations d'identification de session", "RSA public key" : "Clé publique RSA", "Public key" : "Clef publique", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/he.js b/apps/files_external/l10n/he.js index 83ff5a524d0..d963d796428 100644 --- a/apps/files_external/l10n/he.js +++ b/apps/files_external/l10n/he.js @@ -61,10 +61,10 @@ OC.L10N.register( "Identity endpoint URL" : "זהות נתיב נקודת קצה", "Rackspace" : "חץ אחורה", "API key" : "מפתח API", - "Login credentials" : "פרטי הכניסה", + "Log-in credentials, save in database" : "אישורי התחברות, נשמרים במסד הנתונים", "Username and password" : "שם משתמש וסיסמא", - "Session credentials" : "אישורי סשן", - "User provided" : "סופק על ידי משתמש", + "Log-in credentials, save in session" : "אישורי התחברות, נשמרים במידע שיחה - סשן", + "User entered, store in database" : "משתמש התחבר, נשמר במסד הנתונים", "RSA public key" : "מפתח ציבורי RSA", "Public key" : "מפתח ציבורי", "Amazon S3" : "אמזון S3", diff --git a/apps/files_external/l10n/he.json b/apps/files_external/l10n/he.json index 71e07d5f6af..fbdcc287495 100644 --- a/apps/files_external/l10n/he.json +++ b/apps/files_external/l10n/he.json @@ -59,10 +59,10 @@ "Identity endpoint URL" : "זהות נתיב נקודת קצה", "Rackspace" : "חץ אחורה", "API key" : "מפתח API", - "Login credentials" : "פרטי הכניסה", + "Log-in credentials, save in database" : "אישורי התחברות, נשמרים במסד הנתונים", "Username and password" : "שם משתמש וסיסמא", - "Session credentials" : "אישורי סשן", - "User provided" : "סופק על ידי משתמש", + "Log-in credentials, save in session" : "אישורי התחברות, נשמרים במידע שיחה - סשן", + "User entered, store in database" : "משתמש התחבר, נשמר במסד הנתונים", "RSA public key" : "מפתח ציבורי RSA", "Public key" : "מפתח ציבורי", "Amazon S3" : "אמזון S3", diff --git a/apps/files_external/l10n/id.js b/apps/files_external/l10n/id.js index d782e285cc8..15f33571ee6 100644 --- a/apps/files_external/l10n/id.js +++ b/apps/files_external/l10n/id.js @@ -50,7 +50,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "Kunci API", "Username and password" : "Nama pengguna dan sandi", - "Session credentials" : "Kredensial sesi", "RSA public key" : "Kunci publik RSA", "Public key" : "Kunci Public", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/id.json b/apps/files_external/l10n/id.json index ae39765674b..00f78599006 100644 --- a/apps/files_external/l10n/id.json +++ b/apps/files_external/l10n/id.json @@ -48,7 +48,6 @@ "Rackspace" : "Rackspace", "API key" : "Kunci API", "Username and password" : "Nama pengguna dan sandi", - "Session credentials" : "Kredensial sesi", "RSA public key" : "Kunci publik RSA", "Public key" : "Kunci Public", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/it.js b/apps/files_external/l10n/it.js index c27a92d76f4..d9adaad833b 100644 --- a/apps/files_external/l10n/it.js +++ b/apps/files_external/l10n/it.js @@ -61,10 +61,10 @@ OC.L10N.register( "Identity endpoint URL" : "URL endpoint delle identità", "Rackspace" : "Rackspace", "API key" : "Chiave API", - "Login credentials" : "Credenziali di accesso", + "Log-in credentials, save in database" : "Credenziali di accesso, salva nel database", "Username and password" : "Nome utente e password", - "Session credentials" : "Credenziali di sessione", - "User provided" : "Fornita dall'utente", + "Log-in credentials, save in session" : "Credenziali di accesso, salva nella sessione", + "User entered, store in database" : "Digitate dall'utente, memorizza nel database", "RSA public key" : "Chiave pubblica RSA", "Public key" : "Chiave pubblica", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/it.json b/apps/files_external/l10n/it.json index cf7775f1d0e..b228cd76604 100644 --- a/apps/files_external/l10n/it.json +++ b/apps/files_external/l10n/it.json @@ -59,10 +59,10 @@ "Identity endpoint URL" : "URL endpoint delle identità", "Rackspace" : "Rackspace", "API key" : "Chiave API", - "Login credentials" : "Credenziali di accesso", + "Log-in credentials, save in database" : "Credenziali di accesso, salva nel database", "Username and password" : "Nome utente e password", - "Session credentials" : "Credenziali di sessione", - "User provided" : "Fornita dall'utente", + "Log-in credentials, save in session" : "Credenziali di accesso, salva nella sessione", + "User entered, store in database" : "Digitate dall'utente, memorizza nel database", "RSA public key" : "Chiave pubblica RSA", "Public key" : "Chiave pubblica", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ja.js b/apps/files_external/l10n/ja.js index fafe03c4fa0..f14c07808ca 100644 --- a/apps/files_external/l10n/ja.js +++ b/apps/files_external/l10n/ja.js @@ -61,9 +61,7 @@ OC.L10N.register( "Identity endpoint URL" : "認証エンドポイントURL", "Rackspace" : "Rackspace", "API key" : "APIキー", - "Login credentials" : "ログイン資格情報", "Username and password" : "ユーザー名とパスワード", - "Session credentials" : "セッション資格情報", "RSA public key" : "RSA公開鍵", "Public key" : "公開鍵", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ja.json b/apps/files_external/l10n/ja.json index 0d1f1729dae..df6f7f44618 100644 --- a/apps/files_external/l10n/ja.json +++ b/apps/files_external/l10n/ja.json @@ -59,9 +59,7 @@ "Identity endpoint URL" : "認証エンドポイントURL", "Rackspace" : "Rackspace", "API key" : "APIキー", - "Login credentials" : "ログイン資格情報", "Username and password" : "ユーザー名とパスワード", - "Session credentials" : "セッション資格情報", "RSA public key" : "RSA公開鍵", "Public key" : "公開鍵", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ko.js b/apps/files_external/l10n/ko.js index 6c569639cab..df30d86ca13 100644 --- a/apps/files_external/l10n/ko.js +++ b/apps/files_external/l10n/ko.js @@ -51,7 +51,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "API 키", "Username and password" : "사용자 이름과 암호", - "Session credentials" : "세션 접근 정보", "RSA public key" : "RSA 공개 키", "Public key" : "공개 키", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ko.json b/apps/files_external/l10n/ko.json index 4b64b7433ac..a5f4b4946ca 100644 --- a/apps/files_external/l10n/ko.json +++ b/apps/files_external/l10n/ko.json @@ -49,7 +49,6 @@ "Rackspace" : "Rackspace", "API key" : "API 키", "Username and password" : "사용자 이름과 암호", - "Session credentials" : "세션 접근 정보", "RSA public key" : "RSA 공개 키", "Public key" : "공개 키", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nb_NO.js b/apps/files_external/l10n/nb_NO.js index cf8e7813d20..fc791fe60ab 100644 --- a/apps/files_external/l10n/nb_NO.js +++ b/apps/files_external/l10n/nb_NO.js @@ -61,7 +61,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "API-nøkkel", "Username and password" : "Brukernavn og passord", - "Session credentials" : "Påloggingsdetaljer for økt", "RSA public key" : "RSA offentlig nøkkel", "Public key" : "Offentlig nøkkel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nb_NO.json b/apps/files_external/l10n/nb_NO.json index eaad9c7461d..0e956952948 100644 --- a/apps/files_external/l10n/nb_NO.json +++ b/apps/files_external/l10n/nb_NO.json @@ -59,7 +59,6 @@ "Rackspace" : "Rackspace", "API key" : "API-nøkkel", "Username and password" : "Brukernavn og passord", - "Session credentials" : "Påloggingsdetaljer for økt", "RSA public key" : "RSA offentlig nøkkel", "Public key" : "Offentlig nøkkel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nds.js b/apps/files_external/l10n/nds.js index 73df3c8483d..b4649fe681a 100644 --- a/apps/files_external/l10n/nds.js +++ b/apps/files_external/l10n/nds.js @@ -47,7 +47,6 @@ OC.L10N.register( "Password" : "Passwort", "API key" : "API Schlüssel", "Username and password" : "Benutzername und Passwort", - "Session credentials" : "Anmeldedaten der Sitzung", "RSA public key" : "Öffentlicher RSA Schlüssel", "Public key" : "Öffentlicher Schlüssel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nds.json b/apps/files_external/l10n/nds.json index 57cbefff91b..75e36016384 100644 --- a/apps/files_external/l10n/nds.json +++ b/apps/files_external/l10n/nds.json @@ -45,7 +45,6 @@ "Password" : "Passwort", "API key" : "API Schlüssel", "Username and password" : "Benutzername und Passwort", - "Session credentials" : "Anmeldedaten der Sitzung", "RSA public key" : "Öffentlicher RSA Schlüssel", "Public key" : "Öffentlicher Schlüssel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index a6dd5164992..a3f3ca9a566 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -61,10 +61,7 @@ OC.L10N.register( "Identity endpoint URL" : "Identiteiten endpoint URL", "Rackspace" : "Rackspace", "API key" : "API sleutel", - "Login credentials" : "Inloggegevens", "Username and password" : "Gebruikersnaam en wachtwoord", - "Session credentials" : "Sessie inloggegevens", - "User provided" : "Gebruiker gaf op", "RSA public key" : "RSA publieke sleutel", "Public key" : "Publieke sleutel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index 03b8953a62b..8654cdc662d 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -59,10 +59,7 @@ "Identity endpoint URL" : "Identiteiten endpoint URL", "Rackspace" : "Rackspace", "API key" : "API sleutel", - "Login credentials" : "Inloggegevens", "Username and password" : "Gebruikersnaam en wachtwoord", - "Session credentials" : "Sessie inloggegevens", - "User provided" : "Gebruiker gaf op", "RSA public key" : "RSA publieke sleutel", "Public key" : "Publieke sleutel", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/oc.js b/apps/files_external/l10n/oc.js index 71b174f2e61..716326f1cae 100644 --- a/apps/files_external/l10n/oc.js +++ b/apps/files_external/l10n/oc.js @@ -51,7 +51,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "Clau API", "Username and password" : "Nom d'utilizaire e senhal", - "Session credentials" : "Informacions d'identificacion de session", "RSA public key" : "Clau publica RSA", "Public key" : "Clau publica", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/oc.json b/apps/files_external/l10n/oc.json index edfd9d0a21b..bc882de1456 100644 --- a/apps/files_external/l10n/oc.json +++ b/apps/files_external/l10n/oc.json @@ -49,7 +49,6 @@ "Rackspace" : "Rackspace", "API key" : "Clau API", "Username and password" : "Nom d'utilizaire e senhal", - "Session credentials" : "Informacions d'identificacion de session", "RSA public key" : "Clau publica RSA", "Public key" : "Clau publica", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js index 4a301a306ab..283b9478577 100644 --- a/apps/files_external/l10n/pt_BR.js +++ b/apps/files_external/l10n/pt_BR.js @@ -61,9 +61,7 @@ OC.L10N.register( "Identity endpoint URL" : "Identidade pontofinal URL", "Rackspace" : "Espaço em rack", "API key" : "Chave API", - "Login credentials" : "Credenciais de login", "Username and password" : "Nome de Usuário e senha", - "Session credentials" : "Credenciais de Sessão", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json index 26c20fcb3c1..f1d97e6cf4a 100644 --- a/apps/files_external/l10n/pt_BR.json +++ b/apps/files_external/l10n/pt_BR.json @@ -59,9 +59,7 @@ "Identity endpoint URL" : "Identidade pontofinal URL", "Rackspace" : "Espaço em rack", "API key" : "Chave API", - "Login credentials" : "Credenciais de login", "Username and password" : "Nome de Usuário e senha", - "Session credentials" : "Credenciais de Sessão", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js index 3065f6780af..b84c399e34d 100644 --- a/apps/files_external/l10n/pt_PT.js +++ b/apps/files_external/l10n/pt_PT.js @@ -61,10 +61,10 @@ OC.L10N.register( "Identity endpoint URL" : "Identidade URL endpoint", "Rackspace" : "Rackspace", "API key" : "Chave API", - "Login credentials" : "Credenciais de login", + "Log-in credentials, save in database" : "Credenciais de login, guardar na base de dados", "Username and password" : "Nome de utilizador e palavra-passe", - "Session credentials" : "Credenciais da sessão", - "User provided" : "Utilizador fornecido", + "Log-in credentials, save in session" : "Credenciais de login, guardar na sessão", + "User entered, store in database" : "Utilizador introduzido, guardar na base de dados", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json index 2525f001dea..ac65ca7744f 100644 --- a/apps/files_external/l10n/pt_PT.json +++ b/apps/files_external/l10n/pt_PT.json @@ -59,10 +59,10 @@ "Identity endpoint URL" : "Identidade URL endpoint", "Rackspace" : "Rackspace", "API key" : "Chave API", - "Login credentials" : "Credenciais de login", + "Log-in credentials, save in database" : "Credenciais de login, guardar na base de dados", "Username and password" : "Nome de utilizador e palavra-passe", - "Session credentials" : "Credenciais da sessão", - "User provided" : "Utilizador fornecido", + "Log-in credentials, save in session" : "Credenciais de login, guardar na sessão", + "User entered, store in database" : "Utilizador introduzido, guardar na base de dados", "RSA public key" : "Chave pública RSA", "Public key" : "Chave pública", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ru.js b/apps/files_external/l10n/ru.js index 113cebcc9ef..ceae42c7942 100644 --- a/apps/files_external/l10n/ru.js +++ b/apps/files_external/l10n/ru.js @@ -18,6 +18,7 @@ OC.L10N.register( "Unsatisfied authentication mechanism parameters" : "Недопустимые настройки механизма авторизации", "Insufficient data: %s" : "Недостаточно данных: %s", "%s" : "%s", + "Storage with id \"%i\" is not user editable" : "Пользователь не может редактировать хранилище \"%i\"", "Personal" : "Личное", "System" : "Система", "Grant access" : "Предоставить доступ", @@ -60,8 +61,10 @@ OC.L10N.register( "Identity endpoint URL" : "Удостоверение конечной точки URL", "Rackspace" : "Rackspace", "API key" : "Ключ API", + "Log-in credentials, save in database" : "Учетные данные, хранить в базе данных", "Username and password" : "Имя пользователя и пароль", - "Session credentials" : "Учетные данные сессии", + "Log-in credentials, save in session" : "Учетные данные, хранить в сессии", + "User entered, store in database" : "Введенные пользователем, хранить в базе данных", "RSA public key" : "Открытый ключ RSA", "Public key" : "Открытый ключ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/ru.json b/apps/files_external/l10n/ru.json index 81df3078c59..d0dab706ea9 100644 --- a/apps/files_external/l10n/ru.json +++ b/apps/files_external/l10n/ru.json @@ -16,6 +16,7 @@ "Unsatisfied authentication mechanism parameters" : "Недопустимые настройки механизма авторизации", "Insufficient data: %s" : "Недостаточно данных: %s", "%s" : "%s", + "Storage with id \"%i\" is not user editable" : "Пользователь не может редактировать хранилище \"%i\"", "Personal" : "Личное", "System" : "Система", "Grant access" : "Предоставить доступ", @@ -58,8 +59,10 @@ "Identity endpoint URL" : "Удостоверение конечной точки URL", "Rackspace" : "Rackspace", "API key" : "Ключ API", + "Log-in credentials, save in database" : "Учетные данные, хранить в базе данных", "Username and password" : "Имя пользователя и пароль", - "Session credentials" : "Учетные данные сессии", + "Log-in credentials, save in session" : "Учетные данные, хранить в сессии", + "User entered, store in database" : "Введенные пользователем, хранить в базе данных", "RSA public key" : "Открытый ключ RSA", "Public key" : "Открытый ключ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sk_SK.js b/apps/files_external/l10n/sk_SK.js index 2c81272ff1f..72fb57a1e0b 100644 --- a/apps/files_external/l10n/sk_SK.js +++ b/apps/files_external/l10n/sk_SK.js @@ -50,7 +50,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "API kľúč", "Username and password" : "Meno a heslo", - "Session credentials" : "Pihlasovacie údaje sezóny", "RSA public key" : "RSA verejný kľúč", "Public key" : "Verejný kľúč", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sk_SK.json b/apps/files_external/l10n/sk_SK.json index 85532f676bc..267eb5b48b9 100644 --- a/apps/files_external/l10n/sk_SK.json +++ b/apps/files_external/l10n/sk_SK.json @@ -48,7 +48,6 @@ "Rackspace" : "Rackspace", "API key" : "API kľúč", "Username and password" : "Meno a heslo", - "Session credentials" : "Pihlasovacie údaje sezóny", "RSA public key" : "RSA verejný kľúč", "Public key" : "Verejný kľúč", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sl.js b/apps/files_external/l10n/sl.js index 362e2cf84e1..62b35ffab5e 100644 --- a/apps/files_external/l10n/sl.js +++ b/apps/files_external/l10n/sl.js @@ -41,9 +41,7 @@ OC.L10N.register( "Password" : "Geslo", "Tenant name" : "Ime uporabnika", "API key" : "Ključ API", - "Login credentials" : "Poverila prijave", "Username and password" : "Uporabniško ime in geslo", - "Session credentials" : "Poverila seje", "RSA public key" : "Javni ključ RSA", "Public key" : "Javni ključ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sl.json b/apps/files_external/l10n/sl.json index 2496a4d7199..3a806fbd25b 100644 --- a/apps/files_external/l10n/sl.json +++ b/apps/files_external/l10n/sl.json @@ -39,9 +39,7 @@ "Password" : "Geslo", "Tenant name" : "Ime uporabnika", "API key" : "Ključ API", - "Login credentials" : "Poverila prijave", "Username and password" : "Uporabniško ime in geslo", - "Session credentials" : "Poverila seje", "RSA public key" : "Javni ključ RSA", "Public key" : "Javni ključ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sq.js b/apps/files_external/l10n/sq.js index 96438f293bd..5549657c448 100644 --- a/apps/files_external/l10n/sq.js +++ b/apps/files_external/l10n/sq.js @@ -60,10 +60,7 @@ OC.L10N.register( "Tenant name" : "Emër qiraxhiu", "Rackspace" : "Rackspace", "API key" : "Kyç API", - "Login credentials" : "Kredenciale hyrjesh", "Username and password" : "Emër përdoruesi dhe fjalëkalim", - "Session credentials" : "Kredenciale sesioni", - "User provided" : "Dhënë nga përdoruesi", "RSA public key" : "Kyç publik RSA ", "Public key" : "Kyç publik", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/sq.json b/apps/files_external/l10n/sq.json index e3e21598d7a..5176c5ded27 100644 --- a/apps/files_external/l10n/sq.json +++ b/apps/files_external/l10n/sq.json @@ -58,10 +58,7 @@ "Tenant name" : "Emër qiraxhiu", "Rackspace" : "Rackspace", "API key" : "Kyç API", - "Login credentials" : "Kredenciale hyrjesh", "Username and password" : "Emër përdoruesi dhe fjalëkalim", - "Session credentials" : "Kredenciale sesioni", - "User provided" : "Dhënë nga përdoruesi", "RSA public key" : "Kyç publik RSA ", "Public key" : "Kyç publik", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/th_TH.js b/apps/files_external/l10n/th_TH.js index 90db47a31d7..31993619cae 100644 --- a/apps/files_external/l10n/th_TH.js +++ b/apps/files_external/l10n/th_TH.js @@ -60,9 +60,7 @@ OC.L10N.register( "Identity endpoint URL" : "ตัวตนของ URL ปลายทาง", "Rackspace" : "Rackspace", "API key" : "รหัส API", - "Login credentials" : "เข้าสู่ระบบด้วยข้อมูลประจำตัว", "Username and password" : "ชื่อผู้ใช้และรหัสผ่าน", - "Session credentials" : "ข้อมูลของเซสชั่น", "RSA public key" : "RSA คีย์สาธารณะ", "Public key" : "คีย์สาธารณะ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/th_TH.json b/apps/files_external/l10n/th_TH.json index 4f327592ab8..07424cc1d23 100644 --- a/apps/files_external/l10n/th_TH.json +++ b/apps/files_external/l10n/th_TH.json @@ -58,9 +58,7 @@ "Identity endpoint URL" : "ตัวตนของ URL ปลายทาง", "Rackspace" : "Rackspace", "API key" : "รหัส API", - "Login credentials" : "เข้าสู่ระบบด้วยข้อมูลประจำตัว", "Username and password" : "ชื่อผู้ใช้และรหัสผ่าน", - "Session credentials" : "ข้อมูลของเซสชั่น", "RSA public key" : "RSA คีย์สาธารณะ", "Public key" : "คีย์สาธารณะ", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js index 8f75ae2a274..cb506b24c1f 100644 --- a/apps/files_external/l10n/tr.js +++ b/apps/files_external/l10n/tr.js @@ -51,7 +51,6 @@ OC.L10N.register( "Rackspace" : "Rackspace", "API key" : "API anahtarı", "Username and password" : "Kullanıcı adı ve parola", - "Session credentials" : "Oturum bilgileri", "RSA public key" : "RSA ortak anahtarı", "Public key" : "Ortak anahtar", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json index fdae4642acc..1eeaafa433c 100644 --- a/apps/files_external/l10n/tr.json +++ b/apps/files_external/l10n/tr.json @@ -49,7 +49,6 @@ "Rackspace" : "Rackspace", "API key" : "API anahtarı", "Username and password" : "Kullanıcı adı ve parola", - "Session credentials" : "Oturum bilgileri", "RSA public key" : "RSA ortak anahtarı", "Public key" : "Ortak anahtar", "Amazon S3" : "Amazon S3", diff --git a/apps/files_external/lib/definitionparameter.php b/apps/files_external/lib/definitionparameter.php index dc7985837f5..27c6af0fcda 100644 --- a/apps/files_external/lib/definitionparameter.php +++ b/apps/files_external/lib/definitionparameter.php @@ -131,27 +131,11 @@ class DefinitionParameter implements \JsonSerializable { * @return string */ public function jsonSerialize() { - $prefix = ''; - switch ($this->getType()) { - case self::VALUE_BOOLEAN: - $prefix = '!'; - break; - case self::VALUE_PASSWORD: - $prefix = '*'; - break; - case self::VALUE_HIDDEN: - $prefix = '#'; - break; - } - - if ($this->isFlagSet(self::FLAG_OPTIONAL)) { - $prefix = '&' . $prefix; - } - if ($this->isFlagSet(self::FLAG_USER_PROVIDED)) { - $prefix = '@' . $prefix; - } - - return $prefix . $this->getText(); + return [ + 'value' => $this->getText(), + 'flags' => $this->getFlags(), + 'type' => $this->getType() + ]; } public function isOptional() { diff --git a/apps/files_external/tests/definitionparameterttest.php b/apps/files_external/tests/definitionparameterttest.php index dc7c150ec96..e89058d5c78 100644 --- a/apps/files_external/tests/definitionparameterttest.php +++ b/apps/files_external/tests/definitionparameterttest.php @@ -27,18 +27,34 @@ class DefinitionParameterTest extends \Test\TestCase { public function testJsonSerialization() { $param = new Param('foo', 'bar'); - $this->assertEquals('bar', $param->jsonSerialize()); + $this->assertEquals([ + 'value' => 'bar', + 'flags' => 0, + 'type' => 0 + ], $param->jsonSerialize()); $param->setType(Param::VALUE_BOOLEAN); - $this->assertEquals('!bar', $param->jsonSerialize()); + $this->assertEquals([ + 'value' => 'bar', + 'flags' => 0, + 'type' => Param::VALUE_BOOLEAN + ], $param->jsonSerialize()); $param->setType(Param::VALUE_PASSWORD); $param->setFlag(Param::FLAG_OPTIONAL); - $this->assertEquals('&*bar', $param->jsonSerialize()); + $this->assertEquals([ + 'value' => 'bar', + 'flags' => Param::FLAG_OPTIONAL, + 'type' => Param::VALUE_PASSWORD + ], $param->jsonSerialize()); $param->setType(Param::VALUE_HIDDEN); $param->setFlags(Param::FLAG_NONE); - $this->assertEquals('#bar', $param->jsonSerialize()); + $this->assertEquals([ + 'value' => 'bar', + 'flags' => Param::FLAG_NONE, + 'type' => Param::VALUE_HIDDEN + ], $param->jsonSerialize()); } public function validateValueProvider() { diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index b2b5e1f57ec..6f5bb2a8e3e 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -58,8 +58,13 @@ describe('OCA.External.Settings tests', function() { 'identifier': '\\OC\\TestBackend', 'name': 'Test Backend', 'configuration': { - 'field1': 'Display Name 1', - 'field2': '&Display Name 2' + 'field1': { + 'value': 'Display Name 1' + }, + 'field2': { + 'value': 'Display Name 2', + 'flags': 1 + } }, 'authSchemes': { 'builtin': true, @@ -70,8 +75,13 @@ describe('OCA.External.Settings tests', function() { 'identifier': '\\OC\\AnotherTestBackend', 'name': 'Another Test Backend', 'configuration': { - 'field1': 'Display Name 1', - 'field2': '&Display Name 2' + 'field1': { + 'value': 'Display Name 1' + }, + 'field2': { + 'value': 'Display Name 2', + 'flags': 1 + } }, 'authSchemes': { 'builtin': true, @@ -82,12 +92,30 @@ describe('OCA.External.Settings tests', function() { 'identifier': '\\OC\\InputsTestBackend', 'name': 'Inputs test backend', 'configuration': { - 'field_text': 'Text field', - 'field_password': '*Password field', - 'field_bool': '!Boolean field', - 'field_hidden': '#Hidden field', - 'field_text_optional': '&Text field optional', - 'field_password_optional': '&*Password field optional' + 'field_text': { + 'value': 'Text field' + }, + 'field_password': { + 'value': ',Password field', + 'type': 2 + }, + 'field_bool': { + 'value': 'Boolean field', + 'type': 1 + }, + 'field_hidden': { + 'value': 'Hidden field', + 'type': 3 + }, + 'field_text_optional': { + 'value': 'Text field optional', + 'flags': 1 + }, + 'field_password_optional': { + 'value': 'Password field optional', + 'flags': 1, + 'type': 2 + } }, 'authSchemes': { 'builtin': true, @@ -335,6 +363,7 @@ describe('OCA.External.Settings tests', function() { expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({ encrypt: true, previews: true, + enable_sharing: true, filesystem_check_changes: 0 }); }); |