diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/l10n/de.js | 12 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de.json | 12 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de_DE.js | 12 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de_DE.json | 12 | ||||
-rw-r--r-- | apps/files_sharing/l10n/pt_BR.js | 11 | ||||
-rw-r--r-- | apps/files_sharing/l10n/pt_BR.json | 11 | ||||
-rw-r--r-- | apps/files_sharing/l10n/sr.js | 1 | ||||
-rw-r--r-- | apps/files_sharing/l10n/sr.json | 1 | ||||
-rw-r--r-- | apps/files_sharing/l10n/zh_CN.js | 12 | ||||
-rw-r--r-- | apps/files_sharing/l10n/zh_CN.json | 12 | ||||
-rw-r--r-- | apps/files_sharing/lib/Capabilities.php | 5 | ||||
-rw-r--r-- | apps/files_sharing/lib/MountProvider.php | 15 | ||||
-rw-r--r-- | apps/files_sharing/tests/CapabilitiesTest.php | 34 |
13 files changed, 112 insertions, 38 deletions
diff --git a/apps/files_sharing/l10n/de.js b/apps/files_sharing/l10n/de.js index 79ec648162d..f0634117708 100644 --- a/apps/files_sharing/l10n/de.js +++ b/apps/files_sharing/l10n/de.js @@ -304,13 +304,13 @@ OC.L10N.register( "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Dateien innerhalb Ihrer Organisation teilen. Auch Empfänger, die auf die Datei bereits zugreifen können, können diesen Link für einen einfachen Zugriff nutzen.", - "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Du kannst Nextcloud-Konten auch auf anderen Instanzen mithilfe der föderierten Cloud-ID teilen.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Du kannst Nextcloud-Konten auch auf anderen Instanzen mithilfe der Federated-Cloud-ID teilen.", "Shares from apps or other sources which are not included in internal or external shares." : "Freigaben aus Apps oder anderen Quellen, die nicht in internen oder externen Freigaben enthalten sind.", - "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federierte Cloud-IDs eingeben", - "Type names or teams" : "Namen oder Federierte Cloud-IDs eingeben", - "Type a federated cloud ID" : "Eine Federierte Cloud-ID eingeben", - "Type an email" : "Eine E-Mailadresse eingeben", - "Type an email or federated cloud ID" : "Eine E-Mailadresse oder eine Federierte Cloud-ID eingeben", + "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federated-Cloud-IDs eingeben", + "Type names or teams" : "Namen oder Federated-Cloud-IDs eingeben", + "Type a federated cloud ID" : "Eine Federated-Cloud-ID eingeben", + "Type an email" : "Eine E-Mail-Adresse eingeben", + "Type an email or federated cloud ID" : "Eine E-Mail-Adresse oder eine Federated-Cloud-ID eingeben", "Unable to load the shares list" : "Liste der Freigaben konnte nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", "this share just expired." : "Diese Freigabe ist gerade abgelaufen.", diff --git a/apps/files_sharing/l10n/de.json b/apps/files_sharing/l10n/de.json index 79e463107ea..161077411d2 100644 --- a/apps/files_sharing/l10n/de.json +++ b/apps/files_sharing/l10n/de.json @@ -302,13 +302,13 @@ "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Dateien innerhalb Ihrer Organisation teilen. Auch Empfänger, die auf die Datei bereits zugreifen können, können diesen Link für einen einfachen Zugriff nutzen.", - "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Du kannst Nextcloud-Konten auch auf anderen Instanzen mithilfe der föderierten Cloud-ID teilen.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Du kannst Nextcloud-Konten auch auf anderen Instanzen mithilfe der Federated-Cloud-ID teilen.", "Shares from apps or other sources which are not included in internal or external shares." : "Freigaben aus Apps oder anderen Quellen, die nicht in internen oder externen Freigaben enthalten sind.", - "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federierte Cloud-IDs eingeben", - "Type names or teams" : "Namen oder Federierte Cloud-IDs eingeben", - "Type a federated cloud ID" : "Eine Federierte Cloud-ID eingeben", - "Type an email" : "Eine E-Mailadresse eingeben", - "Type an email or federated cloud ID" : "Eine E-Mailadresse oder eine Federierte Cloud-ID eingeben", + "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federated-Cloud-IDs eingeben", + "Type names or teams" : "Namen oder Federated-Cloud-IDs eingeben", + "Type a federated cloud ID" : "Eine Federated-Cloud-ID eingeben", + "Type an email" : "Eine E-Mail-Adresse eingeben", + "Type an email or federated cloud ID" : "Eine E-Mail-Adresse oder eine Federated-Cloud-ID eingeben", "Unable to load the shares list" : "Liste der Freigaben konnte nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", "this share just expired." : "Diese Freigabe ist gerade abgelaufen.", diff --git a/apps/files_sharing/l10n/de_DE.js b/apps/files_sharing/l10n/de_DE.js index a3507239899..a7dc879a8f0 100644 --- a/apps/files_sharing/l10n/de_DE.js +++ b/apps/files_sharing/l10n/de_DE.js @@ -304,13 +304,13 @@ OC.L10N.register( "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Dateien innerhalb Ihrer Organisation teilen. Auch Empfänger, die auf die Datei bereits zugreifen können, können diesen Link für einen einfachen Zugriff nutzen.", - "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Sie können Nextcloud-Konten auch auf anderen Instanzen mithilfe ihrer föderierten Cloud-ID teilen.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Sie können Nextcloud-Konten auch auf anderen Instanzen mithilfe ihrer Federated-Cloud-ID teilen.", "Shares from apps or other sources which are not included in internal or external shares." : "Freigaben aus Apps oder anderen Quellen, die nicht in internen oder externen Freigaben enthalten sind.", - "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federierte Cloud-IDs eingeben", - "Type names or teams" : "Namen oder Federierte Cloud-IDs eingeben", - "Type a federated cloud ID" : "Eine Federierte Cloud-ID eingeben", - "Type an email" : "Eine E-Mailadresse eingeben", - "Type an email or federated cloud ID" : "Eine E-Mailadresse oder eine Federierte Cloud-ID eingeben", + "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federated-Cloud-IDs eingeben", + "Type names or teams" : "Namen oder Teams eingeben", + "Type a federated cloud ID" : "Eine Federated-Cloud-ID eingeben", + "Type an email" : "Eine E-Mail-Adresse eingeben", + "Type an email or federated cloud ID" : "Eine E-Mail-Adresse oder eine Federated-Cloud-ID eingeben", "Unable to load the shares list" : "Liste der Freigaben kann nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", "this share just expired." : "Diese Freigabe ist gerade abgelaufen.", diff --git a/apps/files_sharing/l10n/de_DE.json b/apps/files_sharing/l10n/de_DE.json index 41d191e8166..7e4298f986a 100644 --- a/apps/files_sharing/l10n/de_DE.json +++ b/apps/files_sharing/l10n/de_DE.json @@ -302,13 +302,13 @@ "Link shares" : "Freigaben teilen", "Shares" : "Freigaben", "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Dateien innerhalb Ihrer Organisation teilen. Auch Empfänger, die auf die Datei bereits zugreifen können, können diesen Link für einen einfachen Zugriff nutzen.", - "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Sie können Nextcloud-Konten auch auf anderen Instanzen mithilfe ihrer föderierten Cloud-ID teilen.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Dateien über öffentliche Links und E-Mail-Adressen mit anderen außerhalb Ihrer Organisation teilen. Sie können Nextcloud-Konten auch auf anderen Instanzen mithilfe ihrer Federated-Cloud-ID teilen.", "Shares from apps or other sources which are not included in internal or external shares." : "Freigaben aus Apps oder anderen Quellen, die nicht in internen oder externen Freigaben enthalten sind.", - "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federierte Cloud-IDs eingeben", - "Type names or teams" : "Namen oder Federierte Cloud-IDs eingeben", - "Type a federated cloud ID" : "Eine Federierte Cloud-ID eingeben", - "Type an email" : "Eine E-Mailadresse eingeben", - "Type an email or federated cloud ID" : "Eine E-Mailadresse oder eine Federierte Cloud-ID eingeben", + "Type names, teams, federated cloud IDs" : "Namen, Teams oder Federated-Cloud-IDs eingeben", + "Type names or teams" : "Namen oder Teams eingeben", + "Type a federated cloud ID" : "Eine Federated-Cloud-ID eingeben", + "Type an email" : "Eine E-Mail-Adresse eingeben", + "Type an email or federated cloud ID" : "Eine E-Mail-Adresse oder eine Federated-Cloud-ID eingeben", "Unable to load the shares list" : "Liste der Freigaben kann nicht geladen werden", "Expires {relativetime}" : "Läuft {relativetime} ab", "this share just expired." : "Diese Freigabe ist gerade abgelaufen.", diff --git a/apps/files_sharing/l10n/pt_BR.js b/apps/files_sharing/l10n/pt_BR.js index 4f9db865df5..c308cfdb122 100644 --- a/apps/files_sharing/l10n/pt_BR.js +++ b/apps/files_sharing/l10n/pt_BR.js @@ -202,6 +202,7 @@ OC.L10N.register( "Unshare" : "Descompartilhar", "Cannot copy, please copy the link manually" : "Não é possível copiar, copie o link manualmente", "Copy internal link" : "Copiar link interno", + "For people who already have access" : "Para pessoas que já têm acesso", "Internal link" : "Link interno", "{shareWith} by {initiator}" : "{shareWith} por {initiator}", "Shared via link by {initiator}" : "Compartilhado via link por {initiator}", @@ -212,6 +213,7 @@ OC.L10N.register( "Share link ({index})" : "Link de compartilhamento ({index})", "Create public link" : "Criar link público", "Actions for \"{title}\"" : "Ações para \"{title}\"", + "Copy public link of \"{title}\"" : "Copiar link público de \"{title}\"", "Error, please enter proper password and/or expiration date" : "Erro, digite a senha correta e/ou a data de validade", "Link share created" : "Compartilhamento por link criado", "Error while creating the share" : "Erro ao criar o compartilhamento", @@ -256,6 +258,7 @@ OC.L10N.register( "Successfully uploaded files" : "Arquivos carregados com sucesso", "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", + "Share with {user}" : "Compartilhe com {user}", "Share with email {email}" : "Compartilhar com e-mail {email}", "Share with group" : "Compartilhar com grupo", "Share in conversation" : "Compartilhar na conversa", @@ -300,6 +303,14 @@ OC.L10N.register( "Unable to fetch inherited shares" : "Não foi possível buscar compartilhamentos herdados", "Link shares" : "Compartilhamentos por link", "Shares" : "Compartilhamentos", + "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Compartilhe arquivos dentro da sua organização. Os destinatários que já conseguem visualizar o arquivo também podem usar este link para facilitar o acesso.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Compartilhe arquivos com outras pessoas fora da sua organização por meio de links públicos e endereços de e-mail. Você também pode compartilhar com contas Nextcloud em outras instâncias usando o ID de nuvem federado delas.", + "Shares from apps or other sources which are not included in internal or external shares." : "Compartilhamentos de aplicativos ou outras fontes que não estão incluídos em compartilhamentos internos ou externos.", + "Type names, teams, federated cloud IDs" : "Digite nomes, equipes, IDs de nuvem federada", + "Type names or teams" : "Digite nomes ou equipes", + "Type a federated cloud ID" : "Digite um ID de nuvem federada", + "Type an email" : "Digite um e-mail", + "Type an email or federated cloud ID" : "Digite um e-mail ou ID de nuvem federada", "Unable to load the shares list" : "Não foi possível carregar a lista de compartilhamentos", "Expires {relativetime}" : "Expira {relativetime}", "this share just expired." : "esse compartilhamento acabou de expirar.", diff --git a/apps/files_sharing/l10n/pt_BR.json b/apps/files_sharing/l10n/pt_BR.json index 1d6f17a194f..27b631d6137 100644 --- a/apps/files_sharing/l10n/pt_BR.json +++ b/apps/files_sharing/l10n/pt_BR.json @@ -200,6 +200,7 @@ "Unshare" : "Descompartilhar", "Cannot copy, please copy the link manually" : "Não é possível copiar, copie o link manualmente", "Copy internal link" : "Copiar link interno", + "For people who already have access" : "Para pessoas que já têm acesso", "Internal link" : "Link interno", "{shareWith} by {initiator}" : "{shareWith} por {initiator}", "Shared via link by {initiator}" : "Compartilhado via link por {initiator}", @@ -210,6 +211,7 @@ "Share link ({index})" : "Link de compartilhamento ({index})", "Create public link" : "Criar link público", "Actions for \"{title}\"" : "Ações para \"{title}\"", + "Copy public link of \"{title}\"" : "Copiar link público de \"{title}\"", "Error, please enter proper password and/or expiration date" : "Erro, digite a senha correta e/ou a data de validade", "Link share created" : "Compartilhamento por link criado", "Error while creating the share" : "Erro ao criar o compartilhamento", @@ -254,6 +256,7 @@ "Successfully uploaded files" : "Arquivos carregados com sucesso", "View terms of service" : "Ver os termos de serviço", "Terms of service" : "Termos de serviço", + "Share with {user}" : "Compartilhe com {user}", "Share with email {email}" : "Compartilhar com e-mail {email}", "Share with group" : "Compartilhar com grupo", "Share in conversation" : "Compartilhar na conversa", @@ -298,6 +301,14 @@ "Unable to fetch inherited shares" : "Não foi possível buscar compartilhamentos herdados", "Link shares" : "Compartilhamentos por link", "Shares" : "Compartilhamentos", + "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "Compartilhe arquivos dentro da sua organização. Os destinatários que já conseguem visualizar o arquivo também podem usar este link para facilitar o acesso.", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "Compartilhe arquivos com outras pessoas fora da sua organização por meio de links públicos e endereços de e-mail. Você também pode compartilhar com contas Nextcloud em outras instâncias usando o ID de nuvem federado delas.", + "Shares from apps or other sources which are not included in internal or external shares." : "Compartilhamentos de aplicativos ou outras fontes que não estão incluídos em compartilhamentos internos ou externos.", + "Type names, teams, federated cloud IDs" : "Digite nomes, equipes, IDs de nuvem federada", + "Type names or teams" : "Digite nomes ou equipes", + "Type a federated cloud ID" : "Digite um ID de nuvem federada", + "Type an email" : "Digite um e-mail", + "Type an email or federated cloud ID" : "Digite um e-mail ou ID de nuvem federada", "Unable to load the shares list" : "Não foi possível carregar a lista de compartilhamentos", "Expires {relativetime}" : "Expira {relativetime}", "this share just expired." : "esse compartilhamento acabou de expirar.", diff --git a/apps/files_sharing/l10n/sr.js b/apps/files_sharing/l10n/sr.js index 894bb17b920..a32961e5ab2 100644 --- a/apps/files_sharing/l10n/sr.js +++ b/apps/files_sharing/l10n/sr.js @@ -202,6 +202,7 @@ OC.L10N.register( "Unshare" : "Укини дељење", "Cannot copy, please copy the link manually" : "Не могу да копирам, копирајте везу ручно", "Copy internal link" : "Копирај интерну везу", + "For people who already have access" : "Особе које већ имају приступ", "Internal link" : "Интерна веза", "{shareWith} by {initiator}" : "{shareWith} od {initiator}", "Shared via link by {initiator}" : "{initiator} поделио преко везе", diff --git a/apps/files_sharing/l10n/sr.json b/apps/files_sharing/l10n/sr.json index 4a59406e5ac..af0e916dc89 100644 --- a/apps/files_sharing/l10n/sr.json +++ b/apps/files_sharing/l10n/sr.json @@ -200,6 +200,7 @@ "Unshare" : "Укини дељење", "Cannot copy, please copy the link manually" : "Не могу да копирам, копирајте везу ручно", "Copy internal link" : "Копирај интерну везу", + "For people who already have access" : "Особе које већ имају приступ", "Internal link" : "Интерна веза", "{shareWith} by {initiator}" : "{shareWith} od {initiator}", "Shared via link by {initiator}" : "{initiator} поделио преко везе", diff --git a/apps/files_sharing/l10n/zh_CN.js b/apps/files_sharing/l10n/zh_CN.js index caceb9e99af..67f2717fa86 100644 --- a/apps/files_sharing/l10n/zh_CN.js +++ b/apps/files_sharing/l10n/zh_CN.js @@ -202,6 +202,7 @@ OC.L10N.register( "Unshare" : "取消共享", "Cannot copy, please copy the link manually" : "无法复制,请手动复制链接", "Copy internal link" : "复制内部链接", + "For people who already have access" : "对于已经拥有访问权限的人员", "Internal link" : "内部链接", "{shareWith} by {initiator}" : "由 {initiator} 通过 {shareWith} 共享", "Shared via link by {initiator}" : "由 {initiator} 通过链接共享", @@ -212,6 +213,7 @@ OC.L10N.register( "Share link ({index})" : "分享链接({index})", "Create public link" : "生成公开链接地址", "Actions for \"{title}\"" : "“{title}”的动作", + "Copy public link of \"{title}\"" : "复制“{title}”的公开链接", "Error, please enter proper password and/or expiration date" : "错误,请输入正确的密码和/或过期日期", "Link share created" : "已创建链接分享", "Error while creating the share" : "创建共享时出错", @@ -256,6 +258,7 @@ OC.L10N.register( "Successfully uploaded files" : "已成功上传文件", "View terms of service" : "查看服务条款", "Terms of service" : "服务条款", + "Share with {user}" : "与 {user} 分享", "Share with email {email}" : "与邮箱 {email} 分享", "Share with group" : "分享至群组", "Share in conversation" : "分享至对话", @@ -300,6 +303,14 @@ OC.L10N.register( "Unable to fetch inherited shares" : "无法获取继承的共享", "Link shares" : "链接共享", "Shares" : "共享", + "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "在您的组织内共享文件。已经可以查看该文件的接收者也可以使用此链接轻松访问。", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "通过公开链接和电子邮件地址与您的组织外部的其他人共享文件。您还可以使用其他实例上的联合云 ID 将其共享给 Nextcloud 账号。", + "Shares from apps or other sources which are not included in internal or external shares." : "来自应用或其他来源的共享,不包括在内部或外部共享中。", + "Type names, teams, federated cloud IDs" : "输入名称、团队、联合云 ID", + "Type names or teams" : "输入名称或团队", + "Type a federated cloud ID" : "输入联合云 ID", + "Type an email" : "输入电子邮件", + "Type an email or federated cloud ID" : "输入电子邮件或联合云 ID", "Unable to load the shares list" : "无法加载共享列表", "Expires {relativetime}" : "过期 {relativetime}", "this share just expired." : "此共享已过期。", @@ -318,6 +329,7 @@ OC.L10N.register( "Shared" : "已共享", "Shared by {ownerDisplayName}" : "由 {ownerDisplayName} 分享", "Shared multiple times with different people" : "与不同的用户多次分享", + "Sharing options" : "共享选项", "Shared with others" : "你的共享", "Create file request" : "创建文件请求", "Upload files to {foldername}" : "将文件上传到 {foldername}", diff --git a/apps/files_sharing/l10n/zh_CN.json b/apps/files_sharing/l10n/zh_CN.json index 39c2876cfd4..6c561b3d5ed 100644 --- a/apps/files_sharing/l10n/zh_CN.json +++ b/apps/files_sharing/l10n/zh_CN.json @@ -200,6 +200,7 @@ "Unshare" : "取消共享", "Cannot copy, please copy the link manually" : "无法复制,请手动复制链接", "Copy internal link" : "复制内部链接", + "For people who already have access" : "对于已经拥有访问权限的人员", "Internal link" : "内部链接", "{shareWith} by {initiator}" : "由 {initiator} 通过 {shareWith} 共享", "Shared via link by {initiator}" : "由 {initiator} 通过链接共享", @@ -210,6 +211,7 @@ "Share link ({index})" : "分享链接({index})", "Create public link" : "生成公开链接地址", "Actions for \"{title}\"" : "“{title}”的动作", + "Copy public link of \"{title}\"" : "复制“{title}”的公开链接", "Error, please enter proper password and/or expiration date" : "错误,请输入正确的密码和/或过期日期", "Link share created" : "已创建链接分享", "Error while creating the share" : "创建共享时出错", @@ -254,6 +256,7 @@ "Successfully uploaded files" : "已成功上传文件", "View terms of service" : "查看服务条款", "Terms of service" : "服务条款", + "Share with {user}" : "与 {user} 分享", "Share with email {email}" : "与邮箱 {email} 分享", "Share with group" : "分享至群组", "Share in conversation" : "分享至对话", @@ -298,6 +301,14 @@ "Unable to fetch inherited shares" : "无法获取继承的共享", "Link shares" : "链接共享", "Shares" : "共享", + "Share files within your organization. Recipients who can already view the file can also use this link for easy access." : "在您的组织内共享文件。已经可以查看该文件的接收者也可以使用此链接轻松访问。", + "Share files with others outside your organization via public links and email addresses. You can also share to Nextcloud accounts on other instances using their federated cloud ID." : "通过公开链接和电子邮件地址与您的组织外部的其他人共享文件。您还可以使用其他实例上的联合云 ID 将其共享给 Nextcloud 账号。", + "Shares from apps or other sources which are not included in internal or external shares." : "来自应用或其他来源的共享,不包括在内部或外部共享中。", + "Type names, teams, federated cloud IDs" : "输入名称、团队、联合云 ID", + "Type names or teams" : "输入名称或团队", + "Type a federated cloud ID" : "输入联合云 ID", + "Type an email" : "输入电子邮件", + "Type an email or federated cloud ID" : "输入电子邮件或联合云 ID", "Unable to load the shares list" : "无法加载共享列表", "Expires {relativetime}" : "过期 {relativetime}", "this share just expired." : "此共享已过期。", @@ -316,6 +327,7 @@ "Shared" : "已共享", "Shared by {ownerDisplayName}" : "由 {ownerDisplayName} 分享", "Shared multiple times with different people" : "与不同的用户多次分享", + "Sharing options" : "共享选项", "Shared with others" : "你的共享", "Create file request" : "创建文件请求", "Upload files to {foldername}" : "将文件上传到 {foldername}", diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index cbb9b5cd2f2..06aa1271c8f 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -7,9 +7,11 @@ */ namespace OCA\Files_Sharing; +use OC\Core\AppInfo\ConfigLexicon; use OCP\App\IAppManager; use OCP\Capabilities\ICapability; use OCP\Constants; +use OCP\IAppConfig; use OCP\IConfig; use OCP\Share\IManager; @@ -21,6 +23,7 @@ use OCP\Share\IManager; class Capabilities implements ICapability { public function __construct( private IConfig $config, + private readonly IAppConfig $appConfig, private IManager $shareManager, private IAppManager $appManager, ) { @@ -111,7 +114,7 @@ class Capabilities implements ICapability { if ($public['password']['enforced']) { $public['password']['askForOptionalPassword'] = false; } else { - $public['password']['askForOptionalPassword'] = ($this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no') === 'yes'); + $public['password']['askForOptionalPassword'] = $this->appConfig->getValueBool('core', ConfigLexicon::SHARE_LINK_PASSWORD_DEFAULT); } $public['expire_date'] = []; diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 7a0b1f135a6..b7b0582493e 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -46,13 +46,14 @@ class MountProvider implements IMountProvider { * @return IMountPoint[] */ public function getMountsForUser(IUser $user, IStorageFactory $loader) { - $shares = $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_USER, null, -1); - $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_GROUP, null, -1)); - $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_CIRCLE, null, -1)); - $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_ROOM, null, -1)); - $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_DECK, null, -1)); - $shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_SCIENCEMESH, null, -1)); - + $shares = array_merge( + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_USER, null, -1), + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_GROUP, null, -1), + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_CIRCLE, null, -1), + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_ROOM, null, -1), + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_DECK, null, -1), + $this->shareManager->getSharedWith($user->getUID(), IShare::TYPE_SCIENCEMESH, null, -1), + ); // filter out excluded shares and group shares that includes self $shares = array_filter($shares, function (IShare $share) use ($user) { diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 2fe221703a5..9a076d7a171 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -56,11 +56,30 @@ class CapabilitiesTest extends \Test\TestCase { * @param (string[])[] $map Map of arguments to return types for the getAppValue function in the mock * @return string[] */ - private function getResults(array $map, bool $federationEnabled = true) { + private function getResults(array $map, array $typedMap = [], bool $federationEnabled = true) { $config = $this->getMockBuilder(IConfig::class)->disableOriginalConstructor()->getMock(); $appManager = $this->getMockBuilder(IAppManager::class)->disableOriginalConstructor()->getMock(); $config->method('getAppValue')->willReturnMap($map); $appManager->method('isEnabledForAnyone')->with('federation')->willReturn($federationEnabled); + + if (empty($typedMap)) { + $appConfig = $this->createMock(IAppConfig::class); + } else { + // hack to help transition from old IConfig to new IAppConfig + $appConfig = $this->getMockBuilder(IAppConfig::class)->disableOriginalConstructor()->getMock(); + $appConfig->expects($this->any())->method('getValueBool')->willReturnCallback(function (...$args) use ($typedMap): bool { + foreach ($typedMap as $entry) { + if ($entry[0] !== $args[0] || $entry[1] !== $args[1]) { + continue; + } + + return $entry[2]; + } + + return false; + }); + } + $shareManager = new Manager( $this->createMock(LoggerInterface::class), $config, @@ -80,9 +99,10 @@ class CapabilitiesTest extends \Test\TestCase { $this->createMock(KnownUserService::class), $this->createMock(ShareDisableChecker::class), $this->createMock(IDateTimeZone::class), - $this->createMock(IAppConfig::class), + $appConfig, ); - $cap = new Capabilities($config, $shareManager, $appManager); + + $cap = new Capabilities($config, $appConfig, $shareManager, $appManager); $result = $this->getFilesSharingPart($cap->getCapabilities()); return $result; } @@ -135,9 +155,11 @@ class CapabilitiesTest extends \Test\TestCase { ['core', 'shareapi_enabled', 'yes', 'yes'], ['core', 'shareapi_allow_links', 'yes', 'yes'], ['core', 'shareapi_enforce_links_password_excluded_groups', '', ''], - ['core', 'shareapi_enforce_links_password', 'no', 'yes'], ]; - $result = $this->getResults($map); + $typedMap = [ + ['core', 'shareapi_enforce_links_password', true], + ]; + $result = $this->getResults($map, $typedMap); $this->assertArrayHasKey('password', $result['public']); $this->assertArrayHasKey('enforced', $result['public']['password']); $this->assertTrue($result['public']['password']['enforced']); @@ -328,7 +350,7 @@ class CapabilitiesTest extends \Test\TestCase { } public function testFederatedSharingDisabled(): void { - $result = $this->getResults([], false); + $result = $this->getResults([], federationEnabled: false); $this->assertArrayHasKey('federation', $result); $this->assertFalse($result['federation']['incoming']); $this->assertFalse($result['federation']['outgoing']); |