aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/l10n/pt_BR.js34
-rw-r--r--apps/files_external/l10n/pt_BR.json34
-rw-r--r--apps/files_external/l10n/tr.js8
-rw-r--r--apps/files_external/l10n/tr.json8
-rw-r--r--apps/files_external/lib/Command/Scan.php15
-rw-r--r--apps/files_external/tests/Config/UserPlaceholderHandlerTest.php2
-rw-r--r--apps/files_external/tests/Service/DBConfigServiceTest.php2
-rw-r--r--apps/files_external/tests/Service/GlobalStoragesServiceTest.php2
-rw-r--r--apps/files_external/tests/Storage/Amazons3MultiPartTest.php2
-rw-r--r--apps/files_external/tests/appSpec.js84
-rw-r--r--apps/files_external/tests/js/mountsfilelistSpec.js148
-rw-r--r--apps/files_external/tests/js/settingsSpec.js447
12 files changed, 60 insertions, 726 deletions
diff --git a/apps/files_external/l10n/pt_BR.js b/apps/files_external/l10n/pt_BR.js
index 4df5dddd8db..233814a6abc 100644
--- a/apps/files_external/l10n/pt_BR.js
+++ b/apps/files_external/l10n/pt_BR.js
@@ -33,7 +33,7 @@ OC.L10N.register(
"Client ID" : "ID do Cliente",
"Client secret" : "Segredo do cliente",
"OpenStack v2" : "OpenStack v2",
- "Login" : "Entrar",
+ "Login" : "Nome de login",
"Password" : "Senha",
"Tenant name" : "Nome do inquilino",
"Identity endpoint URL" : "URL do destino da identidade",
@@ -42,17 +42,17 @@ OC.L10N.register(
"Rackspace" : "Espaço no rack",
"API key" : "Chave API",
"Global credentials" : "Credenciais globais",
- "Log-in credentials, save in database" : "Credenciais de acesso, salvas no banco de dados",
- "Login and password" : "Login e senha",
- "Log-in credentials, save in session" : "Credenciais de login, guardadas em sessão",
+ "Log-in credentials, save in database" : "Credenciais de acesso, armazenar no banco de dados",
+ "Login and password" : "Nome de login e senha",
+ "Log-in credentials, save in session" : "Credenciais de login, armazenar na sessão",
"Global credentials, manually entered" : "Credenciais globais, inseridas manualmente",
- "Manually entered, store in database" : "Inserido manualmente, armazenado no banco de dados",
+ "Manually entered, store in database" : "Inseridos manualmente, armazenados no banco de dados",
"RSA public key" : "Chave pública RSA",
"Public key" : "Chave pública",
"RSA private key" : "Chave privada RSA",
"Private key" : "Chave privada",
- "Kerberos default realm, defaults to \"WORKGROUP\"" : "reino padrão do Kerberos, padrão para \"WORKGROUP\"",
- "Kerberos ticket Apache mode" : "Bilhete Kerberos Modo Apache",
+ "Kerberos default realm, defaults to \"WORKGROUP\"" : "Reino padrão do Kerberos, o padrão é \"WORKGROUP\"",
+ "Kerberos ticket Apache mode" : "Modo Apache de Ticket Kerberos",
"Kerberos ticket" : "Ticket Kerberos",
"Amazon S3" : "Amazon S3",
"Bucket" : "Cesta",
@@ -81,13 +81,13 @@ OC.L10N.register(
"SMB/CIFS" : "SMB/CIFS",
"Share" : "Compartilhar",
"Show hidden files" : "Mostrar arquivos ocultos",
- "Case sensitive file system" : "Sistema de arquivos sensível a maiúsculas",
+ "Case sensitive file system" : "Sistema de arquivos diferenciando maiúsculas/minúsculas",
"Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativá-lo permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho",
"Verify ACL access when listing files" : "Verifique o acesso da ACL ao listar arquivos",
"Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verifique as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, o que acarreta uma penalidade de desempenho",
"Timeout" : "Tempo limite",
- "SMB/CIFS using OC login" : "SMB/CIFS usandoo login OC",
- "Login as share" : "Faça login como compartilhar",
+ "SMB/CIFS using OC login" : "SMB/CIFS usando login OC",
+ "Login as share" : "Faça login como compartilhamento",
"OpenStack Object Storage" : "Armazenamento de Objetos OpenStack",
"Service name" : "Nome do serviço",
"Request timeout (seconds)" : "Tempo limite para requisição (segundos)",
@@ -101,21 +101,21 @@ OC.L10N.register(
"Confirm" : "Confirmar",
"Storage credentials" : "Credenciais de armazenamento",
"To access the storage, you need to provide the authentication credentials." : "Para acessar o armazenamento, você precisa fornecer as credenciais de autenticação.",
- "Enter the storage login" : "Digite o login de armazenamento",
+ "Enter the storage login" : "Digite o nome de login de armazenamento",
"Enter the storage password" : "Digite a senha de armazenamento",
"Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}",
"New configuration successfully saved" : "Nova configuração salva com sucesso",
"Enter missing credentials" : "Digite as credenciais ausentes",
- "Credentials successfully set" : "Credenciais configuradas com sucesso",
- "Error while setting credentials: {error}" : "Erro ao configurar as credenciais: {error}",
+ "Credentials successfully set" : "Credenciais definidas com sucesso",
+ "Error while setting credentials: {error}" : "Erro ao definir as credenciais: {error}",
"Checking storage …" : "Verificação do armazenamento …",
"There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.",
"We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}",
"Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha",
- "Open in Files" : "Abrir em arquivos",
+ "Open in Files" : "Abrir em Arquivos",
"There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Ocorreu um erro com este armazenamento externo. Deseja revisar esta configuração do ponto de montagem na página de configurações?",
"External mount error" : "Erro de montagem externa",
- "List of external storage." : "Lista de armazenamento externo.",
+ "List of external storage." : "Lista de armazenamentos externos.",
"There is no external storage configured. You can configure them in your Personal settings." : "Não há armazenamento externo configurado. Você pode configurá-los em suas configurações pessoais.",
"There is no external storage configured and you don't have the permission to configure them." : "Não há armazenamento externo configurado e você não tem permissão para configurá-los.",
"No external storage" : "Sem armazenamento externo",
@@ -135,10 +135,10 @@ OC.L10N.register(
"Once every direct access" : "Uma vez a cada acesso direto",
"Read only" : "Somente leitura",
"Disconnect" : "Desconectar",
- "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}",
+ "Unknown backend: {backendName}" : "Back-end desconhecido: {backendName}",
"Admin defined" : "Definido pelo administrador",
"Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status",
- "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.",
+ "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão destes arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta do armazenamento externo em si.",
"Delete storage?" : "Excluir armazenamento?",
"Click to recheck the configuration" : "Clique para rechecar a configuração",
"Saved" : "Salvo",
diff --git a/apps/files_external/l10n/pt_BR.json b/apps/files_external/l10n/pt_BR.json
index 02fd258d356..6002404e464 100644
--- a/apps/files_external/l10n/pt_BR.json
+++ b/apps/files_external/l10n/pt_BR.json
@@ -31,7 +31,7 @@
"Client ID" : "ID do Cliente",
"Client secret" : "Segredo do cliente",
"OpenStack v2" : "OpenStack v2",
- "Login" : "Entrar",
+ "Login" : "Nome de login",
"Password" : "Senha",
"Tenant name" : "Nome do inquilino",
"Identity endpoint URL" : "URL do destino da identidade",
@@ -40,17 +40,17 @@
"Rackspace" : "Espaço no rack",
"API key" : "Chave API",
"Global credentials" : "Credenciais globais",
- "Log-in credentials, save in database" : "Credenciais de acesso, salvas no banco de dados",
- "Login and password" : "Login e senha",
- "Log-in credentials, save in session" : "Credenciais de login, guardadas em sessão",
+ "Log-in credentials, save in database" : "Credenciais de acesso, armazenar no banco de dados",
+ "Login and password" : "Nome de login e senha",
+ "Log-in credentials, save in session" : "Credenciais de login, armazenar na sessão",
"Global credentials, manually entered" : "Credenciais globais, inseridas manualmente",
- "Manually entered, store in database" : "Inserido manualmente, armazenado no banco de dados",
+ "Manually entered, store in database" : "Inseridos manualmente, armazenados no banco de dados",
"RSA public key" : "Chave pública RSA",
"Public key" : "Chave pública",
"RSA private key" : "Chave privada RSA",
"Private key" : "Chave privada",
- "Kerberos default realm, defaults to \"WORKGROUP\"" : "reino padrão do Kerberos, padrão para \"WORKGROUP\"",
- "Kerberos ticket Apache mode" : "Bilhete Kerberos Modo Apache",
+ "Kerberos default realm, defaults to \"WORKGROUP\"" : "Reino padrão do Kerberos, o padrão é \"WORKGROUP\"",
+ "Kerberos ticket Apache mode" : "Modo Apache de Ticket Kerberos",
"Kerberos ticket" : "Ticket Kerberos",
"Amazon S3" : "Amazon S3",
"Bucket" : "Cesta",
@@ -79,13 +79,13 @@
"SMB/CIFS" : "SMB/CIFS",
"Share" : "Compartilhar",
"Show hidden files" : "Mostrar arquivos ocultos",
- "Case sensitive file system" : "Sistema de arquivos sensível a maiúsculas",
+ "Case sensitive file system" : "Sistema de arquivos diferenciando maiúsculas/minúsculas",
"Disabling it will allow to use a case insensitive file system, but comes with a performance penalty" : "Desativá-lo permitirá usar um sistema de arquivos que não diferencia maiúsculas de minúsculas, mas acarretará uma penalidade de desempenho",
"Verify ACL access when listing files" : "Verifique o acesso da ACL ao listar arquivos",
"Check the ACL's of each file or folder inside a directory to filter out items where the account has no read permissions, comes with a performance penalty" : "Verifique as ACLs de cada arquivo ou pasta dentro de um diretório para filtrar itens onde a conta não tem permissões de leitura, o que acarreta uma penalidade de desempenho",
"Timeout" : "Tempo limite",
- "SMB/CIFS using OC login" : "SMB/CIFS usandoo login OC",
- "Login as share" : "Faça login como compartilhar",
+ "SMB/CIFS using OC login" : "SMB/CIFS usando login OC",
+ "Login as share" : "Faça login como compartilhamento",
"OpenStack Object Storage" : "Armazenamento de Objetos OpenStack",
"Service name" : "Nome do serviço",
"Request timeout (seconds)" : "Tempo limite para requisição (segundos)",
@@ -99,21 +99,21 @@
"Confirm" : "Confirmar",
"Storage credentials" : "Credenciais de armazenamento",
"To access the storage, you need to provide the authentication credentials." : "Para acessar o armazenamento, você precisa fornecer as credenciais de autenticação.",
- "Enter the storage login" : "Digite o login de armazenamento",
+ "Enter the storage login" : "Digite o nome de login de armazenamento",
"Enter the storage password" : "Digite a senha de armazenamento",
"Unable to update this external storage config. {statusMessage}" : "Não é possível atualizar esta configuração de armazenamento externo. {statusMessage}",
"New configuration successfully saved" : "Nova configuração salva com sucesso",
"Enter missing credentials" : "Digite as credenciais ausentes",
- "Credentials successfully set" : "Credenciais configuradas com sucesso",
- "Error while setting credentials: {error}" : "Erro ao configurar as credenciais: {error}",
+ "Credentials successfully set" : "Credenciais definidas com sucesso",
+ "Error while setting credentials: {error}" : "Erro ao definir as credenciais: {error}",
"Checking storage …" : "Verificação do armazenamento …",
"There was an error with this external storage." : "Ocorreu um erro com este armazenamento externo.",
"We were unable to check the external storage {basename}" : "Não foi possível verificar o armazenamento externo {basename}",
"Examine this faulty external storage configuration" : "Examine esta configuração de armazenamento externo com falha",
- "Open in Files" : "Abrir em arquivos",
+ "Open in Files" : "Abrir em Arquivos",
"There was an error with this external storage. Do you want to review this mount point config in the settings page?" : "Ocorreu um erro com este armazenamento externo. Deseja revisar esta configuração do ponto de montagem na página de configurações?",
"External mount error" : "Erro de montagem externa",
- "List of external storage." : "Lista de armazenamento externo.",
+ "List of external storage." : "Lista de armazenamentos externos.",
"There is no external storage configured. You can configure them in your Personal settings." : "Não há armazenamento externo configurado. Você pode configurá-los em suas configurações pessoais.",
"There is no external storage configured and you don't have the permission to configure them." : "Não há armazenamento externo configurado e você não tem permissão para configurá-los.",
"No external storage" : "Sem armazenamento externo",
@@ -133,10 +133,10 @@
"Once every direct access" : "Uma vez a cada acesso direto",
"Read only" : "Somente leitura",
"Disconnect" : "Desconectar",
- "Unknown backend: {backendName}" : "Backend desconhecido: {backendName}",
+ "Unknown backend: {backendName}" : "Back-end desconhecido: {backendName}",
"Admin defined" : "Definido pelo administrador",
"Automatic status checking is disabled due to the large number of configured storages, click to check status" : "A verificação automática de status está desabilitada devido ao grande número de armazenamentos configurados, clique para verificar o status",
- "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão desses arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta no próprio armazenamento externo.",
+ "Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Tem certeza de que deseja desconectar este armazenamento externo? Isso tornará o armazenamento indisponível no Nextcloud e levará à exclusão destes arquivos e pastas em qualquer cliente de sincronização que esteja conectado no momento, mas não excluirá nenhum arquivo e pasta do armazenamento externo em si.",
"Delete storage?" : "Excluir armazenamento?",
"Click to recheck the configuration" : "Clique para rechecar a configuração",
"Saved" : "Salvo",
diff --git a/apps/files_external/l10n/tr.js b/apps/files_external/l10n/tr.js
index f17488f7154..78246635d01 100644
--- a/apps/files_external/l10n/tr.js
+++ b/apps/files_external/l10n/tr.js
@@ -91,13 +91,13 @@ OC.L10N.register(
"OpenStack Object Storage" : "OpenStack nesne depolama",
"Service name" : "Hizmet adı",
"Request timeout (seconds)" : "İstek zaman aşımı (saniye)",
- "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.",
- "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.",
+ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da etkin değil. %s bağlanamaz. Kurulumu için lütfen BT yöneticiniz ile görüşün.",
+ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da etkin değil. %s bağlanamaz. Kurulumu için lütfen BT yöneticiniz ile görüşün.",
"\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" kurulmamış. %2$s\" bağlanamaz. Lütfen kurulum için BT yöneticiniz ile görüşün.",
"External storage" : "Dış depolama",
"External storage support" : "Dış depolama desteği",
"Adds basic external storage support" : "Temel dış depolama desteği ekler",
- "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama alanı hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, kullanıma almak istedikleri depolama alanı türünü seçebilir ve bu depolama alanı konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolama alanını kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama alanı, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasını da sağlar. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama alanı yapılandırması görsel arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama alanı bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama alanı görsel arayüzü belgeleri ile dış depolama alanı yapılandırma dosyası belgelerine bakabilirsiniz.",
+ "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama alanı hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, etkinleştirmek istedikleri depolama alanı türünü seçebilir ve bu depolama alanı konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolama alanını kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama alanı, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasını da sağlar. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama alanı yapılandırması görsel arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama alanı bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama alanı görsel arayüzü belgeleri ile dış depolama alanı yapılandırma dosyası belgelerine bakabilirsiniz.",
"Confirm" : "Onayla",
"Storage credentials" : "Depolama alanı kimlik doğrulama bilgileri",
"To access the storage, you need to provide the authentication credentials." : "Depolama alanına erişebilmek için kimlik doğrulama bilgilerini vermeniz gerekir.",
@@ -137,7 +137,7 @@ OC.L10N.register(
"Disconnect" : "Bağlantıyı kes",
"Unknown backend: {backendName}" : "Bilinmeyen arka uç: {backendName}",
"Admin defined" : "Yönetici ayarlamış",
- "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi kullanımdan kaldırıldı. Durumu denetlemek için tıklayın",
+ "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi devre dışı bırakıldı. Durumu denetlemek için tıklayın",
"Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Bu dış depolama biriminin bağlantısını kesmek istediğinize emin misiniz? Bu işlem, depolamayı Nextcloud üzerinden kaldırırarak, şu anda bağlı olan ve eşitlenen herhangi bir istemcide bu dosya ve klasörlerin silinmesine yol açar. Ancak dış depolama üzerindeki hiçbir dosya ve klasör silinmez.",
"Delete storage?" : "Depolama silinsin mi?",
"Click to recheck the configuration" : "Yapılandırmayı yeniden denetlemek için tıklayın",
diff --git a/apps/files_external/l10n/tr.json b/apps/files_external/l10n/tr.json
index 20f805c4ea3..01cd0b36417 100644
--- a/apps/files_external/l10n/tr.json
+++ b/apps/files_external/l10n/tr.json
@@ -89,13 +89,13 @@
"OpenStack Object Storage" : "OpenStack nesne depolama",
"Service name" : "Hizmet adı",
"Request timeout (seconds)" : "İstek zaman aşımı (saniye)",
- "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.",
- "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da kullanıma alınmamış. %s bağlanamaz. Lütfen desteği kurması için BT yöneticiniz ile görüşün.",
+ "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP cURL desteği kurulmamış ya da etkin değil. %s bağlanamaz. Kurulumu için lütfen BT yöneticiniz ile görüşün.",
+ "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "PHP FTP desteği kurulmamış ya da etkin değil. %s bağlanamaz. Kurulumu için lütfen BT yöneticiniz ile görüşün.",
"\"%1$s\" is not installed. Mounting of %2$s is not possible. Please ask your system administrator to install it." : "\"%1$s\" kurulmamış. %2$s\" bağlanamaz. Lütfen kurulum için BT yöneticiniz ile görüşün.",
"External storage" : "Dış depolama",
"External storage support" : "Dış depolama desteği",
"Adds basic external storage support" : "Temel dış depolama desteği ekler",
- "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama alanı hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, kullanıma almak istedikleri depolama alanı türünü seçebilir ve bu depolama alanı konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolama alanını kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama alanı, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasını da sağlar. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama alanı yapılandırması görsel arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama alanı bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama alanı görsel arayüzü belgeleri ile dış depolama alanı yapılandırma dosyası belgelerine bakabilirsiniz.",
+ "This application enables administrators to configure connections to external storage providers, such as FTP servers, S3 or SWIFT object stores, other Nextcloud servers, WebDAV servers, and more. Administration can choose which types of storage to enable and can mount these storage locations for an account, a group, or the entire system. Users will see a new folder appear in their root Nextcloud directory, which they can access and use like any other Nextcloud folder. External storage also allows people to share files stored in these external locations. In these cases, the credentials for the owner of the file are used when the recipient requests the file from external storage, thereby ensuring that the recipient can access the shared file.\n\nExternal storage can be configured using the GUI or at the command line. This second option provides the administration with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation." : "Bu uygulama yöneticilerin FTP sunucular, S3 ya da SWIFT nesne mağazaları, diğer Nextcloud sunucuları ve WebDAV sunucuları gibi çeşitli dış depolama alanı hizmeti sağlayıcıları ile bağlantı kurmasını sağlar. Yöneticiler, etkinleştirmek istedikleri depolama alanı türünü seçebilir ve bu depolama alanı konumlarını belirli bir hesap, bir grup ya da tüm sistem için ekleyebilir. Kullanıcılar bağlanan depolama alanını kök Nextcloud klasörü altında yeni bir klasör olarak görebilir ve diğer Nextcloud klasörleri gibi erişebilir. Dış depolama alanı, bu konumlarda depolanan dosyaların kişiler tarafından paylaşılmasını da sağlar. Bu durumda alıcıların dış dosyaya erişebileceğinden emin olmak için yapılan dosya erişimi isteklerinde, dosya sahibinin kimlik doğrulama bilgileri kullanılır.\n\nDış depolama alanı yapılandırması görsel arayüzden ya da komut satırından yapılabilir. Komut satırı seçeneğinde, yöneticiler için toplu dış depolama alanı bağlama ve bağlama noktası öncelikleri gibi esnek yapılandırma seçenekleri bulunur. Ayrıntılı bilgi almak için dış depolama alanı görsel arayüzü belgeleri ile dış depolama alanı yapılandırma dosyası belgelerine bakabilirsiniz.",
"Confirm" : "Onayla",
"Storage credentials" : "Depolama alanı kimlik doğrulama bilgileri",
"To access the storage, you need to provide the authentication credentials." : "Depolama alanına erişebilmek için kimlik doğrulama bilgilerini vermeniz gerekir.",
@@ -135,7 +135,7 @@
"Disconnect" : "Bağlantıyı kes",
"Unknown backend: {backendName}" : "Bilinmeyen arka uç: {backendName}",
"Admin defined" : "Yönetici ayarlamış",
- "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi kullanımdan kaldırıldı. Durumu denetlemek için tıklayın",
+ "Automatic status checking is disabled due to the large number of configured storages, click to check status" : "Çok sayıda depolama yapılandırılmış olduğundan otomatik durum denetimi devre dışı bırakıldı. Durumu denetlemek için tıklayın",
"Are you sure you want to disconnect this external storage? It will make the storage unavailable in Nextcloud and will lead to a deletion of these files and folders on any sync client that is currently connected but will not delete any files and folders on the external storage itself." : "Bu dış depolama biriminin bağlantısını kesmek istediğinize emin misiniz? Bu işlem, depolamayı Nextcloud üzerinden kaldırırarak, şu anda bağlı olan ve eşitlenen herhangi bir istemcide bu dosya ve klasörlerin silinmesine yol açar. Ancak dış depolama üzerindeki hiçbir dosya ve klasör silinmez.",
"Delete storage?" : "Depolama silinsin mi?",
"Click to recheck the configuration" : "Yapılandırmayı yeniden denetlemek için tıklayın",
diff --git a/apps/files_external/lib/Command/Scan.php b/apps/files_external/lib/Command/Scan.php
index 4f29dae1ce0..75d98878baa 100644
--- a/apps/files_external/lib/Command/Scan.php
+++ b/apps/files_external/lib/Command/Scan.php
@@ -54,6 +54,11 @@ class Scan extends StorageAuthBase {
InputOption::VALUE_OPTIONAL,
'The path in the storage to scan',
''
+ )->addOption(
+ 'unscanned',
+ '',
+ InputOption::VALUE_NONE,
+ 'only scan files which are marked as not fully scanned'
);
parent::configure();
}
@@ -84,7 +89,15 @@ class Scan extends StorageAuthBase {
});
try {
- $scanner->scan($path);
+ if ($input->getOption('unscanned')) {
+ if ($path !== '') {
+ $output->writeln('<error>--unscanned is mutually exclusive with --path</error>');
+ return 1;
+ }
+ $scanner->backgroundScan();
+ } else {
+ $scanner->scan($path);
+ }
} catch (LockedException $e) {
if (is_string($e->getReadablePath()) && str_starts_with($e->getReadablePath(), 'scanner::')) {
if ($e->getReadablePath() === 'scanner::') {
diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
index c46d3ed5010..b40e9461287 100644
--- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
+++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-namespace OCA\files_external\tests\Config;
+namespace OCA\Files_External\Tests\Config;
use OCA\Files_External\Config\UserPlaceholderHandler;
use OCP\IRequest;
diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php
index c902aa28270..85d8b70fda7 100644
--- a/apps/files_external/tests/Service/DBConfigServiceTest.php
+++ b/apps/files_external/tests/Service/DBConfigServiceTest.php
@@ -70,7 +70,7 @@ class DBConfigServiceTest extends TestCase {
$this->dbConfig->addApplicable($id, DBConfigService::APPLICABLE_TYPE_GLOBAL, null);
$mount = $this->dbConfig->getMountById($id);
- $this->assertEquals([
+ $this->assertEqualsCanonicalizing([
['type' => DBConfigService::APPLICABLE_TYPE_USER, 'value' => 'test', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GROUP, 'value' => 'bar', 'mount_id' => $id],
['type' => DBConfigService::APPLICABLE_TYPE_GLOBAL, 'value' => null, 'mount_id' => $id]
diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
index 1a1754799dc..47be54a02d4 100644
--- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
@@ -168,7 +168,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTestCase {
$this->assertEquals($updatedStorage->getMountPoint(), $newStorage->getMountPoint());
$this->assertEquals($updatedStorage->getBackendOptions()['password'], $newStorage->getBackendOptions()['password']);
- $this->assertEquals($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers());
+ $this->assertEqualsCanonicalizing($updatedStorage->getApplicableUsers(), $newStorage->getApplicableUsers());
$this->assertEquals($updatedStorage->getApplicableGroups(), $newStorage->getApplicableGroups());
$this->assertEquals($updatedStorage->getPriority(), $newStorage->getPriority());
$this->assertEquals(0, $newStorage->getStatus());
diff --git a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
index 641f00d5147..93f2d7bf66e 100644
--- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
+++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-namespace OCA\files_external\tests\Storage;
+namespace OCA\Files_External\Tests\Storage;
use OCA\Files_External\Lib\Storage\AmazonS3;
diff --git a/apps/files_external/tests/appSpec.js b/apps/files_external/tests/appSpec.js
deleted file mode 100644
index 4d150cd36bb..00000000000
--- a/apps/files_external/tests/appSpec.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2014 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-import $ from 'jquery'
-
-describe('OCA.Files_External.App tests', function() {
- const App = OCA.Files_External.App
- let fileList
-
- beforeEach(function() {
- $('#testArea').append(
- '<div id="app-navigation">'
- + '<ul><li data-id="files"><a>Files</a></li>'
- + '<li data-id="sharingin"><a></a></li>'
- + '<li data-id="sharingout"><a></a></li>'
- + '</ul></div>'
- + '<div id="app-content">'
- + '<div id="app-content-files" class="hidden">'
- + '</div>'
- + '<div id="app-content-extstoragemounts" class="hidden">'
- + '</div>'
- + '</div>'
- + '</div>',
- )
- fileList = App.initList($('#app-content-extstoragemounts'))
- })
- afterEach(function() {
- App.fileList = null
- fileList.destroy()
- fileList = null
- })
-
- describe('initialization', function() {
- it('inits external mounts list on show', function() {
- expect(App.fileList).toBeDefined()
- })
- })
- describe('file actions', function() {
- it('provides default file actions', function() {
- const fileActions = fileList.fileActions
-
- expect(fileActions.actions.all).toBeDefined()
- expect(fileActions.actions.all.Delete).toBeDefined()
- expect(fileActions.actions.all.Rename).toBeDefined()
- expect(fileActions.actions.all.Download).toBeDefined()
-
- expect(fileActions.defaults.dir).toEqual('Open')
- })
- it('redirects to files app when opening a directory', function() {
- const oldList = OCA.Files.App.fileList
- // dummy new list to make sure it exists
- OCA.Files.App.fileList = new OCA.Files.FileList($('<table><thead></thead><tbody></tbody></table>'))
-
- const setActiveViewStub = sinon.stub(OCA.Files.App, 'setActiveView')
- // create dummy table so we can click the dom
- const $table = '<table><thead></thead><tbody class="files-fileList"></tbody></table>'
- $('#app-content-extstoragemounts').append($table)
-
- App._inFileList = null
- fileList = App.initList($('#app-content-extstoragemounts'))
-
- fileList.setFiles([{
- name: 'testdir',
- type: 'dir',
- path: '/somewhere/inside/subdir',
- counterParts: ['user2'],
- shareOwner: 'user2',
- }])
-
- fileList.findFileEl('testdir').find('td a.name').click()
-
- expect(OCA.Files.App.fileList.getCurrentDirectory()).toEqual('/somewhere/inside/subdir/testdir')
-
- expect(setActiveViewStub.calledOnce).toEqual(true)
- expect(setActiveViewStub.calledWith('files')).toEqual(true)
-
- setActiveViewStub.restore()
-
- // restore old list
- OCA.Files.App.fileList = oldList
- })
- })
-})
diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js
deleted file mode 100644
index fa6de978c81..00000000000
--- a/apps/files_external/tests/js/mountsfilelistSpec.js
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-describe('OCA.Files_External.FileList tests', function() {
- var testFiles, alertStub, notificationStub, fileList;
-
- beforeEach(function() {
- alertStub = sinon.stub(OC.dialogs, 'alert');
- notificationStub = sinon.stub(OC.Notification, 'show');
-
- // init parameters and test table elements
- $('#testArea').append(
- '<div id="app-content">' +
- // init horrible parameters
- '<input type="hidden" id="permissions" value="31"></input>' +
- // dummy controls
- '<div class="files-controls">' +
- ' <div class="actions creatable"></div>' +
- ' <div class="notCreatable"></div>' +
- '</div>' +
- // dummy table
- // TODO: at some point this will be rendered by the fileList class itself!
- '<table class="files-filestable">' +
- '<thead><tr>' +
- '<th class="hidden column-name">' +
- ' <div id="column-name-container">' +
- ' <a class="name sort columntitle" data-sort="name"><span>Name</span><span class="sort-indicator"></span></a>' +
- ' </div>' +
- '</th>' +
- '<th id="headerBackend" class="hidden column-backend">' +
- ' <a class="backend sort columntitle" data-sort="backend"><span>Storage type</span><span class="sort-indicator"></span></a>' +
- '</th>' +
- '<th id="headerScope" class="hidden column-scope column-last">' +
- ' <a class="scope sort columntitle" data-sort="scope"><span>Scope</span><span class="sort-indicator"></span></a>' +
- '</th>' +
- '</tr></thead>' +
- '<tbody class="files-fileList"></tbody>' +
- '<tfoot></tfoot>' +
- '</table>' +
- '<div class="emptyfilelist emptycontent">Empty content message</div>' +
- '</div>'
- );
- });
- afterEach(function() {
- testFiles = undefined;
- fileList.destroy();
- fileList = undefined;
-
- notificationStub.restore();
- alertStub.restore();
- });
-
- describe('loading file list for external storage', function() {
- var ocsResponse;
- var reloading;
-
- beforeEach(function() {
- fileList = new OCA.Files_External.FileList(
- $('#app-content')
- );
-
- reloading = fileList.reload();
-
- /* jshint camelcase: false */
- ocsResponse = {
- ocs: {
- meta: {
- status: 'ok',
- statuscode: 100,
- message: null
- },
- data: [{
- name: 'smb mount',
- path: '/mount points',
- type: 'dir',
- backend: 'SMB',
- scope: 'personal',
- permissions: OC.PERMISSION_READ | OC.PERMISSION_DELETE
- }, {
- name: 'sftp mount',
- path: '/another mount points',
- type: 'dir',
- backend: 'SFTP',
- scope: 'system',
- permissions: OC.PERMISSION_READ
- }]
- }
- };
- });
- it('render storage list', function(done) {
- var request;
- var $rows;
- var $tr;
-
- expect(fakeServer.requests.length).toEqual(1);
- request = fakeServer.requests[0];
- expect(request.url).toEqual(
- OC.linkToOCS('apps/files_external/api/v1') + 'mounts?format=json'
- );
-
- fakeServer.requests[0].respond(
- 200,
- { 'Content-Type': 'application/json' },
- JSON.stringify(ocsResponse)
- );
-
- return reloading.then(function() {
- $rows = fileList.$el.find('tbody tr');
- expect($rows.length).toEqual(2);
-
- $tr = $rows.eq(0);
- expect($tr.attr('data-id')).not.toBeDefined();
- expect($tr.attr('data-type')).toEqual('dir');
- expect($tr.attr('data-file')).toEqual('sftp mount');
- expect($tr.attr('data-path')).toEqual('/another mount points');
- expect($tr.attr('data-size')).not.toBeDefined();
- expect($tr.attr('data-permissions')).toEqual('1'); // read only
- expect($tr.find('a.name').attr('href')).toEqual(
- OC.getRootPath() +
- '/index.php/apps/files' +
- '?dir=/another%20mount%20points/sftp%20mount'
- );
- expect($tr.find('.nametext').text().trim()).toEqual('sftp mount');
- expect($tr.find('.column-scope > span').text().trim()).toEqual('System');
- expect($tr.find('.column-backend').text().trim()).toEqual('SFTP');
-
- $tr = $rows.eq(1);
- expect($tr.attr('data-id')).not.toBeDefined();
- expect($tr.attr('data-type')).toEqual('dir');
- expect($tr.attr('data-file')).toEqual('smb mount');
- expect($tr.attr('data-path')).toEqual('/mount points');
- expect($tr.attr('data-size')).not.toBeDefined();
- expect($tr.attr('data-permissions')).toEqual('9'); // read and delete
- expect($tr.find('a.name').attr('href')).toEqual(
- OC.getRootPath() +
- '/index.php/apps/files' +
- '?dir=/mount%20points/smb%20mount'
- );
- expect($tr.find('.nametext').text().trim()).toEqual('smb mount');
- expect($tr.find('.column-scope > span').text().trim()).toEqual('Personal');
- expect($tr.find('.column-backend').text().trim()).toEqual('SMB');
- }).then(done, done);
- });
- });
-});
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
deleted file mode 100644
index f79191151d1..00000000000
--- a/apps/files_external/tests/js/settingsSpec.js
+++ /dev/null
@@ -1,447 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-describe('OCA.Files_External.Settings tests', function() {
- var clock;
- var select2Stub;
- var select2ApplicableUsers;
-
- beforeEach(function() {
- clock = sinon.useFakeTimers();
- select2ApplicableUsers = [];
- select2Stub = sinon.stub($.fn, 'select2').callsFake(function(args) {
- if (args === 'val') {
- return select2ApplicableUsers;
- }
- return {
- on: function() { return this; }
- };
- });
-
- // view still requires an existing DOM table
- $('#testArea').append(
- '<table id="externalStorage" data-admin="true">' +
- '<thead></thead>' +
- '<tbody>' +
- '<tr id="addMountPoint" data-id="">' +
- '<td class="status"></td>' +
- '<td class="mountPoint"><input type="text" name="mountPoint"/></td>' +
- '<td class="backend">' +
- '<select class="selectBackend">' +
- '<option disable selected>Add storage</option>' +
- '<option value="\\OC\\TestBackend">Test Backend</option>' +
- '<option value="\\OC\\AnotherTestBackend">Another Test Backend</option>' +
- '<option value="\\OC\\InputsTestBackend">Inputs test backend</option>' +
- '</select>' +
- '</td>' +
- '<td class="authentication"></td>' +
- '<td class="configuration"></td>' +
- '<td class="applicable">' +
- '<input type="checkbox" class="applicableToAllUsers">' +
- '<input type="hidden" class="applicableUsers">' +
- '</td>' +
- '<td class="mountOptionsToggle">'+
- '<div class="icon-more" title="Advanced settings" deluminate_imagetype="unknown"></div>'+
- '<input type="hidden" class="mountOptions"/>'+
- '</td>'+
- '<td class="save">'+
- '<div class="icon-checkmark" title="Save" deluminate_imagetype="unknown"></div>'+
- '</td>'+
- '</tr>' +
- '</tbody>' +
- '</table>'
- );
- // these are usually appended into the data attribute
- // within the DOM by the server template
- $('#externalStorage .selectBackend:first').data('configurations', {
- '\\OC\\TestBackend': {
- 'identifier': '\\OC\\TestBackend',
- 'name': 'Test Backend',
- 'configuration': {
- 'field1': {
- 'value': 'Display Name 1'
- },
- 'field2': {
- 'value': 'Display Name 2',
- 'flags': 1
- }
- },
- 'authSchemes': {
- 'builtin': true,
- },
- 'priority': 11
- },
- '\\OC\\AnotherTestBackend': {
- 'identifier': '\\OC\\AnotherTestBackend',
- 'name': 'Another Test Backend',
- 'configuration': {
- 'field1': {
- 'value': 'Display Name 1'
- },
- 'field2': {
- 'value': 'Display Name 2',
- 'flags': 1
- }
- },
- 'authSchemes': {
- 'builtin': true,
- },
- 'priority': 12
- },
- '\\OC\\InputsTestBackend': {
- 'identifier': '\\OC\\InputsTestBackend',
- 'name': 'Inputs test backend',
- 'configuration': {
- 'field_text': {
- 'value': 'Text field'
- },
- 'field_password': {
- 'value': ',Password field',
- 'type': 2
- },
- 'field_bool': {
- 'value': 'Boolean field',
- 'type': 1
- },
- 'field_hidden': {
- 'value': 'Hidden field',
- 'type': 3
- },
- 'field_text_optional': {
- 'value': 'Text field optional',
- 'flags': 1
- },
- 'field_password_optional': {
- 'value': 'Password field optional',
- 'flags': 1,
- 'type': 2
- }
- },
- 'authSchemes': {
- 'builtin': true,
- },
- 'priority': 13
- }
- }
- );
-
- $('#externalStorage #addMountPoint .authentication:first').data('mechanisms', {
- 'mechanism1': {
- 'identifier': 'mechanism1',
- 'name': 'Mechanism 1',
- 'configuration': {
- },
- 'scheme': 'builtin',
- 'visibility': 3
- },
- });
-
- });
- afterEach(function() {
- select2Stub.restore();
- clock.restore();
- });
-
- describe('storage configuration', function() {
- var view;
-
- function selectBackend(backendName) {
- view.$el.find('.selectBackend:first').val(backendName).trigger('change');
- view.$el.find('.applicableToAllUsers').prop('checked', true).trigger('change');
- }
-
- beforeEach(function() {
- var $el = $('#externalStorage');
- view = new OCA.Files_External.Settings.MountConfigListView($el, {encryptionEnabled: false});
- });
- afterEach(function() {
- view = null;
- });
- describe('selecting backend', function() {
- it('populates the row and creates a new empty one', function() {
- selectBackend('\\OC\\TestBackend');
- var $firstRow = view.$el.find('tr:first');
- expect($firstRow.find('.backend').text()).toEqual('Test Backend');
- expect($firstRow.find('.selectBackend').length).toEqual(0);
-
- // TODO: check "remove" button visibility
-
- // the suggested mount point name
- expect($firstRow.find('[name=mountPoint]').val()).toEqual('TestBackend');
-
- // TODO: check that the options have been created
-
- // TODO: check select2 call on the ".applicableUsers" element
-
- var $emptyRow = $firstRow.next('tr');
- expect($emptyRow.length).toEqual(1);
- expect($emptyRow.find('.selectBackend').length).toEqual(1);
- expect($emptyRow.find('.applicable select').length).toEqual(0);
-
- // TODO: check "remove" button visibility
- });
- it('shows row even if selection row is hidden', function() {
- selectBackend('\\OC\\TestBackend');
- view.$el.find('tr#addMountPoint').hide();
- expect(view.$el.find('tr:first').is(':visible')).toBe(true);
- expect(view.$el.find('tr#addMountPoint').is(':visible')).toBe(false);
- });
- // TODO: test with personal mounts (no applicable fields)
- // TODO: test suggested mount point logic
- });
- describe('saving storages', function() {
- var $tr;
-
- beforeEach(function() {
- selectBackend('\\OC\\TestBackend');
- $tr = view.$el.find('tr:first');
- });
- it('saves storage after clicking the save button', function() {
- var $field1 = $tr.find('input[data-parameter=field1]');
- expect($field1.length).toEqual(1);
- $field1.val('test');
- $field1.trigger(new $.Event('keyup', {keyCode: 97}));
-
- var $mountOptionsField = $tr.find('input.mountOptions');
- expect($mountOptionsField.length).toEqual(1);
- $mountOptionsField.val(JSON.stringify({previews:true}));
-
- var $saveButton = $tr.find('td.save .icon-checkmark');
- $saveButton.click();
-
- expect(fakeServer.requests.length).toEqual(1);
- var request = fakeServer.requests[0];
- expect(request.url).toEqual(OC.getRootPath() + '/index.php/apps/files_external/globalstorages');
- expect(JSON.parse(request.requestBody)).toEqual({
- backend: '\\OC\\TestBackend',
- authMechanism: 'mechanism1',
- backendOptions: {
- 'field1': 'test',
- 'field2': ''
- },
- mountPoint: 'TestBackend',
- priority: 11,
- applicableUsers: [],
- applicableGroups: [],
- mountOptions: {
- 'previews': true
- },
- testOnly: true
- });
-
- // TODO: respond and check data-id
- });
- it('saves storage with applicable users', function() {
- var $field1 = $tr.find('input[data-parameter=field1]');
- expect($field1.length).toEqual(1);
- $field1.val('test');
- $field1.trigger(new $.Event('keyup', {keyCode: 97}));
-
- $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change');
- select2ApplicableUsers = ['user1', 'user2', 'group1(group)', 'group2(group)'];
-
- var $saveButton = $tr.find('td.save .icon-checkmark');
- $saveButton.click();
-
- expect(fakeServer.requests.length).toEqual(1);
- var request = fakeServer.requests[0];
- expect(request.url).toEqual(OC.getRootPath() + '/index.php/apps/files_external/globalstorages');
- expect(JSON.parse(request.requestBody)).toEqual({
- backend: '\\OC\\TestBackend',
- authMechanism: 'mechanism1',
- backendOptions: {
- 'field1': 'test',
- 'field2': ''
- },
- mountPoint: 'TestBackend',
- priority: 11,
- applicableUsers: ['user1', 'user2'],
- applicableGroups: ['group1', 'group2'],
- mountOptions: {
- encrypt: true,
- previews: true,
- enable_sharing: false,
- filesystem_check_changes: 1,
- encoding_compatibility: false,
- readonly: false,
- },
- testOnly: true
- });
-
- // TODO: respond and check data-id
- });
- it('does not saves storage without applicable users and unchecked all users checkbox', function() {
- var $field1 = $tr.find('input[data-parameter=field1]');
- expect($field1.length).toEqual(1);
- $field1.val('test');
- $field1.trigger(new $.Event('keyup', {keyCode: 97}));
-
- $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change');
-
- var $saveButton = $tr.find('td.save .icon-checkmark');
- $saveButton.click();
-
- expect(fakeServer.requests.length).toEqual(0);
- });
-
- it('saves storage after closing mount options popovermenu', function() {
- $tr.find('.mountOptionsToggle .icon-more').click();
- $tr.find('[name=previews]').trigger(new $.Event('keyup', {keyCode: 97}));
- $tr.find('input[data-parameter=field1]').val('test');
-
- // does not save inside the popovermenu
- expect(fakeServer.requests.length).toEqual(0);
-
- $('body').mouseup();
-
- // but after closing the popovermenu
- expect(fakeServer.requests.length).toEqual(1);
- });
- // TODO: status indicator
- });
- describe('validate storage configuration', function() {
- var $tr;
-
- beforeEach(function() {
- selectBackend('\\OC\\InputsTestBackend');
- $tr = view.$el.find('tr:first');
- });
-
- it('lists missing fields in storage errors', function() {
- $tr.find('.applicableToAllUsers').prop('checked', false).trigger('change');
- var storage = view.getStorageConfig($tr);
-
- expect(storage.errors).toEqual({
- backendOptions: ['field_text', 'field_password'],
- requiredApplicable: true,
- });
- });
-
- it('does not list applicable when all users checkbox is ticked', function() {
- var storage = view.getStorageConfig($tr);
-
- expect(storage.errors).toEqual({
- backendOptions: ['field_text', 'field_password']
- });
- });
-
- it('highlights missing non-optional fields', function() {
- _.each([
- 'field_text',
- 'field_password'
- ], function(param) {
- expect($tr.find('input[data-parameter='+param+']').hasClass('warning-input')).toBe(true);
- });
- _.each([
- 'field_bool',
- 'field_hidden',
- 'field_text_optional',
- 'field_password_optional'
- ], function(param) {
- expect($tr.find('input[data-parameter='+param+']').hasClass('warning-input')).toBe(false);
- });
- });
-
- it('validates correct storage', function() {
- $tr.find('[name=mountPoint]').val('mountpoint');
-
- $tr.find('input[data-parameter=field_text]').val('foo');
- $tr.find('input[data-parameter=field_password]').val('bar');
- $tr.find('input[data-parameter=field_text_optional]').val('foobar');
- // don't set field_password_optional
- $tr.find('input[data-parameter=field_hidden]').val('baz');
-
- var storage = view.getStorageConfig($tr);
-
- expect(storage.validate()).toBe(true);
- });
-
- it('checks missing mount point', function() {
- $tr.find('[name=mountPoint]').val('');
-
- $tr.find('input[data-parameter=field_text]').val('foo');
- $tr.find('input[data-parameter=field_password]').val('bar');
-
- var storage = view.getStorageConfig($tr);
-
- expect(storage.validate()).toBe(false);
- });
- });
- describe('update storage', function() {
- // TODO
- });
- describe('delete storage', function() {
- // TODO
- });
- describe('recheck storages', function() {
- // TODO
- });
- describe('mount options popovermenu', function() {
- var $tr;
- var $td;
-
- beforeEach(function() {
- selectBackend('\\OC\\TestBackend');
- $tr = view.$el.find('tr:first');
- $td = $tr.find('.mountOptionsToggle');
- });
-
- it('shows popovermenu when clicking on toggle button, hides when clicking outside', function() {
- $td.find('.icon-more').click();
-
- expect($td.find('.popovermenu.open').length).toEqual(1);
-
- $('body').mouseup();
-
- expect($td.find('.popovermenu.open').length).toEqual(0);
- });
-
- it('doesnt show the encryption option when encryption is disabled', function () {
- view._encryptionEnabled = false;
- $td.find('.icon-more').click();
-
- expect($td.find('.popovermenu [name=encrypt]:visible').length).toEqual(0);
-
- $('body').mouseup();
-
- expect($td.find('.popovermenu.open').length).toEqual(0);
- });
-
- it('reads config from mountOptions field', function() {
- $tr.find('input.mountOptions').val(JSON.stringify({previews:false}));
-
- $td.find('.icon-more').click();
- expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(false);
- $('body').mouseup();
-
- $tr.find('input.mountOptions').val(JSON.stringify({previews:true}));
- $td.find('.icon-more').click();
- expect($td.find('.popovermenu [name=previews]').prop('checked')).toEqual(true);
- });
-
- it('writes config into mountOptions field', function() {
- $td.find('.icon-more').click();
- // defaults to true
- var $field = $td.find('.popovermenu [name=previews]');
- expect($field.prop('checked')).toEqual(true);
- $td.find('.popovermenu [name=filesystem_check_changes]').val(0);
- $('body').mouseup();
-
- expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({
- encrypt: true,
- previews: true,
- enable_sharing: false,
- filesystem_check_changes: 0,
- encoding_compatibility: false,
- readonly: false
- });
- });
- });
- });
- describe('allow user mounts section', function() {
- // TODO: test allowUserMounting section
- });
-});