summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-27 15:08:09 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-27 15:08:09 +0100
commit9fb71af98850ad6638c4238ae0938972a9f23b50 (patch)
tree52e081bc8577f78505ea80fc7158eb9235c7ed59 /apps
parent6443e570c2793954309f9541cd6a7a8c309644ac (diff)
parent5b7b0536346a4a6608e0b294b6784ac5ff3b142a (diff)
downloadnextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.tar.gz
nextcloud-server-9fb71af98850ad6638c4238ae0938972a9f23b50.zip
Merge branch 'master' into encryption_enable_public_upload
Conflicts: apps/files_encryption/lib/helper.php apps/files_encryption/lib/keymanager.php apps/files_encryption/lib/stream.php apps/files_encryption/lib/util.php apps/files_encryption/tests/keymanager.php
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.css3
-rw-r--r--apps/files/js/filelist.js5
-rw-r--r--apps/files/l10n/cs_CZ.php1
-rw-r--r--apps/files/l10n/de.php1
-rw-r--r--apps/files/l10n/de_DE.php13
-rw-r--r--apps/files/l10n/en_GB.php1
-rw-r--r--apps/files/l10n/et_EE.php1
-rw-r--r--apps/files/l10n/fi_FI.php2
-rw-r--r--apps/files/l10n/fr.php1
-rw-r--r--apps/files/l10n/gl.php3
-rw-r--r--apps/files/l10n/it.php1
-rw-r--r--apps/files/l10n/pl.php14
-rw-r--r--apps/files/l10n/pt_BR.php1
-rw-r--r--apps/files/l10n/ru_RU.php4
-rw-r--r--apps/files/l10n/sl.php19
-rw-r--r--apps/files/l10n/sv.php2
-rw-r--r--apps/files/l10n/tr.php3
-rw-r--r--apps/files/templates/index.php5
-rw-r--r--apps/files/tests/ajax_rename.php15
-rw-r--r--apps/files_encryption/l10n/cs_CZ.php1
-rw-r--r--apps/files_encryption/l10n/el.php23
-rw-r--r--apps/files_encryption/l10n/pl.php1
-rw-r--r--apps/files_encryption/l10n/sl.php43
-rw-r--r--apps/files_encryption/l10n/sv.php1
-rwxr-xr-xapps/files_encryption/lib/helper.php20
-rwxr-xr-xapps/files_encryption/lib/keymanager.php12
-rw-r--r--apps/files_encryption/lib/proxy.php2
-rw-r--r--apps/files_encryption/lib/stream.php4
-rw-r--r--apps/files_encryption/lib/util.php2
-rwxr-xr-xapps/files_encryption/tests/crypt.php4
-rw-r--r--apps/files_encryption/tests/keymanager.php2
-rw-r--r--apps/files_external/3rdparty/smb4php/smb.php16
-rw-r--r--apps/files_external/l10n/ar.php1
-rw-r--r--apps/files_external/l10n/ru_RU.php6
-rw-r--r--apps/files_external/lib/amazons3.php8
-rwxr-xr-xapps/files_external/lib/config.php5
-rwxr-xr-xapps/files_external/lib/dropbox.php70
-rw-r--r--apps/files_external/lib/google.php4
-rw-r--r--apps/files_external/lib/sftp.php11
-rw-r--r--apps/files_external/lib/streamwrapper.php11
-rw-r--r--apps/files_external/lib/swift.php12
-rw-r--r--apps/files_external/lib/webdav.php17
-rw-r--r--apps/files_external/tests/dropbox.php16
-rw-r--r--apps/files_external/tests/ftp.php8
-rw-r--r--apps/files_external/tests/mountconfig.php51
-rw-r--r--apps/files_external/tests/smb.php5
-rw-r--r--apps/files_sharing/l10n/cs_CZ.php3
-rw-r--r--apps/files_sharing/l10n/el.php4
-rw-r--r--apps/files_sharing/public.php7
-rw-r--r--apps/files_trashbin/ajax/delete.php39
-rw-r--r--apps/files_trashbin/appinfo/info.xml2
-rw-r--r--apps/files_trashbin/js/filelist.js7
-rw-r--r--apps/files_trashbin/js/trash.js48
-rw-r--r--apps/files_trashbin/l10n/ru_RU.php3
-rw-r--r--apps/files_trashbin/templates/index.php4
-rw-r--r--apps/files_versions/lib/versions.php23
-rw-r--r--apps/user_ldap/ajax/wizard.php6
-rw-r--r--apps/user_ldap/group_proxy.php5
-rw-r--r--apps/user_ldap/js/settings.js158
-rw-r--r--apps/user_ldap/l10n/ca.php3
-rw-r--r--apps/user_ldap/l10n/cs_CZ.php10
-rw-r--r--apps/user_ldap/l10n/de.php3
-rw-r--r--apps/user_ldap/l10n/de_DE.php3
-rw-r--r--apps/user_ldap/l10n/el.php7
-rw-r--r--apps/user_ldap/l10n/en_GB.php3
-rw-r--r--apps/user_ldap/l10n/es.php3
-rw-r--r--apps/user_ldap/l10n/et_EE.php3
-rw-r--r--apps/user_ldap/l10n/fr.php3
-rw-r--r--apps/user_ldap/l10n/gl.php3
-rw-r--r--apps/user_ldap/l10n/it.php3
-rw-r--r--apps/user_ldap/l10n/nl.php3
-rw-r--r--apps/user_ldap/l10n/pt_BR.php3
-rw-r--r--apps/user_ldap/l10n/ru.php3
-rw-r--r--apps/user_ldap/l10n/sl.php70
-rw-r--r--apps/user_ldap/l10n/sv.php4
-rw-r--r--apps/user_ldap/l10n/tr.php3
-rw-r--r--apps/user_ldap/lib/access.php4
-rw-r--r--apps/user_ldap/lib/configuration.php12
-rw-r--r--apps/user_ldap/lib/proxy.php7
-rw-r--r--apps/user_ldap/lib/wizard.php41
-rw-r--r--apps/user_ldap/templates/part.wizard-loginfilter.php10
-rw-r--r--apps/user_ldap/templates/settings.php3
-rw-r--r--apps/user_ldap/user_ldap.php76
-rw-r--r--apps/user_ldap/user_proxy.php15
84 files changed, 815 insertions, 243 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 5ad9e389c0a..e96fa648157 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -65,6 +65,9 @@
top: 44px;
width: 100%;
}
+#filestable, #controls {
+ min-width: 680px;
+}
#filestable tbody tr { background-color:#fff; height:2.5em; }
#filestable tbody tr:hover, tbody tr:active {
background-color: rgb(240,240,240);
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 5cab0707bda..66453740f5d 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -691,8 +691,9 @@ var FileList={
var $fileList = $('#fileList');
var permissions = $('#permissions').val();
var isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0;
- $('#emptycontent').toggleClass('hidden', !isCreatable || $fileList.find('tr').exists());
- $('#filestable th').toggleClass('hidden', $fileList.find('tr').exists() === false);
+ var exists = $fileList.find('tr:first').exists();
+ $('#emptycontent').toggleClass('hidden', !isCreatable || exists);
+ $('#filestable th').toggleClass('hidden', !exists);
},
showMask: function() {
// in case one was shown before
diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php
index 4c7f3d6d0d0..14adf372bad 100644
--- a/apps/files/l10n/cs_CZ.php
+++ b/apps/files/l10n/cs_CZ.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Nepodařilo se přejmenovat soubor",
"replaced {new_name} with {old_name}" => "nahrazeno {new_name} s {old_name}",
"undo" => "vrátit zpět",
+"Error deleting file." => "Chyba při mazání souboru.",
"_%n folder_::_%n folders_" => array("%n složka","%n složky","%n složek"),
"_%n file_::_%n files_" => array("%n soubor","%n soubory","%n souborů"),
"{dirs} and {files}" => "{dirs} a {files}",
diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php
index 725b69c5cb2..a4924295a19 100644
--- a/apps/files/l10n/de.php
+++ b/apps/files/l10n/de.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Die Datei konnte nicht umbenannt werden",
"replaced {new_name} with {old_name}" => "{old_name} ersetzt durch {new_name}",
"undo" => "rückgängig machen",
+"Error deleting file." => "Fehler beim Löschen der Datei.",
"_%n folder_::_%n folders_" => array("%n Ordner","%n Ordner"),
"_%n file_::_%n files_" => array("%n Datei","%n Dateien"),
"{dirs} and {files}" => "{dirs} und {files}",
diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php
index ebfe0084575..cda2cb272a6 100644
--- a/apps/files/l10n/de_DE.php
+++ b/apps/files/l10n/de_DE.php
@@ -22,11 +22,11 @@ $TRANSLATIONS = array(
"Missing a temporary folder" => "Kein temporärer Ordner vorhanden",
"Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte",
"Not enough storage available" => "Nicht genug Speicher vorhanden.",
-"Upload failed. Could not get file info." => "Hochladen fehlgeschlagen. Dateiinformationen konnten nicht abgerufen werden.",
-"Upload failed. Could not find uploaded file" => "Hochladen fehlgeschlagen. Hochgeladene Datei konnte nicht gefunden werden.",
+"Upload failed. Could not get file info." => "Hochladen fehlgeschlagen. Die Dateiinformationen konnten nicht abgerufen werden.",
+"Upload failed. Could not find uploaded file" => "Hochladen fehlgeschlagen. Die hochgeladene Datei konnte nicht gefunden werden.",
"Invalid directory." => "Ungültiges Verzeichnis.",
"Files" => "Dateien",
-"Unable to upload {filename} as it is a directory or has 0 bytes" => "Datei {filename} kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist",
+"Unable to upload {filename} as it is a directory or has 0 bytes" => "Die Datei {filename} kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist",
"Not enough space available" => "Nicht genügend Speicherplatz verfügbar",
"Upload cancelled." => "Upload abgebrochen.",
"Could not get result from server." => "Ergebnis konnte nicht vom Server abgerufen werden.",
@@ -34,7 +34,7 @@ $TRANSLATIONS = array(
"URL cannot be empty" => "Die URL darf nicht leer sein",
"In the home folder 'Shared' is a reserved filename" => "Das Benutzerverzeichnis 'Shared' ist ein reservierter Dateiname",
"{new_name} already exists" => "{new_name} existiert bereits",
-"Could not create file" => "Datei konnte nicht erstellt werden",
+"Could not create file" => "Die Datei konnte nicht erstellt werden",
"Could not create folder" => "Der Ordner konnte nicht erstellt werden",
"Share" => "Teilen",
"Delete permanently" => "Endgültig löschen",
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Die Datei konnte nicht umbenannt werden",
"replaced {new_name} with {old_name}" => "{old_name} wurde ersetzt durch {new_name}",
"undo" => "rückgängig machen",
+"Error deleting file." => "Fehler beim Löschen der Datei.",
"_%n folder_::_%n folders_" => array("%n Ordner","%n Ordner"),
"_%n file_::_%n files_" => array("%n Datei","%n Dateien"),
"{dirs} and {files}" => "{dirs} und {files}",
@@ -51,8 +52,8 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.",
"Your storage is full, files can not be updated or synced anymore!" => "Ihr Speicher ist voll, daher können keine Dateien mehr aktualisiert oder synchronisiert werden!",
"Your storage is almost full ({usedSpacePercent}%)" => "Ihr Speicher ist fast voll ({usedSpacePercent}%)",
-"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Verschlüsselung-App ist aktiviert aber Ihre Schlüssel sind nicht initialisiert. Bitte melden sich nochmals ab und wieder an.",
-"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Ungültiger privater Schlüssel für die Verschlüsselung-App. Bitte aktualisieren Sie Ihr privates Schlüssel-Passwort um den Zugriff auf Ihre verschlüsselten Dateien wiederherzustellen.",
+"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Verschlüsselung-App ist aktiviert, aber Ihre Schlüssel sind nicht initialisiert. Bitte melden sich nochmals ab und wieder an.",
+"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Ungültiger privater Schlüssel für die Verschlüsselung-App. Bitte aktualisieren Sie Ihr privates Schlüssel-Passwort, um den Zugriff auf Ihre verschlüsselten Dateien wiederherzustellen.",
"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Die Verschlüsselung wurde deaktiviert, jedoch sind Ihre Dateien nach wie vor verschlüsselt. Bitte gehen Sie zu Ihren persönlichen Einstellungen, um Ihre Dateien zu entschlüsseln.",
"Your download is being prepared. This might take some time if the files are big." => "Ihr Download wird vorbereitet. Dies kann bei größeren Dateien etwas dauern.",
"Error moving file" => "Fehler beim Verschieben der Datei",
diff --git a/apps/files/l10n/en_GB.php b/apps/files/l10n/en_GB.php
index 454d623a4d7..b613723ff75 100644
--- a/apps/files/l10n/en_GB.php
+++ b/apps/files/l10n/en_GB.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Could not rename file",
"replaced {new_name} with {old_name}" => "replaced {new_name} with {old_name}",
"undo" => "undo",
+"Error deleting file." => "Error deleting file.",
"_%n folder_::_%n folders_" => array("%n folder","%n folders"),
"_%n file_::_%n files_" => array("%n file","%n files"),
"{dirs} and {files}" => "{dirs} and {files}",
diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php
index 83a8adf052c..29a5771c9fc 100644
--- a/apps/files/l10n/et_EE.php
+++ b/apps/files/l10n/et_EE.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Ei suuda faili ümber nimetada",
"replaced {new_name} with {old_name}" => "asendas nime {old_name} nimega {new_name}",
"undo" => "tagasi",
+"Error deleting file." => "Viga faili kustutamisel.",
"_%n folder_::_%n folders_" => array("%n kataloog","%n kataloogi"),
"_%n file_::_%n files_" => array("%n fail","%n faili"),
"{dirs} and {files}" => "{dirs} ja {files}",
diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php
index 93d29aba677..dfce39bae8e 100644
--- a/apps/files/l10n/fi_FI.php
+++ b/apps/files/l10n/fi_FI.php
@@ -6,6 +6,7 @@ $TRANSLATIONS = array(
"File name must not contain \"/\". Please choose a different name." => "Tiedoston nimessä ei saa olla merkkiä \"/\". Valitse toinen nimi.",
"The name %s is already used in the folder %s. Please choose a different name." => "Nimi %s on jo käytössä kansiossa %s. Valitse toinen nimi.",
"Not a valid source" => "Virheellinen lähde",
+"Error while downloading %s to %s" => "Virhe ladatessa kohdetta %s sijaintiin %s",
"Error when creating the file" => "Virhe tiedostoa luotaessa",
"Folder name cannot be empty." => "Kansion nimi ei voi olla tyhjä.",
"Folder name must not contain \"/\". Please choose a different name." => "Kansion nimessä ei saa olla merkkiä \"/\". Valitse toinen nimi.",
@@ -36,6 +37,7 @@ $TRANSLATIONS = array(
"Pending" => "Odottaa",
"Could not rename file" => "Tiedoston nimeäminen uudelleen epäonnistui",
"undo" => "kumoa",
+"Error deleting file." => "Virhe tiedostoa poistaessa.",
"_%n folder_::_%n folders_" => array("%n kansio","%n kansiota"),
"_%n file_::_%n files_" => array("%n tiedosto","%n tiedostoa"),
"{dirs} and {files}" => "{dirs} ja {files}",
diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php
index 74f9599ade2..3a902485032 100644
--- a/apps/files/l10n/fr.php
+++ b/apps/files/l10n/fr.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Impossible de renommer le fichier",
"replaced {new_name} with {old_name}" => "{new_name} a été remplacé par {old_name}",
"undo" => "annuler",
+"Error deleting file." => "Erreur pendant la suppression du fichier.",
"_%n folder_::_%n folders_" => array("%n dossier","%n dossiers"),
"_%n file_::_%n files_" => array("%n fichier","%n fichiers"),
"{dirs} and {files}" => "{dirs} et {files}",
diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php
index 4edb889bb4d..d76aad46b42 100644
--- a/apps/files/l10n/gl.php
+++ b/apps/files/l10n/gl.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"Could not move %s - File with this name already exists" => "Non se moveu %s - Xa existe un ficheiro con ese nome.",
+"Could not move %s - File with this name already exists" => "Non foi posíbel mover %s; Xa existe un ficheiro con ese nome.",
"Could not move %s" => "Non foi posíbel mover %s",
"File name cannot be empty." => "O nome de ficheiro non pode estar baleiro",
"File name must not contain \"/\". Please choose a different name." => "O nome do ficheiro non pode conter «/». Escolla outro nome.",
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Non foi posíbel renomear o ficheiro",
"replaced {new_name} with {old_name}" => "substituír {new_name} por {old_name}",
"undo" => "desfacer",
+"Error deleting file." => "Produciuse un erro ao eliminar o ficheiro.",
"_%n folder_::_%n folders_" => array("%n cartafol","%n cartafoles"),
"_%n file_::_%n files_" => array("%n ficheiro","%n ficheiros"),
"{dirs} and {files}" => "{dirs} e {files}",
diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php
index 48d52653d51..eb8dab70093 100644
--- a/apps/files/l10n/it.php
+++ b/apps/files/l10n/it.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Impossibile rinominare il file",
"replaced {new_name} with {old_name}" => "sostituito {new_name} con {old_name}",
"undo" => "annulla",
+"Error deleting file." => "Errore durante l'eliminazione del file.",
"_%n folder_::_%n folders_" => array("%n cartella","%n cartelle"),
"_%n file_::_%n files_" => array("%n file","%n file"),
"{dirs} and {files}" => "{dirs} e {files}",
diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php
index 8140bac46bb..dbb49b4649a 100644
--- a/apps/files/l10n/pl.php
+++ b/apps/files/l10n/pl.php
@@ -3,7 +3,14 @@ $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Nie można było przenieść %s - Plik o takiej nazwie już istnieje",
"Could not move %s" => "Nie można było przenieść %s",
"File name cannot be empty." => "Nazwa pliku nie może być pusta.",
+"File name must not contain \"/\". Please choose a different name." => "Nazwa pliku nie może zawierać \"/\". Proszę wybrać inną nazwę.",
+"The name %s is already used in the folder %s. Please choose a different name." => "Nazwa %s jest już używana w folderze %s. Proszę wybrać inną nazwę.",
+"Not a valid source" => "Niepoprawne źródło",
+"Error while downloading %s to %s" => "Błąd podczas pobierania %s do %S",
+"Error when creating the file" => "Błąd przy tworzeniu pliku",
"Folder name cannot be empty." => "Nazwa folderu nie może być pusta.",
+"Folder name must not contain \"/\". Please choose a different name." => "Nazwa folderu nie może zawierać \"/\". Proszę wybrać inną nazwę.",
+"Error when creating the folder" => "Błąd przy tworzeniu folderu",
"Unable to set upload directory." => "Nie można ustawić katalog wczytywania.",
"Invalid Token" => "Nieprawidłowy Token",
"No file was uploaded. Unknown error" => "Żaden plik nie został załadowany. Nieznany błąd",
@@ -24,11 +31,16 @@ $TRANSLATIONS = array(
"Upload cancelled." => "Wczytywanie anulowane.",
"Could not get result from server." => "Nie można uzyskać wyniku z serwera.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Wysyłanie pliku jest w toku. Jeśli opuścisz tę stronę, wysyłanie zostanie przerwane.",
+"URL cannot be empty" => "URL nie może być pusty",
+"In the home folder 'Shared' is a reserved filename" => "W katalogu domowym \"Shared\" jest zarezerwowana nazwa pliku",
"{new_name} already exists" => "{new_name} już istnieje",
+"Could not create file" => "Nie można utworzyć pliku",
+"Could not create folder" => "Nie można utworzyć folderu",
"Share" => "Udostępnij",
"Delete permanently" => "Trwale usuń",
"Rename" => "Zmień nazwę",
"Pending" => "Oczekujące",
+"Could not rename file" => "Nie można zmienić nazwy pliku",
"replaced {new_name} with {old_name}" => "zastąpiono {new_name} przez {old_name}",
"undo" => "cofnij",
"_%n folder_::_%n folders_" => array("%n katalog","%n katalogi","%n katalogów"),
@@ -48,6 +60,7 @@ $TRANSLATIONS = array(
"Name" => "Nazwa",
"Size" => "Rozmiar",
"Modified" => "Modyfikacja",
+"Invalid folder name. Usage of 'Shared' is reserved." => "Niepoprawna nazwa folderu. Wykorzystanie \"Shared\" jest zarezerwowane.",
"%s could not be renamed" => "%s nie można zmienić nazwy",
"Upload" => "Wyślij",
"File handling" => "Zarządzanie plikami",
@@ -64,6 +77,7 @@ $TRANSLATIONS = array(
"From link" => "Z odnośnika",
"Deleted files" => "Pliki usunięte",
"Cancel upload" => "Anuluj wysyłanie",
+"You don’t have permission to upload or create files here" => "Nie masz uprawnień do wczytywania lub tworzenia plików w tym miejscu",
"Nothing in here. Upload something!" => "Pusto. Wyślij coś!",
"Download" => "Pobierz",
"Unshare" => "Zatrzymaj współdzielenie",
diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php
index 217e9f4599c..1bc612af776 100644
--- a/apps/files/l10n/pt_BR.php
+++ b/apps/files/l10n/pt_BR.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Não foi possível renomear o arquivo",
"replaced {new_name} with {old_name}" => "Substituído {old_name} por {new_name} ",
"undo" => "desfazer",
+"Error deleting file." => "Erro eliminando o arquivo.",
"_%n folder_::_%n folders_" => array("%n pasta","%n pastas"),
"_%n file_::_%n files_" => array("%n arquivo","%n arquivos"),
"{dirs} and {files}" => "{dirs} e {files}",
diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php
index 3660b300c2b..649ec594cd5 100644
--- a/apps/files/l10n/ru_RU.php
+++ b/apps/files/l10n/ru_RU.php
@@ -7,9 +7,11 @@ $TRANSLATIONS = array(
"_%n file_::_%n files_" => array("","",""),
"_Uploading %n file_::_Uploading %n files_" => array("","",""),
"Error" => "Ошибка",
+"Size" => "Размер",
"Upload" => "Загрузка",
"Save" => "Сохранить",
"Cancel upload" => "Отмена загрузки",
-"Download" => "Загрузка"
+"Download" => "Загрузка",
+"Delete" => "Удалить"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php
index 3f5e3e625bb..819fb632d14 100644
--- a/apps/files/l10n/sl.php
+++ b/apps/files/l10n/sl.php
@@ -1,14 +1,14 @@
<?php
$TRANSLATIONS = array(
-"Could not move %s - File with this name already exists" => "%s ni mogoče premakniti - datoteka s tem imenom že obstaja",
-"Could not move %s" => "Ni mogoče premakniti %s",
+"Could not move %s - File with this name already exists" => "Datoteke %s ni mogoče premakniti - datoteka s tem imenom že obstaja.",
+"Could not move %s" => "Datoteke %s ni mogoče premakniti",
"File name cannot be empty." => "Ime datoteke ne sme biti prazno polje.",
"File name must not contain \"/\". Please choose a different name." => "Ime datoteke ne sme vsebovati znaka \"/\". Določiti je treba drugo ime.",
"The name %s is already used in the folder %s. Please choose a different name." => "Ime %s je že v mapi %s že v uporabi. Izbrati je treba drugo ime.",
"Not a valid source" => "Vir ni veljaven",
"Error while downloading %s to %s" => "Napaka med prejemanjem %s v mapo %s",
"Error when creating the file" => "Napaka med ustvarjanjem datoteke",
-"Folder name cannot be empty." => "Ime mape ne more biti prazna vrednost",
+"Folder name cannot be empty." => "Ime mape ne more biti prazna vrednost.",
"Folder name must not contain \"/\". Please choose a different name." => "Ime mape ne sme vsebovati znaka \"/\". Določiti je treba drugo ime.",
"Error when creating the folder" => "Napaka med ustvarjanjem mape",
"Unable to set upload directory." => "Mapo, v katero boste prenašali dokumente, ni mogoče določiti",
@@ -26,6 +26,7 @@ $TRANSLATIONS = array(
"Upload failed. Could not find uploaded file" => "Pošiljanje je spodletelo. Ni mogoče najti poslane datoteke.",
"Invalid directory." => "Neveljavna mapa.",
"Files" => "Datoteke",
+"Unable to upload {filename} as it is a directory or has 0 bytes" => "Ni mogoče poslati datoteke {filename}, saj je to ali mapa ali pa je velikost datoteke 0 bajtov.",
"Not enough space available" => "Na voljo ni dovolj prostora.",
"Upload cancelled." => "Pošiljanje je preklicano.",
"Could not get result from server." => "Ni mogoče pridobiti podatkov s strežnika.",
@@ -42,22 +43,26 @@ $TRANSLATIONS = array(
"Could not rename file" => "Ni mogoče preimenovati datoteke",
"replaced {new_name} with {old_name}" => "preimenovano ime {new_name} z imenom {old_name}",
"undo" => "razveljavi",
+"Error deleting file." => "Napaka brisanja datoteke.",
"_%n folder_::_%n folders_" => array("%n mapa","%n mapi","%n mape","%n map"),
"_%n file_::_%n files_" => array("%n datoteka","%n datoteki","%n datoteke","%n datotek"),
"{dirs} and {files}" => "{dirs} in {files}",
"_Uploading %n file_::_Uploading %n files_" => array("Posodabljanje %n datoteke","Posodabljanje %n datotek","Posodabljanje %n datotek","Posodabljanje %n datotek"),
"'.' is an invalid file name." => "'.' je neveljavno ime datoteke.",
-"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neveljavno ime, znaki '\\', '/', '<', '>', ':', '\"', '|', '?' in '*' niso dovoljeni.",
+"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neveljavno ime; znaki '\\', '/', '<', '>', ':', '\"', '|', '?' in '*' niso dovoljeni.",
"Your storage is full, files can not be updated or synced anymore!" => "Shramba je povsem napolnjena. Datotek ni več mogoče posodabljati in usklajevati!",
-"Your storage is almost full ({usedSpacePercent}%)" => "Mesto za shranjevanje je skoraj polno ({usedSpacePercent}%)",
-"Your download is being prepared. This might take some time if the files are big." => "Postopek priprave datoteke za prejem je lahko dolgotrajen, če je datoteka zelo velika.",
+"Your storage is almost full ({usedSpacePercent}%)" => "Prostor za shranjevanje je skoraj do konca zaseden ({usedSpacePercent}%)",
+"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Program za šifriranje je omogočen, vendar ni začet. Odjavite se in nato ponovno prijavite.",
+"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Ni ustreznega osebnega ključa za program za šifriranje. Posodobite osebni ključ za dostop do šifriranih datotek med nastavitvami.",
+"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifriranje je onemogočeno, datoteke pa so še vedno šifrirane. Odšifrirajte jih med nastavitvami.",
+"Your download is being prepared. This might take some time if the files are big." => "Postopek priprave datoteke za prejem je lahko dolgotrajen, kadar je datoteka zelo velika.",
"Error moving file" => "Napaka premikanja datoteke",
"Error" => "Napaka",
"Name" => "Ime",
"Size" => "Velikost",
"Modified" => "Spremenjeno",
"Invalid folder name. Usage of 'Shared' is reserved." => "Neveljavno ime mape. Ime 'Souporaba' je zadržana za javno mapo.",
-"%s could not be renamed" => "%s ni bilo mogoče preimenovati",
+"%s could not be renamed" => "%s ni mogoče preimenovati",
"Upload" => "Pošlji",
"File handling" => "Upravljanje z datotekami",
"Maximum upload size" => "Največja velikost za pošiljanja",
diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php
index cbbabae5956..7beb2b7c16d 100644
--- a/apps/files/l10n/sv.php
+++ b/apps/files/l10n/sv.php
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Kan ej byta filnamn",
"replaced {new_name} with {old_name}" => "ersatt {new_name} med {old_name}",
"undo" => "ångra",
+"Error deleting file." => "Kunde inte ta bort filen.",
"_%n folder_::_%n folders_" => array("%n mapp","%n mappar"),
"_%n file_::_%n files_" => array("%n fil","%n filer"),
"{dirs} and {files}" => "{dirs} och {files}",
@@ -60,6 +61,7 @@ $TRANSLATIONS = array(
"Name" => "Namn",
"Size" => "Storlek",
"Modified" => "Ändrad",
+"Invalid folder name. Usage of 'Shared' is reserved." => "Ogiltigt mappnamn. Användande av 'Shared' är reserverat av ownCloud",
"%s could not be renamed" => "%s kunde inte namnändras",
"Upload" => "Ladda upp",
"File handling" => "Filhantering",
diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php
index 1faa3547fb2..f8441251121 100644
--- a/apps/files/l10n/tr.php
+++ b/apps/files/l10n/tr.php
@@ -1,6 +1,6 @@
<?php
$TRANSLATIONS = array(
-"Could not move %s - File with this name already exists" => "%s taşınamadı. Bu isimde dosya zaten var.",
+"Could not move %s - File with this name already exists" => "%s taşınamadı - Bu isimde dosya zaten var",
"Could not move %s" => "%s taşınamadı",
"File name cannot be empty." => "Dosya adı boş olamaz.",
"File name must not contain \"/\". Please choose a different name." => "Dosya adı \"/\" içermemelidir. Lütfen farklı bir isim seçin.",
@@ -43,6 +43,7 @@ $TRANSLATIONS = array(
"Could not rename file" => "Dosya adlandırılamadı",
"replaced {new_name} with {old_name}" => "{new_name} ismi {old_name} ile değiştirildi",
"undo" => "geri al",
+"Error deleting file." => "Dosya silinirken hata.",
"_%n folder_::_%n folders_" => array("%n dizin","%n dizin"),
"_%n file_::_%n files_" => array("%n dosya","%n dosya"),
"{dirs} and {files}" => "{dirs} ve {files}",
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 6dd28532ccb..4f8623573cb 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -25,7 +25,7 @@
data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
<a href="#" class="svg"></a>
</div>
- <?php if ($_['trash'] ): ?>
+ <?php if ($_['trash']): ?>
<input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input>
<?php endif; ?>
<div id="uploadprogresswrapper">
@@ -111,8 +111,9 @@
<input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" />
<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" />
<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" />
+<?php if (!$_['isPublic']) :?>
<input type="hidden" name="encryptedFiles" id="encryptedFiles" value="<?php $_['encryptedFiles'] ? p('1') : p('0'); ?>" />
<input type="hidden" name="encryptedInitStatus" id="encryptionInitStatus" value="<?php p($_['encryptionInitStatus']) ?>" />
<input type="hidden" name="mailNotificationEnabled" id="mailNotificationEnabled" value="<?php p($_['mailNotificationEnabled']) ?>" />
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
-
+<?php endif;
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php
index e654255c407..3735b0a49c8 100644
--- a/apps/files/tests/ajax_rename.php
+++ b/apps/files/tests/ajax_rename.php
@@ -22,9 +22,18 @@
*/
class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
+ private static $user;
function setUp() {
// mock OC_L10n
+ if (!self::$user) {
+ self::$user = uniqid();
+ }
+ \OC_User::createUser(self::$user, 'password');
+ \OC_User::setUserId(self::$user);
+
+ \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
+
$l10nMock = $this->getMock('\OC_L10N', array('t'), array(), '', false);
$l10nMock->expects($this->any())
->method('t')
@@ -39,6 +48,12 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
$this->files = new \OCA\Files\App($viewMock, $l10nMock);
}
+ function tearDown() {
+ $result = \OC_User::deleteUser(self::$user);
+ $this->assertTrue($result);
+ \OC\Files\Filesystem::tearDown();
+ }
+
/**
* @brief test rename of file/folder named "Shared"
*/
diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php
index 8464ad2bb4a..a49530d94d9 100644
--- a/apps/files_encryption/l10n/cs_CZ.php
+++ b/apps/files_encryption/l10n/cs_CZ.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Heslo soukromého klíče úspěšně aktualizováno.",
"Could not update the private key password. Maybe the old password was not correct." => "Nelze aktualizovat heslo soukromého klíče. Možná nebylo staré heslo správně.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Aplikace pro šifrování není inicializována! Je možné, že aplikace byla znovu aktivována během vašeho přihlášení. Zkuste se prosím odhlásit a znovu přihlásit pro provedení inicializace šifrovací aplikace.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Váš soukromý klíč není platný! Pravděpodobně bylo heslo změněno vně systému %s (např. ve vašem firemním adresáři). Heslo vašeho soukromého klíče můžete změnit ve svém osobním nastavení pro obnovení přístupu k vašim zašifrovaným souborům.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Tento soubor se nepodařilo dešifrovat, pravděpodobně je sdílený. Požádejte prosím majitele souboru, aby jej s vámi znovu sdílel.",
"Unknown error please check your system settings or contact your administrator" => "Neznámá chyba, zkontrolujte vaše systémová nastavení nebo kontaktujte vašeho správce",
"Missing requirements." => "Nesplněné závislosti.",
diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php
index 70f778f0a50..6b21122027a 100644
--- a/apps/files_encryption/l10n/el.php
+++ b/apps/files_encryption/l10n/el.php
@@ -1,13 +1,34 @@
<?php
$TRANSLATIONS = array(
+"Recovery key successfully enabled" => "Επιτυχής ενεργοποίηση κλειδιού ανάκτησης",
+"Could not enable recovery key. Please check your recovery key password!" => "Αποτυχία ενεργοποίησης κλειδιού ανάκτησης. Παρακαλώ ελέγξτε τον κωδικό του κλειδιού ανάκτησής σας!",
+"Recovery key successfully disabled" => "Επιτυχής απενεργοποίηση κλειδιού ανάκτησης",
+"Could not disable recovery key. Please check your recovery key password!" => "Αποτυχία απενεργοποίησης κλειδιού ανάκτησης. Παρακαλώ ελέγξτε τον κωδικό του κλειδιού ανάκτησής σας!",
"Password successfully changed." => "Ο κωδικός αλλάχτηκε επιτυχώς.",
"Could not change the password. Maybe the old password was not correct." => "Αποτυχία αλλαγής κωδικού ίσως ο παλιός κωδικός να μην ήταν σωστός.",
+"Private key password successfully updated." => "Το Προσωπικό κλειδί πρόσβασης ενημερώθηκε επιτυχώς",
+"Could not update the private key password. Maybe the old password was not correct." => "Αποτυχία ενημέρωσης του κωδικού για το προσωπικό κλειδί. Ενδεχομένως ο παλιός κωδικός δεν ήταν σωστός.",
+"Unknown error please check your system settings or contact your administrator" => "Άγνωστο σφάλμα, παρακαλώ ελέγξτε τις ρυθμίσεις συστήματος ή επικοινωνήστε με τον διαχειριστή σας ",
+"Missing requirements." => "Προαπαιτούμενα που απουσιάζουν.",
+"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Παρακαλώ επιβεβαιώστε ότι η PHP 5.3.3 ή νεότερη είναι εγκατεστημένη και ότι το OpenSSL μαζί με το PHP extension είναι ενεργοποιήμένο και έχει ρυθμιστεί σωστά. Προς το παρόν, η εφαρμογή κρυπτογράφησης είναι απενεργοποιημένη.",
+"Following users are not set up for encryption:" => "Οι κάτωθι χρήστες δεν έχουν ρυθμιστεί για κρυπογράφηση:",
"Saving..." => "Γίνεται αποθήκευση...",
+"Go directly to your " => "Πηγαίνε απευθείας στο ",
"personal settings" => "προσωπικές ρυθμίσεις",
"Encryption" => "Κρυπτογράφηση",
+"Recovery key password" => "Επαναφορά κωδικού κλειδιού",
"Enabled" => "Ενεργοποιημένο",
"Disabled" => "Απενεργοποιημένο",
+"New Recovery key password" => "Νέο κλειδί επαναφοράς κωδικού",
"Change Password" => "Αλλαγή Κωδικού Πρόσβασης",
-"File recovery settings updated" => "Οι ρυθμίσεις επαναφοράς αρχείων ανανεώθηκαν"
+"Your private key password no longer match your log-in password:" => "Ο κωδικός του προσωπικού κλειδιού δεν ταιριάζει πλέον με τον κωδικό σύνδεσής σας:",
+" If you don't remember your old password you can ask your administrator to recover your files." => "Εάν δεν θυμάστε τον παλιό σας κωδικό μπορείτε να ζητήσετε από τον διαχειριστή σας να επανακτήσει τα αρχεία σας.",
+"Old log-in password" => "Παλαιό συνθηματικό εισόδου",
+"Current log-in password" => "Τρέχον συνθηματικό πρόσβασης",
+"Update Private Key Password" => "Ενημέρωση Προσωπικού Κλειδού Πρόσβασης",
+"Enable password recovery:" => "Ενεργοποιήστε την ανάκτηση κωδικού πρόσβασης",
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Η ενεργοποίηση αυτής της επιλογής θα σας επιτρέψει να επανακτήσετε πρόσβαση στα κρυπτογραφημένα σας αρχεία σε περίπτωση απώλειας του κωδικού σας",
+"File recovery settings updated" => "Οι ρυθμίσεις επαναφοράς αρχείων ανανεώθηκαν",
+"Could not update file recovery" => "Αποτυχία ενημέρωσης ανάκτησης αρχείων"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 615951eecc8..5d1a48d1246 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Pomyślnie zaktualizowano hasło klucza prywatnego.",
"Could not update the private key password. Maybe the old password was not correct." => "Nie można zmienić prywatnego hasła. Może stare hasło nie było poprawne.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Szyfrowanie aplikacja nie została zainicjowane! Może szyfrowanie aplikacji zostało ponownie włączone podczas tej sesji. Spróbuj się wylogować i zalogować ponownie aby zainicjować szyfrowanie aplikacji.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Klucz prywatny nie jest poprawny! Prawdopodobnie Twoje hasło zostało zmienione poza %s (np. w katalogu firmy). Aby odzyskać dostęp do zaszyfrowanych plików można zaktualizować hasło klucza prywatnego w ustawieniach osobistych.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Nie można odszyfrować tego pliku, prawdopodobnie jest to plik udostępniony. Poproś właściciela pliku o ponowne udostępnianie pliku Tobie.",
"Unknown error please check your system settings or contact your administrator" => "Nieznany błąd proszę sprawdzić ustawienia systemu lub skontaktuj się z administratorem",
"Missing requirements." => "Brak wymagań.",
diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php
index d4d881d3d0d..be814558f52 100644
--- a/apps/files_encryption/l10n/sl.php
+++ b/apps/files_encryption/l10n/sl.php
@@ -1,36 +1,43 @@
<?php
$TRANSLATIONS = array(
-"Recovery key successfully enabled" => "Ključ za obnovitev gesla je bil uspešno nastavljen",
-"Could not enable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni bilo mogoče nastaviti. Preverite ključ!",
-"Recovery key successfully disabled" => "Ključ za obnovitev gesla je bil uspešno onemogočen",
-"Could not disable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni bilo mogoče onemogočiti. Preverite ključ!",
-"Password successfully changed." => "Geslo je bilo uspešno spremenjeno.",
-"Could not change the password. Maybe the old password was not correct." => "Gesla ni bilo mogoče spremeniti. Morda vnos starega gesla ni bil pravilen.",
-"Private key password successfully updated." => "Zasebni ključ za geslo je bil uspešno posodobljen.",
-"Could not update the private key password. Maybe the old password was not correct." => "Zasebnega ključa za geslo ni bilo mogoče posodobiti. Morda vnos starega gesla ni bil pravilen.",
+"Recovery key successfully enabled" => "Ključ za obnovitev gesla je uspešno nastavljen",
+"Could not enable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni mogoče nastaviti. Preverite ključ!",
+"Recovery key successfully disabled" => "Ključ za obnovitev gesla je uspešno onemogočen",
+"Could not disable recovery key. Please check your recovery key password!" => "Ključa za obnovitev gesla ni mogoče onemogočiti. Preverite ključ!",
+"Password successfully changed." => "Geslo je uspešno spremenjeno.",
+"Could not change the password. Maybe the old password was not correct." => "Gesla ni mogoče spremeniti. Morda vnos starega gesla ni pravilen.",
+"Private key password successfully updated." => "Zasebni ključ za geslo je uspešno posodobljen.",
+"Could not update the private key password. Maybe the old password was not correct." => "Zasebnega ključa za geslo ni mogoče posodobiti. Morda vnos starega gesla ni bil pravilen.",
+"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Program za šifriranje ni začet. Morda je bil program ponovno omogočen šele med zagonom trenutne seje. Odjavite se in se nato prijavite nazaj. S tem morda razrešite napako.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Zasebni ključ ni veljaven. Najverjetneje je bilo geslo spremenjeno izven %s (najverjetneje je to poslovna mapa). Geslo lahko posodobite med osebnimi nastavitvami in s tem obnovite dostop do šifriranih datotek.",
+"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Te datoteke ni mogoče šifrirati, ker je to najverjetneje datoteka v souporabi. Prosite lastnika datoteke, da jo da ponovno v souporabo.",
+"Unknown error please check your system settings or contact your administrator" => "Prišlo je do neznane napake. Preverite nastavitve sistema ali pa stopite v stik s skrbnikom sistema.",
"Missing requirements." => "Manjkajoče zahteve",
-"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Preverite, da imate na strežniku nameščen paket PHP 5.3.3 ali novejši in da je omogočen in pravilno nastavljen PHP OpenSSL . Zaenkrat je šifriranje onemogočeno.",
-"Following users are not set up for encryption:" => "Naslednji uporabniki še nimajo nastavljenega šifriranja:",
+"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Preverite, ali je na strežniku nameščen paket PHP 5.3.3 ali novejši, da je omogočen in pravilno nastavljen PHP OpenSSL. Z obstoječimi možnostmi šifriranje ni mogoče.",
+"Following users are not set up for encryption:" => "Navedeni uporabniki še nimajo nastavljenega šifriranja:",
"Saving..." => "Poteka shranjevanje ...",
+"Go directly to your " => "Skočite neposredno na",
"personal settings" => "osebne nastavitve",
"Encryption" => "Šifriranje",
-"Enable recovery key (allow to recover users files in case of password loss):" => "Omogoči ključ za obnovitev datotek (v primeru izgube gesla)",
+"Enable recovery key (allow to recover users files in case of password loss):" => "Omogoči ključ za obnovitev datotek (v primeru izgube gesla):",
"Recovery key password" => "Ključ za obnovitev gesla",
+"Repeat Recovery key password" => "Ponovi ključ za obnovitev gesla",
"Enabled" => "Omogočeno",
"Disabled" => "Onemogočeno",
"Change recovery key password:" => "Spremeni ključ za obnovitev gesla:",
"Old Recovery key password" => "Stari ključ za obnovitev gesla",
-"New Recovery key password" => "Nov ključ za obnovitev gesla",
+"New Recovery key password" => "Novi ključ za obnovitev gesla",
+"Repeat New Recovery key password" => "Ponovi novi ključ za obnovitev gesla",
"Change Password" => "Spremeni geslo",
-"Your private key password no longer match your log-in password:" => "Vaš zasebni ključ za geslo se ne ujema z vnešenim geslom ob prijavi:",
-"Set your old private key password to your current log-in password." => "Nastavite svoj star zasebni ključ v geslo, vnešeno ob prijavi.",
-" If you don't remember your old password you can ask your administrator to recover your files." => "Če ste svoje geslo pozabili, lahko vaše datoteke obnovi skrbnik sistema.",
+"Your private key password no longer match your log-in password:" => "Vaš zasebni ključ za geslo se ne ujema z geslom, vnesenim ob prijavi:",
+"Set your old private key password to your current log-in password." => "Nastavite svoj star zasebni ključ v geslo, vneseno ob prijavi.",
+" If you don't remember your old password you can ask your administrator to recover your files." => "Če ste pozabili svoje geslo, lahko vaše datoteke obnovi le skrbnik sistema.",
"Old log-in password" => "Staro geslo",
"Current log-in password" => "Trenutno geslo",
"Update Private Key Password" => "Posodobi zasebni ključ",
"Enable password recovery:" => "Omogoči obnovitev gesla:",
-"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Nastavitev te možnosti omogoča ponovno pridobitev dostopa do šifriranih datotek, v primeru da boste geslo pozabili.",
-"File recovery settings updated" => "Nastavitve obnavljanja dokumentov so bile posodobljene",
-"Could not update file recovery" => "Nastavitev za obnavljanje dokumentov ni bilo mogoče posodobiti"
+"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Nastavitev te možnosti omogoča ponovno pridobitev dostopa do šifriranih datotek, v primeru, da boste geslo pozabili.",
+"File recovery settings updated" => "Nastavitve obnavljanja dokumentov so posodobljene",
+"Could not update file recovery" => "Nastavitev za obnavljanje dokumentov ni mogoče posodobiti"
);
$PLURAL_FORMS = "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);";
diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php
index 87f7aabc7ad..1e509ea08e7 100644
--- a/apps/files_encryption/l10n/sv.php
+++ b/apps/files_encryption/l10n/sv.php
@@ -9,6 +9,7 @@ $TRANSLATIONS = array(
"Private key password successfully updated." => "Den privata nyckelns lösenord uppdaterades utan problem.",
"Could not update the private key password. Maybe the old password was not correct." => "Kunde inte uppdatera lösenordet för den privata nyckeln. Kanske var det gamla lösenordet fel.",
"Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app." => "Krypteringsprogrammet kunde inte initieras! Möjligen blev krypteringsprogrammet återaktiverad under din session. Försök med att logga ut och in igen för att initiera krypteringsprogrammet.",
+"Your private key is not valid! Likely your password was changed outside of %s (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Din privata lösenordsnyckel är inte giltig! Troligen har ditt lösenord ändrats utanför %s (t.ex. i företagets katalogtjänst). Du kan uppdatera den privata lösenordsnyckeln under dina personliga inställningar för att återfå tillgång till dina filer.",
"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." => "Kan ej dekryptera denna fil, förmodligen är det en delad fil. Be ägaren av filen att dela den med dig.",
"Unknown error please check your system settings or contact your administrator" => "Oväntat fel, kolla dina system inställningar eller kontakta din administratör",
"Missing requirements." => "Krav som saknas",
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 897b5d46620..17bcac5c585 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -225,7 +225,7 @@ class Helper {
* @return bool
*/
public static function isPublicAccess() {
- if (strpos($_SERVER['HTTP_REFERER'], 'public.php') !== false) {
+ if (\OCP\User::getUser() === false) {
return true;
} else {
return false;
@@ -253,21 +253,21 @@ class Helper {
}
/**
- * @brief get user from the path, because we can't assume that \OCP\User::getUser()
- * will always return the right result
- * @param type $path
- * @return boolean
+ * @brief try to get the user from the path if no user is logged in
+ * @param string $path
+ * @return mixed user or false if we couldn't determine a user
*/
public static function getUser($path) {
$user = \OCP\User::getUser();
- // if we are logged in and if we don't come from a public URL, then we return the userid
- if ($user && strpos($_SERVER['HTTP_REFERER'], 'public.php') === false) {
+
+ // if we are logged in, then we return the userid
+ if ($user) {
return $user;
}
- // ...otherwise we try to access a publically shared files.
+ // if no user is logged in we try to access a publicly shared files.
// In this case we need to try to get the user from the path
$trimmed = ltrim($path, '/');
@@ -288,10 +288,10 @@ class Helper {
}
/**
- * @brief get path to the correspondig file in data/user/files if path points
+ * @brief get path to the corresponding file in data/user/files if path points
* to a version or to a file in cache
* @param string $path path to a version or a file in the trash
- * @return string path to correspondig file relative to data/user/files
+ * @return string path to corresponding file relative to data/user/files
*/
public static function getPathToRealFile($path) {
$trimmed = ltrim($path, '/');
diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php
index b1832b667d6..b2c756894b4 100755
--- a/apps/files_encryption/lib/keymanager.php
+++ b/apps/files_encryption/lib/keymanager.php
@@ -114,14 +114,12 @@ class Keymanager {
* @param \OC_FilesystemView $view
* @param \OCA\Encryption\Util $util
* @param string $path relative path of the file, including filename
- * @param $userId
- * @param $catfile
- * @internal param string $key
+ * @param string $catfile keyfile content
* @return bool true/false
* @note The keyfile is not encrypted here. Client code must
* asymmetrically encrypt the keyfile before passing it to this method
*/
- public static function setFileKey(\OC_FilesystemView $view, $util, $path, $userId, $catfile) {
+ public static function setFileKey(\OC_FilesystemView $view, $util, $path, $catfile) {
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
@@ -178,7 +176,7 @@ class Keymanager {
* @note The keyfile returned is asymmetrically encrypted. Decryption
* of the keyfile must be performed by client code
*/
- public static function getFileKey(\OC_FilesystemView $view, $util, $filePath) {
+ public static function getFileKey($view, $util, $filePath) {
list($owner, $filename) = $util->getUidAndFilename($filePath);
@@ -215,13 +213,12 @@ class Keymanager {
* @brief Delete a keyfile
*
* @param \OC_FilesystemView $view
- * @param string $userId username
* @param string $path path of the file the key belongs to
* @return bool Outcome of unlink operation
* @note $path must be relative to data/user/files. e.g. mydoc.txt NOT
* /data/admin/files/mydoc.txt
*/
- public static function deleteFileKey(\OC_FilesystemView $view, $userId, $path) {
+ public static function deleteFileKey(\OC_FilesystemView $view, $path) {
$trimmed = ltrim($path, '/');
@@ -364,7 +361,6 @@ class Keymanager {
* @param string $userId
* @param \OCA\Encryption\Util $util
* @param string $filePath
- * @internal param \OCA\Encryption\file $string name
* @return string file key or false
* @note The sharekey returned is encrypted. Decryption
* of the keyfile must be performed by client code
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 426d92f41de..5ba3bfa784f 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -203,7 +203,7 @@ class Proxy extends \OC_FileProxy {
list($owner, $ownerPath) = $util->getUidAndFilename($relativePath);
// Delete keyfile & shareKey so it isn't orphaned
- if (!Keymanager::deleteFileKey($view, $owner, $ownerPath)) {
+ if (!Keymanager::deleteFileKey($view, $ownerPath)) {
\OCP\Util::writeLog('Encryption library',
'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OCP\Util::ERROR);
}
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index b22bc726234..7a37d2200a4 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -103,7 +103,7 @@ class Stream {
$util = new Util($this->rootView, $this->userId);
- // get the key ID which we want to use, canm be the users key or the
+ // get the key ID which we want to use, can be the users key or the
// public share key
$this->keyId = $util->getKeyId();
@@ -528,7 +528,7 @@ class Stream {
$this->encKeyfiles = Crypt::multiKeyEncrypt($this->plainKey, $publicKeys);
// Save the new encrypted file key
- Keymanager::setFileKey($this->rootView, $util, $this->relPath, $this->keyId, $this->encKeyfiles['data']);
+ Keymanager::setFileKey($this->rootView, $util, $this->relPath, $this->encKeyfiles['data']);
// Save the sharekeys
Keymanager::setShareKeys($this->rootView, $util, $this->relPath, $this->encKeyfiles['keys']);
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index c84033802cf..33ab3f56965 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1093,7 +1093,7 @@ class Util {
// Save the recrypted key to it's owner's keyfiles directory
// Save new sharekeys to all necessary user directory
if (
- !Keymanager::setFileKey($this->view, $this, $filePath, $fileOwner, $multiEncKey['data'])
+ !Keymanager::setFileKey($this->view, $this, $filePath, $multiEncKey['data'])
|| !Keymanager::setShareKeys($this->view, $this, $filePath, $multiEncKey['keys'])
) {
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 0086371d223..ca14e3e2ccb 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -201,7 +201,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
// Teardown
$this->view->unlink($this->userId . '/files/' . $filename);
- Encryption\Keymanager::deleteFileKey($this->view, $this->userId, $filename);
+ Encryption\Keymanager::deleteFileKey($this->view, $filename);
}
/**
@@ -287,7 +287,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->view->unlink($this->userId . '/files/' . $filename);
- Encryption\Keymanager::deleteFileKey($this->view, $this->userId, $filename);
+ Encryption\Keymanager::deleteFileKey($this->view, $filename);
}
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 72ee270ee59..1467979f005 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -153,7 +153,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
$this->view->file_put_contents($this->userId . '/files/' . $file, $this->dataShort);
- Encryption\Keymanager::setFileKey($this->view, $util, $file, $this->userId, $key);
+ Encryption\Keymanager::setFileKey($this->view, $util, $file, $key);
$this->assertTrue($this->view->file_exists('/' . $this->userId . '/files_encryption/keyfiles/' . $file . '.key'));
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index 9650f809041..87638271f0e 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -302,6 +302,7 @@ class smb {
}
function rename ($url_from, $url_to) {
+ $replace = false;
list ($from, $to) = array (smb::parse_url($url_from), smb::parse_url($url_to));
if ($from['host'] <> $to['host'] ||
$from['share'] <> $to['share'] ||
@@ -314,7 +315,20 @@ class smb {
trigger_error('rename(): error in URL', E_USER_ERROR);
}
smb::clearstatcache ($url_from);
- $result = smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
+ $cmd = '';
+ // check if target file exists
+ if (smb::url_stat($url_to)) {
+ // delete target file first
+ $cmd = 'del "' . $to['path'] . '"; ';
+ $replace = true;
+ }
+ $cmd .= 'rename "' . $from['path'] . '" "' . $to['path'] . '"';
+ $result = smb::execute($cmd, $to);
+ if ($replace) {
+ // clear again, else the cache will return the info
+ // from the old file
+ smb::clearstatcache ($url_to);
+ }
return $result !== false;
}
diff --git a/apps/files_external/l10n/ar.php b/apps/files_external/l10n/ar.php
index 055c6895823..338526d2afd 100644
--- a/apps/files_external/l10n/ar.php
+++ b/apps/files_external/l10n/ar.php
@@ -1,6 +1,7 @@
<?php
$TRANSLATIONS = array(
"Folder name" => "اسم المجلد",
+"Options" => "خيارات",
"All Users" => "كل المستخدمين",
"Groups" => "مجموعات",
"Users" => "المستخدمين",
diff --git a/apps/files_external/l10n/ru_RU.php b/apps/files_external/l10n/ru_RU.php
new file mode 100644
index 00000000000..d517597f59c
--- /dev/null
+++ b/apps/files_external/l10n/ru_RU.php
@@ -0,0 +1,6 @@
+<?php
+$TRANSLATIONS = array(
+"Options" => "Опции",
+"Delete" => "Удалить"
+);
+$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index c08a266b48c..9a682fb2d48 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -300,14 +300,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
- public function isReadable($path) {
- return true;
- }
-
- public function isUpdatable($path) {
- return true;
- }
-
public function unlink($path) {
$path = $this->normalizePath($path);
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 43643076519..aaa6c5be1a0 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -266,6 +266,11 @@ class OC_Mount_Config {
$mountType,
$applicable,
$isPersonal = false) {
+ $mountPoint = OC\Files\Filesystem::normalizePath($mountPoint);
+ if ($mountPoint === '' || $mountPoint === '/' || $mountPoint == '/Shared') {
+ // can't mount at root or "Shared" folder
+ return false;
+ }
if ($isPersonal) {
// Verify that the mount point applies for the current user
// Prevent non-admin users from mounting local storage
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index b6deab6e5a7..f7d8d98cf03 100755
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -50,6 +50,22 @@ class Dropbox extends \OC\Files\Storage\Common {
}
}
+ private function deleteMetaData($path) {
+ $path = $this->root.$path;
+ if (isset($this->metaData[$path])) {
+ unset($this->metaData[$path]);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @brief Returns the path's metadata
+ * @param $path path for which to return the metadata
+ * @param $list if true, also return the directory's contents
+ * @return directory contents if $list is true, file metadata if $list is
+ * false, null if the file doesn't exist or "false" if the operation failed
+ */
private function getMetaData($path, $list = false) {
$path = $this->root.$path;
if ( ! $list && isset($this->metaData[$path])) {
@@ -62,24 +78,35 @@ class Dropbox extends \OC\Files\Storage\Common {
\OCP\Util::writeLog('files_external', $exception->getMessage(), \OCP\Util::ERROR);
return false;
}
+ $contents = array();
if ($response && isset($response['contents'])) {
- $contents = $response['contents'];
// Cache folder's contents
- foreach ($contents as $file) {
- $this->metaData[$path.'/'.basename($file['path'])] = $file;
+ foreach ($response['contents'] as $file) {
+ if (!isset($file['is_deleted']) || !$file['is_deleted']) {
+ $this->metaData[$path.'/'.basename($file['path'])] = $file;
+ $contents[] = $file;
+ }
}
unset($response['contents']);
+ }
+ if (!isset($response['is_deleted']) || !$response['is_deleted']) {
$this->metaData[$path] = $response;
}
- $this->metaData[$path] = $response;
// Return contents of folder only
return $contents;
} else {
try {
$response = $this->dropbox->getMetaData($path, 'false');
- $this->metaData[$path] = $response;
- return $response;
+ if (!isset($response['is_deleted']) || !$response['is_deleted']) {
+ $this->metaData[$path] = $response;
+ return $response;
+ }
+ return null;
} catch (\Exception $exception) {
+ if ($exception instanceof \Dropbox_Exception_NotFound) {
+ // don't log, might be a file_exist check
+ return false;
+ }
\OCP\Util::writeLog('files_external', $exception->getMessage(), \OCP\Util::ERROR);
return false;
}
@@ -108,7 +135,7 @@ class Dropbox extends \OC\Files\Storage\Common {
public function opendir($path) {
$contents = $this->getMetaData($path, true);
- if ($contents) {
+ if ($contents !== false) {
$files = array();
foreach ($contents as $file) {
$files[] = basename($file['path']);
@@ -146,14 +173,6 @@ class Dropbox extends \OC\Files\Storage\Common {
return false;
}
- public function isReadable($path) {
- return $this->file_exists($path);
- }
-
- public function isUpdatable($path) {
- return $this->file_exists($path);
- }
-
public function file_exists($path) {
if ($path == '' || $path == '/') {
return true;
@@ -165,9 +184,9 @@ class Dropbox extends \OC\Files\Storage\Common {
}
public function unlink($path) {
- $path = $this->root.$path;
try {
- $this->dropbox->delete($path);
+ $this->dropbox->delete($this->root.$path);
+ $this->deleteMetaData($path);
return true;
} catch (\Exception $exception) {
\OCP\Util::writeLog('files_external', $exception->getMessage(), \OCP\Util::ERROR);
@@ -176,10 +195,14 @@ class Dropbox extends \OC\Files\Storage\Common {
}
public function rename($path1, $path2) {
- $path1 = $this->root.$path1;
- $path2 = $this->root.$path2;
try {
- $this->dropbox->move($path1, $path2);
+ // overwrite if target file exists and is not a directory
+ $destMetaData = $this->getMetaData($path2);
+ if (isset($destMetaData) && $destMetaData !== false && !$destMetaData['is_dir']) {
+ $this->unlink($path2);
+ }
+ $this->dropbox->move($this->root.$path1, $this->root.$path2);
+ $this->deleteMetaData($path1);
return true;
} catch (\Exception $exception) {
\OCP\Util::writeLog('files_external', $exception->getMessage(), \OCP\Util::ERROR);
@@ -277,7 +300,12 @@ class Dropbox extends \OC\Files\Storage\Common {
}
public function touch($path, $mtime = null) {
- return false;
+ if ($this->file_exists($path)) {
+ return false;
+ } else {
+ $this->file_put_contents($path, '');
+ }
+ return true;
}
}
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index b63b5885de1..426caf008ec 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -317,10 +317,6 @@ class Google extends \OC\Files\Storage\Common {
}
}
- public function isReadable($path) {
- return $this->file_exists($path);
- }
-
public function isUpdatable($path) {
$file = $this->getDriveFile($path);
if ($file) {
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 7c5aed5aa06..95e0cefa398 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -180,14 +180,6 @@ class SFTP extends \OC\Files\Storage\Common {
return false;
}
- public function isReadable($path) {
- return true;
- }
-
- public function isUpdatable($path) {
- return true;
- }
-
public function file_exists($path) {
try {
return $this->client->stat($this->absPath($path)) !== false;
@@ -293,6 +285,9 @@ class SFTP extends \OC\Files\Storage\Common {
public function rename($source, $target) {
try {
+ if (!$this->is_dir($target) && $this->file_exists($target)) {
+ $this->unlink($target);
+ }
return $this->client->rename(
$this->absPath($source),
$this->absPath($target)
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 4a63dfb6e02..7a1991d4f04 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -38,15 +38,7 @@ abstract class StreamWrapper extends Common {
}
public function filetype($path) {
- return filetype($this->constructUrl($path));
- }
-
- public function isReadable($path) {
- return true; //not properly supported
- }
-
- public function isUpdatable($path) {
- return true; //not properly supported
+ return @filetype($this->constructUrl($path));
}
public function file_exists($path) {
@@ -76,6 +68,7 @@ abstract class StreamWrapper extends Common {
}
} else {
$this->file_put_contents($path, '');
+ return true;
}
}
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index bb650dacc7b..b615d24ce76 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -268,14 +268,6 @@ class Swift extends \OC\Files\Storage\Common {
}
}
- public function isReadable($path) {
- return true;
- }
-
- public function isUpdatable($path) {
- return true;
- }
-
public function unlink($path) {
$path = $this->normalizePath($path);
@@ -372,7 +364,7 @@ class Swift extends \OC\Files\Storage\Common {
'X-Object-Meta-Timestamp' => $mtime
)
);
- $object->Update($settings);
+ return $object->Update($settings);
} else {
$object = $this->container->DataObject();
if (is_null($mtime)) {
@@ -385,7 +377,7 @@ class Swift extends \OC\Files\Storage\Common {
'X-Object-Meta-Timestamp' => $mtime
)
);
- $object->Create($settings);
+ return $object->Create($settings);
}
}
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 9ee7f555285..02f6cb5fc4f 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -134,14 +134,6 @@ class DAV extends \OC\Files\Storage\Common{
}
}
- public function isReadable($path) {
- return true;//not properly supported
- }
-
- public function isUpdatable($path) {
- return true;//not properly supported
- }
-
public function file_exists($path) {
$this->init();
$path=$this->cleanPath($path);
@@ -242,6 +234,7 @@ class DAV extends \OC\Files\Storage\Common{
} else {
$this->file_put_contents($path, '');
}
+ return true;
}
public function getFile($path, $target) {
@@ -323,11 +316,9 @@ class DAV extends \OC\Files\Storage\Common{
}
public function cleanPath($path) {
- if ( ! $path || $path[0]=='/') {
- return substr($path, 1);
- } else {
- return $path;
- }
+ $path = \OC\Files\Filesystem::normalizePath($path);
+ // remove leading slash
+ return substr($path, 1);
}
private function simpleResponse($method, $path, $body, $expected) {
diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php
index e4e598b06b0..4b052282019 100644
--- a/apps/files_external/tests/dropbox.php
+++ b/apps/files_external/tests/dropbox.php
@@ -21,6 +21,22 @@ class Dropbox extends Storage {
$this->instance = new \OC\Files\Storage\Dropbox($this->config['dropbox']);
}
+ public function directoryProvider() {
+ // doesn't support leading/trailing spaces
+ return array(array('folder'));
+ }
+
+ public function testDropboxTouchReturnValue() {
+ $this->assertFalse($this->instance->file_exists('foo'));
+
+ // true because succeeded
+ $this->assertTrue($this->instance->touch('foo'));
+ $this->assertTrue($this->instance->file_exists('foo'));
+
+ // false because not supported
+ $this->assertFalse($this->instance->touch('foo'));
+ }
+
public function tearDown() {
if ($this->instance) {
$this->instance->unlink('/');
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index e146725473a..94ed5630d91 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -34,19 +34,19 @@ class FTP extends Storage {
'password' => 'ftp',
'root' => '/',
'secure' => false );
- $instance = new OC_Filestorage_FTP($config);
+ $instance = new \OC\Files\Storage\FTP($config);
$this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl(''));
$config['secure'] = true;
- $instance = new OC_Filestorage_FTP($config);
+ $instance = new \OC\Files\Storage\FTP($config);
$this->assertEquals('ftps://ftp:ftp@localhost/', $instance->constructUrl(''));
$config['secure'] = 'false';
- $instance = new OC_Filestorage_FTP($config);
+ $instance = new \OC\Files\Storage\FTP($config);
$this->assertEquals('ftp://ftp:ftp@localhost/', $instance->constructUrl(''));
$config['secure'] = 'true';
- $instance = new OC_Filestorage_FTP($config);
+ $instance = new \OC\Files\Storage\FTP($config);
$this->assertEquals('ftps://ftp:ftp@localhost/', $instance->constructUrl(''));
}
}
diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php
new file mode 100644
index 00000000000..941aec680bb
--- /dev/null
+++ b/apps/files_external/tests/mountconfig.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Vincent Petry
+ * Copyright (c) 2013 Vincent Petry <pvince81@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+require_once __DIR__ . '/../../../lib/base.php';
+
+require __DIR__ . '/../lib/config.php';
+
+class Test_Mount_Config_Dummy_Storage {
+ public function test() {
+ return true;
+ }
+}
+
+/**
+ * Class Test_Mount_Config
+ */
+class Test_Mount_Config extends \PHPUnit_Framework_TestCase {
+ /**
+ * Test mount point validation
+ */
+ public function testAddMountPointValidation() {
+ $storageClass = 'Test_Mount_Config_Dummy_Storage';
+ $mountType = 'user';
+ $applicable = 'all';
+ $isPersonal = false;
+ $this->assertEquals(false, OC_Mount_Config::addMountPoint('', $storageClass, array(), $mountType, $applicable, $isPersonal));
+ $this->assertEquals(false, OC_Mount_Config::addMountPoint('/', $storageClass, array(), $mountType, $applicable, $isPersonal));
+ $this->assertEquals(false, OC_Mount_Config::addMountPoint('Shared', $storageClass, array(), $mountType, $applicable, $isPersonal));
+ $this->assertEquals(false, OC_Mount_Config::addMountPoint('/Shared', $storageClass, array(), $mountType, $applicable, $isPersonal));
+
+ }
+}
diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index 0291f293fa6..199e35af676 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -29,6 +29,11 @@ class SMB extends Storage {
}
}
+ public function directoryProvider() {
+ // doesn't support leading/trailing spaces
+ return array(array('folder'));
+ }
+
public function testRenameWithSpaces() {
$this->instance->mkdir('with spaces');
$result = $this->instance->rename('with spaces', 'foo bar');
diff --git a/apps/files_sharing/l10n/cs_CZ.php b/apps/files_sharing/l10n/cs_CZ.php
index 192c4a79572..adf099a6d94 100644
--- a/apps/files_sharing/l10n/cs_CZ.php
+++ b/apps/files_sharing/l10n/cs_CZ.php
@@ -14,6 +14,7 @@ $TRANSLATIONS = array(
"Download" => "Stáhnout",
"Upload" => "Odeslat",
"Cancel upload" => "Zrušit odesílání",
-"No preview available for" => "Náhled není dostupný pro"
+"No preview available for" => "Náhled není dostupný pro",
+"Direct link" => "Přímý odkaz"
);
$PLURAL_FORMS = "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;";
diff --git a/apps/files_sharing/l10n/el.php b/apps/files_sharing/l10n/el.php
index 4584e261b01..79387a91472 100644
--- a/apps/files_sharing/l10n/el.php
+++ b/apps/files_sharing/l10n/el.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"This share is password-protected" => "Αυτός ο κοινόχρηστος φάκελος προστατεύεται με κωδικό",
"The password is wrong. Try again." => "Εσφαλμένο συνθηματικό. Προσπαθήστε ξανά.",
"Password" => "Συνθηματικό",
"Sorry, this link doesn’t seem to work anymore." => "Συγγνώμη, αυτός ο σύνδεσμος μοιάζει να μην ισχύει πια.",
@@ -13,6 +14,7 @@ $TRANSLATIONS = array(
"Download" => "Λήψη",
"Upload" => "Μεταφόρτωση",
"Cancel upload" => "Ακύρωση αποστολής",
-"No preview available for" => "Δεν υπάρχει διαθέσιμη προεπισκόπηση για"
+"No preview available for" => "Δεν υπάρχει διαθέσιμη προεπισκόπηση για",
+"Direct link" => "Άμεσος σύνδεσμος"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index f8091967012..f4042f65248 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -218,6 +218,8 @@ if (isset($path)) {
$breadcrumbNav->assign('breadcrumb', $breadcrumb);
$breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path=');
$maxUploadFilesize=OCP\Util::maxUploadFilesize($path);
+ $fileHeader = (!isset($files) or count($files) > 0);
+ $emptyContent = ($allowPublicUploadEnabled and !$fileHeader);
$folder = new OCP\Template('files', 'index', '');
$folder->assign('fileList', $list->fetchPage());
$folder->assign('breadcrumb', $breadcrumbNav->fetchPage());
@@ -231,6 +233,11 @@ if (isset($path)) {
$folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$folder->assign('usedSpacePercent', 0);
+ $folder->assign('fileHeader', $fileHeader);
+ $folder->assign('disableSharing', true);
+ $folder->assign('trash', false);
+ $folder->assign('emptyContent', $emptyContent);
+ $folder->assign('ajaxLoad', false);
$tmpl->assign('folder', $folder->fetchPage());
$maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true)
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 92361b65f63..5498250dbf5 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -3,10 +3,19 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
-$files = $_POST['files'];
-$dirlisting = $_POST['dirlisting'];
-$list = json_decode($files);
-
+// "empty trash" command
+$deleteAll = false;
+if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
+ $user = \OCP\User::getUser();
+ $list = OCA\Files_Trashbin\Helper::getTrashFiles('/');
+ $deleteAll = true;
+ $dirlisting = '0';
+}
+else {
+ $files = $_POST['files'];
+ $dirlisting = $_POST['dirlisting'];
+ $list = json_decode($files);
+}
$error = array();
$success = array();
@@ -14,22 +23,30 @@ $success = array();
$i = 0;
foreach ($list as $file) {
if ( $dirlisting === '0') {
- $delimiter = strrpos($file, '.d');
- $filename = substr($file, 0, $delimiter);
- $timestamp = substr($file, $delimiter+2);
+ if ($deleteAll) {
+ $filename = $file['name'];
+ $timestamp = $file['timestamp'];
+ }
+ else {
+ $delimiter = strrpos($file, '.d');
+ $filename = substr($file, 0, $delimiter);
+ $timestamp = substr($file, $delimiter+2);
+ }
} else {
$filename = $file;
$timestamp = null;
}
OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp);
- if (!OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) {
+ if (OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) {
+ $error[] = $filename;
+ OC_Log::write('trashbin','can\'t delete ' . $filename . ' permanently.', OC_Log::ERROR);
+ }
+ // only list deleted files if not deleting everything
+ else if (!$deleteAll) {
$success[$i]['filename'] = $file;
$success[$i]['timestamp'] = $timestamp;
$i++;
- } else {
- $error[] = $filename;
- OC_Log::write('trashbin','can\'t delete ' . $filename . ' permanently.', OC_Log::ERROR);
}
}
diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml
index e9cbdafc1cd..2cc7d9a7ac3 100644
--- a/apps/files_trashbin/appinfo/info.xml
+++ b/apps/files_trashbin/appinfo/info.xml
@@ -6,7 +6,7 @@
ownCloud keeps a copy of your deleted files in case you need them again.
To make sure that the user doesn't run out of memory the deleted files app
manages the size of the deleted files for the user. By default deleted files
- stay in the trash bin for 180 days. ownCloud checks the age of the files
+ stay in the trash bin for 90 days. ownCloud checks the age of the files
every time a new files gets moved to the deleted files and remove all files
older than 180 days. The user can adjust this value in the config.php by
setting the "trashbin_retention_obligation" value.
diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js
index cd5a67ddfe0..f42abb6d029 100644
--- a/apps/files_trashbin/js/filelist.js
+++ b/apps/files_trashbin/js/filelist.js
@@ -22,3 +22,10 @@ FileList.reload = function(){
FileList.linkTo = function(dir){
return OC.linkTo('files_trashbin', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/');
}
+
+FileList.updateEmptyContent = function(){
+ var $fileList = $('#fileList');
+ var exists = $fileList.find('tr:first').exists();
+ $('#emptycontent').toggleClass('hidden', exists);
+ $('#filestable th').toggleClass('hidden', !exists);
+}
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 4e6a1e93fa4..84c23d66992 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -19,6 +19,7 @@ $(document).ready(function() {
}
enableActions();
FileList.updateFileSummary();
+ FileList.updateEmptyContent();
}
);
@@ -45,6 +46,7 @@ $(document).ready(function() {
}
enableActions();
FileList.updateFileSummary();
+ FileList.updateEmptyContent();
}
);
@@ -122,34 +124,60 @@ $(document).ready(function() {
}
enableActions();
FileList.updateFileSummary();
+ FileList.updateEmptyContent();
}
);
});
$('.delete').click('click', function(event) {
event.preventDefault();
- var files = getSelectedFiles('file');
- var fileslist = JSON.stringify(files);
- var dirlisting = getSelectedFiles('dirlisting')[0];
+ var allFiles = $('#select_all').is(':checked');
+ var files = [];
+ var params = {};
+ if (allFiles) {
+ params = {
+ allfiles: true
+ };
+ }
+ else {
+ files = getSelectedFiles('file');
+ params = {
+ files: JSON.stringify(files),
+ dirlisting: getSelectedFiles('dirlisting')[0]
+ };
+ };
disableActions();
- for (var i = 0; i < files.length; i++) {
- var deleteAction = $('tr').filterAttr('data-file', files[i]).children("td.date").children(".action.delete");
- deleteAction.removeClass('delete-icon').addClass('progress-icon');
+ if (allFiles) {
+ FileList.showMask();
+ }
+ else {
+ for (var i = 0; i < files.length; i++) {
+ var deleteAction = $('tr').filterAttr('data-file', files[i]).children("td.date").children(".action.delete");
+ deleteAction.removeClass('delete-icon').addClass('progress-icon');
+ }
}
$.post(OC.filePath('files_trashbin', 'ajax', 'delete.php'),
- {files: fileslist, dirlisting: dirlisting},
+ params,
function(result) {
- for (var i = 0; i < result.data.success.length; i++) {
- var row = document.getElementById(result.data.success[i].filename);
- row.parentNode.removeChild(row);
+ if (allFiles) {
+ FileList.hideMask();
+ // simply remove all files
+ $('#fileList').empty();
+ }
+ else {
+ for (var i = 0; i < result.data.success.length; i++) {
+ var row = document.getElementById(result.data.success[i].filename);
+ row.parentNode.removeChild(row);
+ }
}
if (result.status !== 'success') {
OC.dialogs.alert(result.data.message, t('core', 'Error'));
}
enableActions();
FileList.updateFileSummary();
+ FileList.updateEmptyContent();
}
);
diff --git a/apps/files_trashbin/l10n/ru_RU.php b/apps/files_trashbin/l10n/ru_RU.php
index 3129ff95eb4..dfc99f594fd 100644
--- a/apps/files_trashbin/l10n/ru_RU.php
+++ b/apps/files_trashbin/l10n/ru_RU.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
-"Error" => "Ошибка"
+"Error" => "Ошибка",
+"Delete" => "Удалить"
);
$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index 15ba074e45e..f9264d4352c 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -4,9 +4,7 @@
</div>
<div id='notification'></div>
-<?php if (isset($_['files']) && count($_['files']) === 0 && $_['dirlisting'] === false && !$_['ajaxLoad']):?>
- <div id="emptycontent"><?php p($l->t('Nothing in here. Your trash bin is empty!'))?></div>
-<?php endif; ?>
+<div id="emptycontent" <?php if (!(isset($_['files']) && count($_['files']) === 0 && $_['dirlisting'] === false && !$_['ajaxLoad'])):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Your trash bin is empty!'))?></div>
<input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" />
<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input>
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 661e98b09d5..b03e1d4e93a 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -318,22 +318,21 @@ class Storage {
* @return size of vesions
*/
private static function calculateSize($uid) {
- if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
- $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
- $versionsRoot = $versions_fileview->getLocalFolder('');
-
- $iterator = new \RecursiveIteratorIterator(
- new \RecursiveDirectoryIterator($versionsRoot),
- \RecursiveIteratorIterator::CHILD_FIRST
- );
+ if (\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED) == 'true') {
+ $view = new \OC\Files\View('/' . $uid . '/files_versions');
$size = 0;
- foreach ($iterator as $path) {
- if ( preg_match('/^.+\.v(\d+)$/', $path, $match) ) {
- $relpath = substr($path, strlen($versionsRoot)-1);
- $size += $versions_fileview->filesize($relpath);
+ $dirContent = $view->getDirectoryContent('/');
+
+ while (!empty($dirContent)) {
+ $path = reset($dirContent);
+ if ($path['type'] === 'dir') {
+ $dirContent = array_merge($dirContent, $view->getDirectoryContent(substr($path['path'], strlen('files_versions'))));
+ } else {
+ $size += $view->filesize(substr($path['path'], strlen('files_versions')));
}
+ unset($dirContent[key($dirContent)]);
}
return $size;
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php
index e580c097867..ad75a384369 100644
--- a/apps/user_ldap/ajax/wizard.php
+++ b/apps/user_ldap/ajax/wizard.php
@@ -53,8 +53,11 @@ switch($action) {
case 'determineGroupsForGroups':
case 'determineAttributes':
case 'getUserListFilter':
+ case 'getLoginFilterMode':
case 'getUserLoginFilter':
+ case 'getUserFilterMode':
case 'getGroupFilter':
+ case 'getGroupFilterMode':
case 'countUsers':
case 'countGroups':
try {
@@ -87,6 +90,9 @@ switch($action) {
exit;
}
$configuration->saveConfiguration();
+ //clear the cache on save
+ $connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, $prefix);
+ $connection->clearCache();
OCP\JSON::success();
break;
default:
diff --git a/apps/user_ldap/group_proxy.php b/apps/user_ldap/group_proxy.php
index acc563c9532..4404bd7fe3a 100644
--- a/apps/user_ldap/group_proxy.php
+++ b/apps/user_ldap/group_proxy.php
@@ -67,16 +67,17 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
* @param $gid string, the gid connected to the request
* @param $method string, the method of the group backend that shall be called
* @param $parameters an array of parameters to be passed
+ * @param $passOnWhen the result matches this variable
* @return mixed, the result of the method or false
*/
- protected function callOnLastSeenOn($gid, $method, $parameters) {
+ protected function callOnLastSeenOn($gid, $method, $parameters, $passOnWhen) {
$cacheKey = $this->getGroupCacheKey($gid);;
$prefix = $this->getFromCache($cacheKey);
//in case the uid has been found in the past, try this stored connection first
if(!is_null($prefix)) {
if(isset($this->backends[$prefix])) {
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
- if(!$result) {
+ if($result === $passOnWhen) {
//not found here, reset cache to null if group vanished
//because sometimes methods return false with a reason
$groupExists = call_user_func_array(
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index 2fa0ed066c4..5b5f2030635 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -120,7 +120,7 @@ var LdapConfiguration = {
clearMappings: function(mappingSubject) {
$.post(
OC.filePath('user_ldap','ajax','clearMappings.php'),
- 'ldap_clear_mapping='+mappingSubject,
+ 'ldap_clear_mapping='+encodeURIComponent(mappingSubject),
function(result) {
if(result.status == 'success') {
OC.dialogs.info(
@@ -143,6 +143,8 @@ var LdapWizard = {
saveBlacklist: {},
userFilterGroupSelectState: 'enable',
spinner: '<img class="wizSpinner" src="'+ OC.imagePath('core', 'loading.gif') +'">',
+ filterModeAssisted: 0,
+ filterModeRaw: 1,
ajax: function(param, fnOnSuccess, fnOnError) {
$.post(
@@ -160,10 +162,7 @@ var LdapWizard = {
applyChanges: function (result) {
for (id in result.changes) {
- if(!$.isArray(result.changes[id])) {
- //no need to blacklist multiselect
- LdapWizard.saveBlacklist[id] = true;
- }
+ LdapWizard.blacklistAdd(id);
if(id.indexOf('count') > 0) {
$('#'+id).text(result.changes[id]);
} else {
@@ -195,6 +194,25 @@ var LdapWizard = {
}
},
+
+ blacklistAdd: function(id) {
+ obj = $('#'+id);
+ if(!(obj[0].hasOwnProperty('multiple') && obj[0]['multiple'] == true)) {
+ //no need to blacklist multiselect
+ LdapWizard.saveBlacklist[id] = true;
+ return true;
+ }
+ return false;
+ },
+
+ blacklistRemove: function(id) {
+ if(LdapWizard.saveBlacklist.hasOwnProperty(id)) {
+ delete LdapWizard.saveBlacklist[id];
+ return true;
+ }
+ return false;
+ },
+
checkBaseDN: function() {
host = $('#ldap_host').val();
port = $('#ldap_port').val();
@@ -204,7 +222,8 @@ var LdapWizard = {
//FIXME: determine base dn with anonymous access
if(host && port && user && pass) {
param = 'action=guessBaseDN'+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.showSpinner('#ldap_base');
$('#ldap_base').prop('disabled', 'disabled');
@@ -232,7 +251,8 @@ var LdapWizard = {
if(host && !port) {
param = 'action=guessPortAndTLS'+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.showSpinner('#ldap_port');
$('#ldap_port').prop('disabled', 'disabled');
@@ -256,6 +276,12 @@ var LdapWizard = {
},
composeFilter: function(type) {
+ subject = type.charAt(0).toUpperCase() + type.substr(1);
+ if(!$('#raw'+subject+'FilterContainer').hasClass('invisible')) {
+ //Raw filter editing, i.e. user defined filter, don't compose
+ return;
+ }
+
if(type == 'user') {
action = 'getUserListFilter';
} else if(type == 'login') {
@@ -265,7 +291,8 @@ var LdapWizard = {
}
param = 'action='+action+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.ajax(param,
function(result) {
@@ -323,7 +350,8 @@ var LdapWizard = {
_countThings: function(method) {
param = 'action='+method+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.ajax(param,
function(result) {
@@ -345,7 +373,8 @@ var LdapWizard = {
detectGroupMemberAssoc: function() {
param = 'action=determineGroupMemberAssoc'+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.ajax(param,
function(result) {
@@ -359,7 +388,8 @@ var LdapWizard = {
findAttributes: function() {
param = 'action=determineAttributes'+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.showSpinner('#ldap_loginfilter_attributes');
LdapWizard.ajax(param,
@@ -374,7 +404,9 @@ var LdapWizard = {
LdapWizard.hideSpinner('#ldap_loginfilter_attributes');
LdapWizard.applyChanges(result);
$('#ldap_loginfilter_attributes').multiselect('refresh');
- $('#ldap_loginfilter_attributes').multiselect('enable');
+ if($('#rawLoginFilterContainer').hasClass('invisible')) {
+ $('#ldap_loginfilter_attributes').multiselect('enable');
+ }
},
function (result) {
//deactivate if no attributes found
@@ -390,8 +422,9 @@ var LdapWizard = {
if(type != 'Users' && type != 'Groups') {
return false;
}
- param = 'action=determineGroupsFor'+type+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ param = 'action=determineGroupsFor'+encodeURIComponent(type)+
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.showSpinner('#'+multisel);
LdapWizard.ajax(param,
@@ -405,7 +438,11 @@ var LdapWizard = {
LdapWizard.hideSpinner('#'+multisel);
LdapWizard.applyChanges(result);
$('#'+multisel).multiselect('refresh');
- $('#'+multisel).multiselect('enable');
+ part = type.slice(0, -1);
+ if($('#raw' + part + 'FilterContainer').hasClass('invisible')) {
+ //enable only when raw filter editing is not turned on
+ $('#'+multisel).multiselect('enable');
+ }
},
function (result) {
LdapWizard.hideSpinner('#'+multisel);
@@ -418,8 +455,9 @@ var LdapWizard = {
if(type != 'User' && type != 'Group') {
return false;
}
- param = 'action=determine'+type+'ObjectClasses'+
- '&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
+ param = 'action=determine'+encodeURIComponent(type)+'ObjectClasses'+
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.showSpinner('#'+multisel);
LdapWizard.ajax(param,
@@ -485,15 +523,15 @@ var LdapWizard = {
},
initGroupFilter: function() {
+ LdapWizard.regardFilterMode('Group');
LdapWizard.findObjectClasses('ldap_groupfilter_objectclass', 'Group');
LdapWizard.findAvailableGroups('ldap_groupfilter_groups', 'Groups');
- LdapWizard.composeFilter('group');
LdapWizard.countGroups();
},
initLoginFilter: function() {
+ LdapWizard.regardFilterMode('Login');
LdapWizard.findAttributes();
- LdapWizard.composeFilter('login');
},
initMultiSelect: function(object, id, caption) {
@@ -509,9 +547,9 @@ var LdapWizard = {
},
initUserFilter: function() {
+ LdapWizard.regardFilterMode('User');
LdapWizard.findObjectClasses('ldap_userfilter_objectclass', 'User');
LdapWizard.findAvailableGroups('ldap_userfilter_groups', 'Users');
- LdapWizard.composeFilter('user');
LdapWizard.countUsers();
},
@@ -566,9 +604,36 @@ var LdapWizard = {
}
},
+ regardFilterMode: function(subject) {
+ param = 'action=get'+encodeURIComponent(subject)+'FilterMode'+
+ '&ldap_serverconfig_chooser='+
+ encodeURIComponent($('#ldap_serverconfig_chooser').val());
+
+ LdapWizard.ajax(param,
+ function(result) {
+ property = 'ldap' + subject + 'FilterMode';
+ mode = result.changes[property];
+ if(mode == LdapWizard.filterModeRaw
+ && $('#raw'+subject+'FilterContainer').hasClass('invisible')) {
+ LdapWizard['toggleRaw'+subject+'Filter']();
+ } else if(mode == LdapWizard.filterModeAssisted
+ && !$('#raw'+subject+'FilterContainer').hasClass('invisible')) {
+ LdapWizard['toggleRaw'+subject+'Filter']();
+ } else {
+ c = $('#raw'+subject+'FilterContainer').hasClass('invisible');
+ }
+ },
+ function (result) {
+ //on error case get back to default i.e. Assisted
+ if(!$('#raw'+subject+'FilterContainer').hasClass('invisible')) {
+ LdapWizard['toggleRaw'+subject+'Filter']();
+ }
+ }
+ );
+ },
+
save: function(inputObj) {
- if(LdapWizard.saveBlacklist.hasOwnProperty(inputObj.id)) {
- delete LdapWizard.saveBlacklist[inputObj.id];
+ if(LdapWizard.blacklistRemove(inputObj.id)) {
return;
}
if($(inputObj).is('input[type=checkbox]')
@@ -601,8 +666,8 @@ var LdapWizard = {
},
_save: function(object, value) {
- param = 'cfgkey='+object.id+
- '&cfgval='+value+
+ param = 'cfgkey='+encodeURIComponent(object.id)+
+ '&cfgval='+encodeURIComponent(value)+
'&action=save'+
'&ldap_serverconfig_chooser='+$('#ldap_serverconfig_chooser').val();
@@ -632,7 +697,9 @@ var LdapWizard = {
}
},
- toggleRawFilter: function(container, moc, mg, stateVar) {
+ toggleRawFilter: function(container, moc, mg, stateVar, modeKey) {
+ //moc = multiselect objectclass
+ //mg = mutliselect groups
if($(container).hasClass('invisible')) {
$(container).removeClass('invisible');
$(moc).multiselect('disable');
@@ -642,26 +709,62 @@ var LdapWizard = {
LdapWizard[stateVar] = 'enable';
}
$(mg).multiselect('disable');
+ LdapWizard._save({ id: modeKey }, LdapWizard.filterModeRaw);
} else {
$(container).addClass('invisible');
$(mg).multiselect(LdapWizard[stateVar]);
$(moc).multiselect('enable');
+ LdapWizard._save({ id: modeKey }, LdapWizard.filterModeAssisted);
+ if(moc.indexOf('user') >= 0) {
+ LdapWizard.blacklistRemove('ldap_userlist_filter');
+ LdapWizard.composeFilter('user');
+ } else {
+ LdapWizard.blacklistRemove('ldap_group_filter');
+ LdapWizard.composeFilter('group');
+ }
}
},
toggleRawGroupFilter: function() {
+ LdapWizard.blacklistRemove('ldap_group_filter');
LdapWizard.toggleRawFilter('#rawGroupFilterContainer',
'#ldap_groupfilter_objectclass',
'#ldap_groupfilter_groups',
- 'groupFilterGroupSelectState'
+ 'groupFilterGroupSelectState',
+ 'ldapGroupFilterMode'
);
},
+ toggleRawLoginFilter: function() {
+ LdapWizard.blacklistRemove('ldap_login_filter');
+ container = '#rawLoginFilterContainer';
+ if($(container).hasClass('invisible')) {
+ $(container).removeClass('invisible');
+ action = 'disable';
+ property = 'disabled';
+ mode = LdapWizard.filterModeRaw;
+ } else {
+ $(container).addClass('invisible');
+ action = 'enable';
+ property = false;
+ mode = LdapWizard.filterModeAssisted;
+ }
+ $('#ldap_loginfilter_attributes').multiselect(action);
+ $('#ldap_loginfilter_email').prop('disabled', property);
+ $('#ldap_loginfilter_username').prop('disabled', property);
+ LdapWizard._save({ id: 'ldapLoginFilterMode' }, mode);
+ if(action == 'enable') {
+ LdapWizard.composeFilter('login');
+ }
+ },
+
toggleRawUserFilter: function() {
+ LdapWizard.blacklistRemove('ldap_userlist_filter');
LdapWizard.toggleRawFilter('#rawUserFilterContainer',
'#ldap_userfilter_objectclass',
'#ldap_userfilter_groups',
- 'userFilterGroupSelectState'
+ 'userFilterGroupSelectState',
+ 'ldapUserFilterMode'
);
},
@@ -722,6 +825,7 @@ $(document).ready(function() {
$('.lwautosave').change(function() { LdapWizard.save(this); });
$('#toggleRawUserFilter').click(LdapWizard.toggleRawUserFilter);
$('#toggleRawGroupFilter').click(LdapWizard.toggleRawGroupFilter);
+ $('#toggleRawLoginFilter').click(LdapWizard.toggleRawLoginFilter);
LdapConfiguration.refreshConfig();
$('.ldap_action_continue').click(function(event) {
event.preventDefault();
diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php
index 2c5358d6c77..bcc0a6ed872 100644
--- a/apps/user_ldap/l10n/ca.php
+++ b/apps/user_ldap/l10n/ca.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "s'han eliminat els mapatges",
"Success" => "Èxit",
"Error" => "Error",
+"Configuration OK" => "Configuració correcte",
+"Configuration incorrect" => "Configuració incorrecte",
+"Configuration incomplete" => "Configuració incompleta",
"Select groups" => "Selecciona els grups",
"Select object classes" => "Seleccioneu les classes dels objectes",
"Select attributes" => "Seleccioneu els atributs",
diff --git a/apps/user_ldap/l10n/cs_CZ.php b/apps/user_ldap/l10n/cs_CZ.php
index 306889781c4..b429e41281b 100644
--- a/apps/user_ldap/l10n/cs_CZ.php
+++ b/apps/user_ldap/l10n/cs_CZ.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "mapování zrušeno",
"Success" => "Úspěch",
"Error" => "Chyba",
+"Configuration OK" => "Konfigurace v pořádku",
+"Configuration incorrect" => "Nesprávná konfigurace",
+"Configuration incomplete" => "Nekompletní konfigurace",
"Select groups" => "Vyberte skupiny",
"Select object classes" => "Výběr objektových tříd",
"Select attributes" => "Výběr atributů",
@@ -26,12 +29,18 @@ $TRANSLATIONS = array(
"_%s group found_::_%s groups found_" => array("nalezena %s skupina","nalezeny %s skupiny","nalezeno %s skupin"),
"_%s user found_::_%s users found_" => array("nalezen %s uživatel","nalezeni %s uživatelé","nalezeno %s uživatelů"),
"Invalid Host" => "Neplatný hostitel",
+"Could not find the desired feature" => "Nelze nalézt požadovanou vlastnost",
"Save" => "Uložit",
"Test Configuration" => "Vyzkoušet nastavení",
"Help" => "Nápověda",
+"Limit the access to %s to groups meeting this criteria:" => "Omezit přístup k %s uživatelům splňujícím tyto podmínky:",
"only those object classes:" => "pouze tyto objektové třídy:",
"only from those groups:" => "pouze z těchto skupin:",
+"Edit raw filter instead" => "Edituj filtr přímo",
+"Raw LDAP filter" => "Původní filtr LDAP",
+"The filter specifies which LDAP groups shall have access to the %s instance." => "Filtr určuje, kteří uživatelé LDAP mají mít přístup k %s instanci.",
"groups found" => "nalezené skupiny",
+"What attribute shall be used as login name:" => "Který atribut má být použit jako přihlašovací jméno:",
"LDAP Username:" => "LDAP uživatelské jméno",
"LDAP Email Address:" => "LDAP e-mailová adresa:",
"Other Attributes:" => "Další atributy",
@@ -46,6 +55,7 @@ $TRANSLATIONS = array(
"One Base DN per line" => "Jedna základní DN na řádku",
"You can specify Base DN for users and groups in the Advanced tab" => "V rozšířeném nastavení můžete určit základní DN pro uživatele a skupiny",
"Limit the access to %s to users meeting this criteria:" => "Omezit přístup k %s uživatelům splňujícím tyto podmínky:",
+"The filter specifies which LDAP users shall have access to the %s instance." => "Filtr určuje, kteří uživatelé LDAP mají mít přístup k %s instanci.",
"users found" => "nalezení uživatelé",
"Back" => "Zpět",
"Continue" => "Pokračovat",
diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php
index 15eefd842c2..2aeb5e595bc 100644
--- a/apps/user_ldap/l10n/de.php
+++ b/apps/user_ldap/l10n/de.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "Zuordnungen gelöscht",
"Success" => "Erfolgreich",
"Error" => "Fehler",
+"Configuration OK" => "Konfiguration OK",
+"Configuration incorrect" => "Konfiguration nicht korrekt",
+"Configuration incomplete" => "Konfiguration nicht vollständig",
"Select groups" => "Wähle Gruppen aus",
"Select object classes" => "Objekt-Klassen auswählen",
"Select attributes" => "Attribute auswählen",
diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php
index 0da5307d935..b43ac9048c1 100644
--- a/apps/user_ldap/l10n/de_DE.php
+++ b/apps/user_ldap/l10n/de_DE.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "Zuordnungen gelöscht",
"Success" => "Erfolg",
"Error" => "Fehler",
+"Configuration OK" => "Konfiguration OK",
+"Configuration incorrect" => "Konfiguration nicht korrekt",
+"Configuration incomplete" => "Konfiguration nicht vollständig",
"Select groups" => "Wähle Gruppen",
"Select object classes" => "Objekt-Klassen auswählen",
"Select attributes" => "Attribute auswählen",
diff --git a/apps/user_ldap/l10n/el.php b/apps/user_ldap/l10n/el.php
index 2cd93a4f07f..6a0fc107cff 100644
--- a/apps/user_ldap/l10n/el.php
+++ b/apps/user_ldap/l10n/el.php
@@ -1,5 +1,6 @@
<?php
$TRANSLATIONS = array(
+"Failed to clear the mappings." => "Αποτυχία εκκαθάρισης των αντιστοιχιών.",
"Failed to delete the server configuration" => "Αποτυχία διαγραφής ρυθμίσεων διακομιστή",
"The configuration is valid and the connection could be established!" => "Οι ρυθμίσεις είναι έγκυρες και η σύνδεση μπορεί να πραγματοποιηθεί!",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Οι ρυθμίσεις είναι έγκυρες, αλλά απέτυχε η σύνδεση. Παρακαλώ ελέγξτε τις ρυθμίσεις του διακομιστή και τα διαπιστευτήρια.",
@@ -7,6 +8,7 @@ $TRANSLATIONS = array(
"Take over settings from recent server configuration?" => "Πάρτε πάνω από τις πρόσφατες ρυθμίσεις διαμόρφωσης του διακομιστή?",
"Keep settings?" => "Διατήρηση ρυθμίσεων;",
"Cannot add server configuration" => "Αδυναμία προσθήκης ρυθμίσεων διακομιστή",
+"mappings cleared" => "αντιστοιχίες εκκαθαρίστηκαν",
"Success" => "Επιτυχία",
"Error" => "Σφάλμα",
"Select groups" => "Επιλέξτε ομάδες",
@@ -31,6 +33,7 @@ $TRANSLATIONS = array(
"You can specify Base DN for users and groups in the Advanced tab" => "Μπορείτε να καθορίσετε το Base DN για χρήστες και ομάδες από την καρτέλα Προηγμένες ρυθμίσεις",
"Back" => "Επιστροφή",
"Continue" => "Συνέχεια",
+"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." => "<b>Προσοχή:</b> Οι εφαρμογές user_ldap και user_webdavauth είναι ασύμβατες. Μπορεί να αντιμετωπίσετε απρόβλεπτη συμπεριφορά. Παρακαλώ ζητήστε από τον διαχειριστή συστήματος να απενεργοποιήσει μία από αυτές.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Προσοχή:</b> Το άρθρωμα PHP LDAP δεν είναι εγκατεστημένο και το σύστημα υποστήριξης δεν θα δουλέψει. Παρακαλώ ζητήστε από τον διαχειριστή συστήματος να το εγκαταστήσει.",
"Connection Settings" => "Ρυθμίσεις Σύνδεσης",
"Configuration Active" => "Ενεργοποιηση ρυθμισεων",
@@ -61,6 +64,8 @@ $TRANSLATIONS = array(
"in bytes" => "σε bytes",
"Email Field" => "Email τυπος",
"User Home Folder Naming Rule" => "Χρήστης Προσωπικόςφάκελος Ονομασία Κανόνας ",
-"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Αφήστε το κενό για το όνομα χρήστη (προεπιλογή). Διαφορετικά, συμπληρώστε μία ιδιότητα LDAP/AD."
+"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Αφήστε το κενό για το όνομα χρήστη (προεπιλογή). Διαφορετικά, συμπληρώστε μία ιδιότητα LDAP/AD.",
+"Internal Username" => "Εσωτερικό Όνομα Χρήστη",
+"Internal Username Attribute:" => "Ιδιότητα Εσωτερικού Ονόματος Χρήστη:"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/user_ldap/l10n/en_GB.php b/apps/user_ldap/l10n/en_GB.php
index 325256bc8c2..fb54dcb1b13 100644
--- a/apps/user_ldap/l10n/en_GB.php
+++ b/apps/user_ldap/l10n/en_GB.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "mappings cleared",
"Success" => "Success",
"Error" => "Error",
+"Configuration OK" => "Configuration OK",
+"Configuration incorrect" => "Configuration incorrect",
+"Configuration incomplete" => "Configuration incomplete",
"Select groups" => "Select groups",
"Select object classes" => "Select object classes",
"Select attributes" => "Select attributes",
diff --git a/apps/user_ldap/l10n/es.php b/apps/user_ldap/l10n/es.php
index 804cc9e4f16..ab219e73d8b 100644
--- a/apps/user_ldap/l10n/es.php
+++ b/apps/user_ldap/l10n/es.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "Asignaciones borradas",
"Success" => "Éxito",
"Error" => "Error",
+"Configuration OK" => "Configuración OK",
+"Configuration incorrect" => "Configuración Incorrecta",
+"Configuration incomplete" => "Configuración incompleta",
"Select groups" => "Seleccionar grupos",
"Select object classes" => "Seleccionar la clase de objeto",
"Select attributes" => "Seleccionar atributos",
diff --git a/apps/user_ldap/l10n/et_EE.php b/apps/user_ldap/l10n/et_EE.php
index cf19b062dff..9dda17c3b78 100644
--- a/apps/user_ldap/l10n/et_EE.php
+++ b/apps/user_ldap/l10n/et_EE.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "vastendused puhastatud",
"Success" => "Korras",
"Error" => "Viga",
+"Configuration OK" => "Seadistus on korras",
+"Configuration incorrect" => "Seadistus on vigane",
+"Configuration incomplete" => "Seadistus on puudulik",
"Select groups" => "Vali grupid",
"Select object classes" => "Vali objekti klassid",
"Select attributes" => "Vali atribuudid",
diff --git a/apps/user_ldap/l10n/fr.php b/apps/user_ldap/l10n/fr.php
index d53f78eb36f..64d9dcc47cc 100644
--- a/apps/user_ldap/l10n/fr.php
+++ b/apps/user_ldap/l10n/fr.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "associations supprimées",
"Success" => "Succès",
"Error" => "Erreur",
+"Configuration OK" => "Configuration OK",
+"Configuration incorrect" => "Configuration incorrecte",
+"Configuration incomplete" => "Configuration incomplète",
"Select groups" => "Sélectionnez les groupes",
"Select object classes" => "Sélectionner les classes d'objet",
"Select attributes" => "Sélectionner les attributs",
diff --git a/apps/user_ldap/l10n/gl.php b/apps/user_ldap/l10n/gl.php
index 6d7f8e334be..3f19b0cf223 100644
--- a/apps/user_ldap/l10n/gl.php
+++ b/apps/user_ldap/l10n/gl.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "limpadas as asignacións",
"Success" => "Correcto",
"Error" => "Erro",
+"Configuration OK" => "Configuración correcta",
+"Configuration incorrect" => "Configuración incorrecta",
+"Configuration incomplete" => "Configuración incompleta",
"Select groups" => "Seleccionar grupos",
"Select object classes" => "Seleccione as clases de obxectos",
"Select attributes" => "Seleccione os atributos",
diff --git a/apps/user_ldap/l10n/it.php b/apps/user_ldap/l10n/it.php
index 97ca14e0a85..599a6da48a4 100644
--- a/apps/user_ldap/l10n/it.php
+++ b/apps/user_ldap/l10n/it.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "associazioni cancellate",
"Success" => "Riuscito",
"Error" => "Errore",
+"Configuration OK" => "Configurazione corretta",
+"Configuration incorrect" => "Configurazione non corretta",
+"Configuration incomplete" => "Configurazione incompleta",
"Select groups" => "Seleziona i gruppi",
"Select object classes" => "Seleziona le classi di oggetti",
"Select attributes" => "Seleziona gli attributi",
diff --git a/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php
index 9acd9c088c8..b2e8f173673 100644
--- a/apps/user_ldap/l10n/nl.php
+++ b/apps/user_ldap/l10n/nl.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "vertaaltabel leeggemaakt",
"Success" => "Succes",
"Error" => "Fout",
+"Configuration OK" => "Configuratie OK",
+"Configuration incorrect" => "Configuratie onjuist",
+"Configuration incomplete" => "Configuratie incompleet",
"Select groups" => "Selecteer groepen",
"Select object classes" => "Selecteer objectklasse",
"Select attributes" => "Selecteer attributen",
diff --git a/apps/user_ldap/l10n/pt_BR.php b/apps/user_ldap/l10n/pt_BR.php
index cf047b2c88c..940a55489a9 100644
--- a/apps/user_ldap/l10n/pt_BR.php
+++ b/apps/user_ldap/l10n/pt_BR.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "mapeamentos limpos",
"Success" => "Sucesso",
"Error" => "Erro",
+"Configuration OK" => "Configuração OK",
+"Configuration incorrect" => "Configuração incorreta",
+"Configuration incomplete" => "Configuração incompleta",
"Select groups" => "Selecionar grupos",
"Select object classes" => "Selecione classes de objetos",
"Select attributes" => "Selecione os atributos",
diff --git a/apps/user_ldap/l10n/ru.php b/apps/user_ldap/l10n/ru.php
index f908fa3cc70..f70ecdcf1f5 100644
--- a/apps/user_ldap/l10n/ru.php
+++ b/apps/user_ldap/l10n/ru.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "Соответствия очищены",
"Success" => "Успешно",
"Error" => "Ошибка",
+"Configuration OK" => "Конфигурация в порядке",
+"Configuration incorrect" => "Конфигурация неправильна",
+"Configuration incomplete" => "Конфигурация не завершена",
"Select groups" => "Выберите группы",
"Select object classes" => "Выберите объектные классы",
"Select attributes" => "Выберите атрибуты",
diff --git a/apps/user_ldap/l10n/sl.php b/apps/user_ldap/l10n/sl.php
index 81bc8c9b70c..616be979d06 100644
--- a/apps/user_ldap/l10n/sl.php
+++ b/apps/user_ldap/l10n/sl.php
@@ -1,48 +1,74 @@
<?php
$TRANSLATIONS = array(
-"Failed to clear the mappings." => "Preslikav ni bilo mogoče izbrisati",
+"Failed to clear the mappings." => "Čiščenje preslikav je spodletelo.",
"Failed to delete the server configuration" => "Brisanje nastavitev strežnika je spodletelo.",
"The configuration is valid and the connection could be established!" => "Nastavitev je veljavna, zato je povezavo mogoče vzpostaviti!",
-"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Nastavitev je veljavna, vendar pa je vez Bind spodletela. Preveriti je treba nastavitve strežnika in ustreznost poveril.",
+"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Nastavitev je veljavna, vendar pa je vez spodletela. Preveriti je treba nastavitve strežnika in ustreznost poveril.",
+"The configuration is invalid. Please have a look at the logs for further details." => "Nastavitev ni veljavna. Več podrobnosti o napaki je zabeleženih v dnevniku.",
+"No action specified" => "Ni določenega dejanja",
+"No configuration specified" => "Ni določenih nastavitev",
+"No data specified" => "Ni navedenih podatkov",
+" Could not set configuration %s" => "Ni mogoče uveljaviti nastavitev %s",
"Deletion failed" => "Brisanje je spodletelo.",
-"Take over settings from recent server configuration?" => "Ali naj se prevzame nastavitve nedavne nastavitve strežnika?",
-"Keep settings?" => "Ali nas se nastavitve ohranijo?",
+"Take over settings from recent server configuration?" => "Ali naj bodo prevzete nedavne nastavitve strežnika?",
+"Keep settings?" => "Ali naj se nastavitve ohranijo?",
"Cannot add server configuration" => "Ni mogoče dodati nastavitev strežnika",
-"mappings cleared" => "Preslikave so izbrisane",
+"mappings cleared" => "preslikave so izbrisane",
"Success" => "Uspešno končano.",
"Error" => "Napaka",
+"Configuration OK" => "Nastavitev je ustrezna",
+"Configuration incorrect" => "Nastavitev ni ustrezna",
+"Configuration incomplete" => "Nastavitev je nepopolna",
"Select groups" => "Izberi skupine",
+"Select object classes" => "Izbor razredov predmeta",
"Select attributes" => "Izbor atributov",
"Connection test succeeded" => "Preizkus povezave je uspešno končan.",
"Connection test failed" => "Preizkus povezave je spodletel.",
"Do you really want to delete the current Server Configuration?" => "Ali res želite izbrisati trenutne nastavitve strežnika?",
"Confirm Deletion" => "Potrdi brisanje",
-"_%s group found_::_%s groups found_" => array("","","",""),
-"_%s user found_::_%s users found_" => array("","","",""),
+"_%s group found_::_%s groups found_" => array("%s najdena skupina","%s najdeni skupini","%s najdene skupine","%s najdenih skupin"),
+"_%s user found_::_%s users found_" => array("%s najden uporabnik","%s najdena uporabnika","%s najdeni uporabniki","%s najdenih uporabnikov"),
"Invalid Host" => "Neveljaven gostitelj",
+"Could not find the desired feature" => "Želene zmožnosti ni mogoče najti",
"Save" => "Shrani",
"Test Configuration" => "Preizkusne nastavitve",
"Help" => "Pomoč",
+"Limit the access to %s to groups meeting this criteria:" => "Omeji dostop %s do skupin glede na kriterij:",
+"only those object classes:" => "le razredi predmeta:",
+"only from those groups:" => "le iz skupin:",
+"Edit raw filter instead" => "Uredi surov filter",
+"Raw LDAP filter" => "Surovi filter LDAP",
+"The filter specifies which LDAP groups shall have access to the %s instance." => "Filter določa, katere skupine LDAP bodo imele dostop do %s.",
+"groups found" => "najdenih skupin",
+"What attribute shall be used as login name:" => "Kateri atribut naj bo uporabljen kot prijavno ime:",
+"LDAP Username:" => "Uporabniško ime LDAP:",
+"LDAP Email Address:" => "Elektronski naslov LDAP:",
+"Other Attributes:" => "Drugi atributi:",
"Add Server Configuration" => "Dodaj nastavitve strežnika",
"Host" => "Gostitelj",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol je lahko izpuščen, če ni posebej zahtevan SSL. V tem primeru se mora naslov začeti z ldaps://",
"Port" => "Vrata",
-"User DN" => "Uporabnik DN",
-"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN uporabnikovega odjemalca, s katerim naj se opravi vezava, npr. uid=agent,dc=example,dc=com. Za brezimni dostop sta polji DN in geslo prazni.",
+"User DN" => "Uporabnikovo enolično ime",
+"The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "Enolično ime uporabnikovega odjemalca, s katerim naj se opravi vezava, npr. uid=agent,dc=example,dc=com. Za brezimni dostop sta polji prikaznega imena in gesla prazni.",
"Password" => "Geslo",
-"For anonymous access, leave DN and Password empty." => "Za brezimni dostop sta polji DN in geslo prazni.",
-"One Base DN per line" => "En osnovni DN na vrstico",
-"You can specify Base DN for users and groups in the Advanced tab" => "Osnovni DN za uporabnike in skupine lahko določite v zavihku naprednih možnosti.",
+"For anonymous access, leave DN and Password empty." => "Za brezimni dostop naj bosta polji imena in gesla prazni.",
+"One Base DN per line" => "Eno osnovno enolično ime na vrstico",
+"You can specify Base DN for users and groups in the Advanced tab" => "Osnovno enolično ime za uporabnike in skupine lahko določite v zavihku naprednih možnosti.",
+"Limit the access to %s to users meeting this criteria:" => "Omeji dostop do %s uporabnikom, za katere velja kriterij:",
+"The filter specifies which LDAP users shall have access to the %s instance." => "Filter določa, kateri uporabniki LDAP bodo imeli dostop do %s.",
+"users found" => "najdenih uporabnikov",
"Back" => "Nazaj",
"Continue" => "Nadaljuj",
+"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." => "<b>Opozorilo:</b> določili user_ldap in user_webdavauth sta neskladni, kar lahko vpliva na delovanje sistema. O napaki pošljite poročilo skrbniku sistema in opozorite, da je treba eno izmed možnosti onemogočiti.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Opozorilo:</b> modul PHP LDAP mora biti nameščen, sicer vmesnik ne bo deloval. Paket je treba namestiti.",
"Connection Settings" => "Nastavitve povezave",
"Configuration Active" => "Dejavna nastavitev",
"When unchecked, this configuration will be skipped." => "Neizbrana možnost preskoči nastavitev.",
"User Login Filter" => "Filter prijav uporabnikov",
+"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" => "Določi filter, ki bo uveljavljen ob poskusu prijave. %%uid zamenja uporabniško ime pri prijavi, na primer: \"uid=%%uid\"",
"Backup (Replica) Host" => "Varnostna kopija (replika) podatkov gostitelja",
"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Podati je treba izbirno varnostno kopijo gostitelja. Ta mora biti natančna replika strežnika LDAP/AD.",
-"Backup (Replica) Port" => "Varnostna kopija (replika) podatka vrat",
+"Backup (Replica) Port" => "Vrata varnostne kopije (replike)",
"Disable Main Server" => "Onemogoči glavni strežnik",
"Case insensitve LDAP server (Windows)" => "Strežnik LDAP ne upošteva velikosti črk (Windows)",
"Turn off SSL certificate validation." => "Onemogoči določanje veljavnosti potrdila SSL.",
@@ -50,14 +76,16 @@ $TRANSLATIONS = array(
"in seconds. A change empties the cache." => "v sekundah. Sprememba izprazni predpomnilnik.",
"Directory Settings" => "Nastavitve mape",
"User Display Name Field" => "Polje za uporabnikovo prikazano ime",
+"The LDAP attribute to use to generate the user's display name." => "Atribut LDAP za uporabo pri ustvarjanju prikaznega imena uporabnika.",
"Base User Tree" => "Osnovno uporabniško drevo",
-"One User Base DN per line" => "Eno osnovno uporabniško ime DN na vrstico",
-"User Search Attributes" => "Uporabi atribute iskanja",
+"One User Base DN per line" => "Eno osnovno uporabniško ime na vrstico",
+"User Search Attributes" => "Uporabnikovi atributi iskanja",
"Optional; one attribute per line" => "Izbirno; en atribut na vrstico",
"Group Display Name Field" => "Polje za prikazano ime skupine",
+"The LDAP attribute to use to generate the groups's display name." => "Atribut LDAP za uporabo pri ustvarjanju prikaznega imena skupine.",
"Base Group Tree" => "Osnovno drevo skupine",
-"One Group Base DN per line" => "Eno osnovno ime skupine DN na vrstico",
-"Group Search Attributes" => "Atributi iskanja skupine",
+"One Group Base DN per line" => "Eno osnovno ime skupine na vrstico",
+"Group Search Attributes" => "Skupinski atributi iskanja",
"Group-Member association" => "Povezava član-skupina",
"Special Attributes" => "Posebni atributi",
"Quota Field" => "Polje količinske omejitve",
@@ -66,10 +94,12 @@ $TRANSLATIONS = array(
"Email Field" => "Polje elektronske pošte",
"User Home Folder Naming Rule" => "Pravila poimenovanja uporabniške osebne mape",
"Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Pustite prazno za uporabniško ime (privzeto), sicer navedite atribut LDAP/AD.",
-"Internal Username" => "Interno uporabniško ime",
-"Internal Username Attribute:" => "Atribut Interno uporabniško ime",
+"Internal Username" => "Programsko uporabniško ime",
+"Internal Username Attribute:" => "Programski atribut uporabniškega imena:",
"Override UUID detection" => "Prezri zaznavo UUID",
-"Username-LDAP User Mapping" => "Preslikava uporabniško ime - LDAP-uporabnik",
+"UUID Attribute for Users:" => "Atribut UUID za uporabnike:",
+"UUID Attribute for Groups:" => "Atribut UUID za skupine:",
+"Username-LDAP User Mapping" => "Uporabniška preslikava Uporabniško_ime-LDAP",
"Clear Username-LDAP User Mapping" => "Izbriši preslikavo Uporabniškega imena in LDAP-uporabnika",
"Clear Groupname-LDAP Group Mapping" => "Izbriši preslikavo Skupine in LDAP-skupine"
);
diff --git a/apps/user_ldap/l10n/sv.php b/apps/user_ldap/l10n/sv.php
index 2a1a6e46e03..922985e76f0 100644
--- a/apps/user_ldap/l10n/sv.php
+++ b/apps/user_ldap/l10n/sv.php
@@ -4,6 +4,7 @@ $TRANSLATIONS = array(
"Failed to delete the server configuration" => "Misslyckades med att radera serverinställningen",
"The configuration is valid and the connection could be established!" => "Inställningen är giltig och anslutningen kunde upprättas!",
"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Konfigurationen är riktig, men Bind felade. Var vänlig och kontrollera serverinställningar och logininformation.",
+"The configuration is invalid. Please have a look at the logs for further details." => "Inställningen är ogiltig. Vänligen se ownCloud-loggen för fler detaljer.",
"No action specified" => "Ingen åtgärd har angetts",
"No configuration specified" => "Ingen konfiguration har angetts",
"No data specified" => "Ingen data har angetts",
@@ -15,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "mappningar rensade",
"Success" => "Lyckat",
"Error" => "Fel",
+"Configuration OK" => "Konfigurationen är OK",
+"Configuration incorrect" => "Felaktig konfiguration",
+"Configuration incomplete" => "Konfigurationen är ej komplett",
"Select groups" => "Välj grupper",
"Select object classes" => "Välj Objekt-klasser",
"Select attributes" => "Välj attribut",
diff --git a/apps/user_ldap/l10n/tr.php b/apps/user_ldap/l10n/tr.php
index 80fd5705772..040c707cc46 100644
--- a/apps/user_ldap/l10n/tr.php
+++ b/apps/user_ldap/l10n/tr.php
@@ -16,6 +16,9 @@ $TRANSLATIONS = array(
"mappings cleared" => "Dönüşümler temizlendi",
"Success" => "Başarılı",
"Error" => "Hata",
+"Configuration OK" => "Yapılandırma tamam",
+"Configuration incorrect" => "Yapılandırma geçersiz",
+"Configuration incomplete" => "Yapılandırma tamamlanmamış",
"Select groups" => "Grupları seç",
"Select object classes" => "Nesne sınıflarını seç",
"Select attributes" => "Nitelikleri seç",
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index a07bd3fa11f..ecc74b6cf54 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -199,7 +199,9 @@ class Access extends LDAPUtility {
*/
public function username2dn($name) {
$dn = $this->ocname2dn($name, true);
- if($dn) {
+ //Check whether the DN belongs to the Base, to avoid issues on multi-
+ //server setups
+ if($dn && $this->isDNPartOfBase($dn, $this->connection->ldapBaseUsers)) {
return $dn;
}
diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php
index e14ed824a74..c396d5b4bf8 100644
--- a/apps/user_ldap/lib/configuration.php
+++ b/apps/user_ldap/lib/configuration.php
@@ -47,12 +47,15 @@ class Configuration {
'ldapUserFilterObjectclass' => null,
'ldapUserFilterGroups' => null,
'ldapUserFilter' => null,
+ 'ldapUserFilterMode' => null,
'ldapGroupFilter' => null,
+ 'ldapGroupFilterMode' => null,
'ldapGroupFilterObjectclass' => null,
'ldapGroupFilterGroups' => null,
'ldapGroupDisplayName' => null,
'ldapGroupMemberAssocAttr' => null,
'ldapLoginFilter' => null,
+ 'ldapLoginFilterMode' => null,
'ldapLoginFilterEmail' => null,
'ldapLoginFilterUsername' => null,
'ldapLoginFilterAttributes' => null,
@@ -72,6 +75,7 @@ class Configuration {
'ldapExpertUsernameAttr' => null,
'ldapExpertUUIDUserAttr' => null,
'ldapExpertUUIDGroupAttr' => null,
+ 'lastJpegPhotoLookup' => null,
);
public function __construct($configPrefix, $autoread = true) {
@@ -301,13 +305,16 @@ class Configuration {
'ldap_base_users' => '',
'ldap_base_groups' => '',
'ldap_userlist_filter' => '',
+ 'ldap_user_filter_mode' => 0,
'ldap_userfilter_objectclass' => '',
'ldap_userfilter_groups' => '',
'ldap_login_filter' => 'uid=%uid',
+ 'ldap_login_filter_mode' => 0,
'ldap_loginfilter_email' => 0,
'ldap_loginfilter_username' => 1,
'ldap_loginfilter_attributes' => '',
'ldap_group_filter' => '',
+ 'ldap_group_filter_mode' => 0,
'ldap_groupfilter_objectclass' => '',
'ldap_groupfilter_groups' => '',
'ldap_display_name' => 'displayName',
@@ -330,6 +337,7 @@ class Configuration {
'ldap_expert_uuid_user_attr' => '',
'ldap_expert_uuid_group_attr' => '',
'has_memberof_filter_support' => 0,
+ 'last_jpegPhoto_lookup' => 0,
);
}
@@ -352,11 +360,14 @@ class Configuration {
'ldap_userfilter_objectclass' => 'ldapUserFilterObjectclass',
'ldap_userfilter_groups' => 'ldapUserFilterGroups',
'ldap_userlist_filter' => 'ldapUserFilter',
+ 'ldap_user_filter_mode' => 'ldapUserFilterMode',
'ldap_login_filter' => 'ldapLoginFilter',
+ 'ldap_login_filter_mode' => 'ldapLoginFilterMode',
'ldap_loginfilter_email' => 'ldapLoginFilterEmail',
'ldap_loginfilter_username' => 'ldapLoginFilterUsername',
'ldap_loginfilter_attributes' => 'ldapLoginFilterAttributes',
'ldap_group_filter' => 'ldapGroupFilter',
+ 'ldap_group_filter_mode' => 'ldapGroupFilterMode',
'ldap_groupfilter_objectclass' => 'ldapGroupFilterObjectclass',
'ldap_groupfilter_groups' => 'ldapGroupFilterGroups',
'ldap_display_name' => 'ldapUserDisplayName',
@@ -377,6 +388,7 @@ class Configuration {
'ldap_expert_uuid_user_attr' => 'ldapExpertUUIDUserAttr',
'ldap_expert_uuid_group_attr' => 'ldapExpertUUIDGroupAttr',
'has_memberof_filter_support' => 'hasMemberOfFilterSupport',
+ 'last_jpegPhoto_lookup' => 'lastJpegPhotoLookup',
);
return $array;
}
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php
index c74b357bdd2..30e1875901c 100644
--- a/apps/user_ldap/lib/proxy.php
+++ b/apps/user_ldap/lib/proxy.php
@@ -54,7 +54,7 @@ abstract class Proxy {
return 'group-'.$gid.'-lastSeenOn';
}
- abstract protected function callOnLastSeenOn($id, $method, $parameters);
+ abstract protected function callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
abstract protected function walkBackends($id, $method, $parameters);
/**
@@ -64,8 +64,9 @@ abstract class Proxy {
* @param $parameters an array of parameters to be passed
* @return mixed, the result of the specified method
*/
- protected function handleRequest($id, $method, $parameters) {
- if(!$result = $this->callOnLastSeenOn($id, $method, $parameters)) {
+ protected function handleRequest($id, $method, $parameters, $passOnWhen = false) {
+ $result = $this->callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
+ if($result === $passOnWhen) {
$result = $this->walkBackends($id, $method, $parameters);
}
return $result;
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index fb6aca9e961..84b397cf5e8 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -38,6 +38,9 @@ class Wizard extends LDAPUtility {
const LFILTER_USER_LIST = 3;
const LFILTER_GROUP_LIST = 4;
+ const LFILTER_MODE_ASSISTED = 2;
+ const LFILTER_MODE_RAW = 1;
+
const LDAP_NW_TIMEOUT = 4;
/**
@@ -148,6 +151,42 @@ class Wizard extends LDAPUtility {
}
/**
+ * @brief return the state of the Group Filter Mode
+ */
+ public function getGroupFilterMode() {
+ $this->getFilterMode('ldapGroupFilterMode');
+ return $this->result;
+ }
+
+ /**
+ * @brief return the state of the Login Filter Mode
+ */
+ public function getLoginFilterMode() {
+ $this->getFilterMode('ldapLoginFilterMode');
+ return $this->result;
+ }
+
+ /**
+ * @brief return the state of the User Filter Mode
+ */
+ public function getUserFilterMode() {
+ $this->getFilterMode('ldapUserFilterMode');
+ return $this->result;
+ }
+
+ /**
+ * @brief return the state of the mode of the specified filter
+ * @param $confkey string, contains the access key of the Configuration
+ */
+ private function getFilterMode($confkey) {
+ $mode = $this->configuration->$confkey;
+ if(is_null($mode)) {
+ $mode = $this->LFILTER_MODE_ASSISTED;
+ }
+ $this->result->addChange($confkey, $mode);
+ }
+
+ /**
* @brief detects the available LDAP attributes
* @returns the instance's WizardResult instance
*/
@@ -215,7 +254,7 @@ class Wizard extends LDAPUtility {
throw new \Exception('Could not connect to LDAP');
}
- $obclasses = array('posixGroup', 'group', '*');
+ $obclasses = array('posixGroup', 'group', 'zimbraDistributionList', '*');
$this->determineFeature($obclasses, 'cn', $dbkey, $confkey);
if($testMemberOf) {
diff --git a/apps/user_ldap/templates/part.wizard-loginfilter.php b/apps/user_ldap/templates/part.wizard-loginfilter.php
index d4a36eb0cb7..dc5d61e9f77 100644
--- a/apps/user_ldap/templates/part.wizard-loginfilter.php
+++ b/apps/user_ldap/templates/part.wizard-loginfilter.php
@@ -29,6 +29,16 @@
</select>
</p>
<p>
+ <label><a id='toggleRawLoginFilter'>↓ <?php p($l->t('Edit raw filter instead'));?></a></label>
+ </p>
+ <p id="rawLoginFilterContainer" class="invisible">
+ <input type="text" id="ldap_login_filter" name="ldap_login_filter"
+ class="lwautosave"
+ placeholder="<?php p($l->t('Raw LDAP filter'));?>"
+ title="<?php p($l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: "uid=%%uid"'));?>"
+ />
+ </p>
+ <p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index feb5ac6385d..3ccc7a860f5 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -20,9 +20,6 @@
<h3><?php p($l->t('Connection Settings'));?></h3>
<div>
<p><label for="ldap_configuration_active"><?php p($l->t('Configuration Active'));?></label><input type="checkbox" id="ldap_configuration_active" name="ldap_configuration_active" value="1" data-default="<?php p($_['ldap_configuration_active_default']); ?>" title="<?php p($l->t('When unchecked, this configuration will be skipped.'));?>" /></p>
- <p><label for="ldap_login_filter"><?php p($l->t('User Login Filter'));?></label><input type="text" id="ldap_login_filter" name="ldap_login_filter"
- data-default="<?php p($_['ldap_login_filter_default']); ?>"
- title="<?php p($l->t('Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: "uid=%%uid"'));?>" /></p>
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 6f52bbdf233..527a5c10b85 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -70,6 +70,74 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
}
/**
+ * @brief reads jpegPhoto and set is as avatar if available
+ * @param $uid string ownCloud user name
+ * @param $dn string the user's LDAP DN
+ * @return void
+ */
+ private function updateAvatar($uid, $dn) {
+ $hasLoggedIn = \OCP\Config::getUserValue($uid, 'user_ldap',
+ 'firstLoginAccomplished', 0);
+ $lastChecked = \OCP\Config::getUserValue($uid, 'user_ldap',
+ 'lastJpegPhotoLookup', 0);
+ if(($hasLoggedIn !== '1') || (time() - intval($lastChecked)) < 86400 ) {
+ //update only once a day
+ return;
+ }
+
+ $jpegPhoto = $this->access->readAttribute($dn, 'jpegPhoto');
+ \OCP\Config::setUserValue($uid, 'user_ldap', 'lastJpegPhotoLookup', time());
+ if(!$jpegPhoto || !is_array($jpegPhoto) || !isset($jpegPhoto[0])) {
+ //not set, nothing left to do;
+ return;
+ }
+
+ $image = new \OCP\Image();
+ $image->loadFromBase64(base64_encode($jpegPhoto[0]));
+
+ if(!$image->valid()) {
+ \OCP\Util::writeLog('user_ldap', 'jpegPhoto data invalid for '.$dn,
+ \OCP\Util::ERROR);
+ return;
+ }
+ //make sure it is a square and not bigger than 128x128
+ $size = min(array($image->width(), $image->height(), 128));
+ if(!$image->centerCrop($size)) {
+ \OCP\Util::writeLog('user_ldap',
+ 'croping image for avatar failed for '.$dn,
+ \OCP\Util::ERROR);
+ return;
+ }
+
+ if(!\OC\Files\Filesystem::$loaded) {
+ \OC_Util::setupFS($uid);
+ }
+
+ $avatarManager = \OC::$server->getAvatarManager();
+ $avatar = $avatarManager->getAvatar($uid);
+ $avatar->set($image);
+ }
+
+ /**
+ * @brief checks whether the user is allowed to change his avatar in ownCloud
+ * @param $uid string the ownCloud user name
+ * @return boolean either the user can or cannot
+ */
+ public function canChangeAvatar($uid) {
+ $dn = $this->access->username2dn($uid);
+ if(!$dn) {
+ return false;
+ }
+ $jpegPhoto = $this->access->readAttribute($dn, 'jpegPhoto');
+ if(!$jpegPhoto || !is_array($jpegPhoto) || !isset($jpegPhoto[0])) {
+ //The user is allowed to change his avatar in ownCloud only if no
+ //avatar is provided by LDAP
+ return true;
+ }
+ return false;
+ }
+
+ /**
* @brief Check if the password is correct
* @param $uid The username
* @param $password The password
@@ -100,6 +168,10 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
return false;
}
+ \OCP\Config::setUserValue($ocname, 'user_ldap',
+ 'firstLoginAccomplished', 1);
+
+ $this->updateAvatar($ocname, $dn);
//give back the display name
return $ocname;
}
@@ -173,6 +245,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
$this->access->connection->writeToCache('userExists'.$uid, true);
$this->updateQuota($dn);
+ $this->updateAvatar($uid, $dn);
return true;
}
@@ -289,7 +362,8 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
public function implementsActions($actions) {
return (bool)((OC_USER_BACKEND_CHECK_PASSWORD
| OC_USER_BACKEND_GET_HOME
- | OC_USER_BACKEND_GET_DISPLAYNAME)
+ | OC_USER_BACKEND_GET_DISPLAYNAME
+ | OC_USER_BACKEND_PROVIDE_AVATAR)
& $actions);
}
diff --git a/apps/user_ldap/user_proxy.php b/apps/user_ldap/user_proxy.php
index 092fdbf7c78..b073b143e74 100644
--- a/apps/user_ldap/user_proxy.php
+++ b/apps/user_ldap/user_proxy.php
@@ -54,6 +54,7 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
protected function walkBackends($uid, $method, $parameters) {
$cacheKey = $this->getUserCacheKey($uid);
foreach($this->backends as $configPrefix => $backend) {
+// print("walkBackend '$configPrefix'<br/>");
if($result = call_user_func_array(array($backend, $method), $parameters)) {
$this->writeToCache($cacheKey, $configPrefix);
return $result;
@@ -67,16 +68,17 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
* @param $uid string, the uid connected to the request
* @param $method string, the method of the user backend that shall be called
* @param $parameters an array of parameters to be passed
+ * @param $passOnWhen the result matches this variable
* @return mixed, the result of the method or false
*/
- protected function callOnLastSeenOn($uid, $method, $parameters) {
+ protected function callOnLastSeenOn($uid, $method, $parameters, $passOnWhen) {
$cacheKey = $this->getUserCacheKey($uid);
$prefix = $this->getFromCache($cacheKey);
//in case the uid has been found in the past, try this stored connection first
if(!is_null($prefix)) {
if(isset($this->backends[$prefix])) {
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
- if(!$result) {
+ if($result === $passOnWhen) {
//not found here, reset cache to null if user vanished
//because sometimes methods return false with a reason
$userExists = call_user_func_array(
@@ -164,6 +166,15 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
}
/**
+ * @brief checks whether the user is allowed to change his avatar in ownCloud
+ * @param $uid string the ownCloud user name
+ * @return boolean either the user can or cannot
+ */
+ public function canChangeAvatar($uid) {
+ return $this->handleRequest($uid, 'canChangeAvatar', array($uid), true);
+ }
+
+ /**
* @brief Get a list of all display names
* @returns array with all displayNames (value) and the corresponding uids (key)
*