diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/l10n/de.js | 8 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de.json | 8 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de_DE.js | 6 | ||||
-rw-r--r-- | apps/files_sharing/l10n/de_DE.json | 6 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ga.js | 3 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ga.json | 3 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ja.js | 3 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ja.json | 3 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ko.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/l10n/ko.json | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/PublicPreviewController.php | 14 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Scanner.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/openapi.json | 23 | ||||
-rw-r--r-- | apps/files_sharing/src/files_filters/AccountFilter.ts | 6 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 3 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/tests/EncryptedSizePropagationTest.php | 11 | ||||
-rw-r--r-- | apps/files_sharing/tests/TestCase.php | 4 |
18 files changed, 89 insertions, 23 deletions
diff --git a/apps/files_sharing/l10n/de.js b/apps/files_sharing/l10n/de.js index f547ac5d350..e686a33970e 100644 --- a/apps/files_sharing/l10n/de.js +++ b/apps/files_sharing/l10n/de.js @@ -54,7 +54,7 @@ OC.L10N.register( "{actor} removed you from the share named {file}" : "{actor} hat dich aus der Freigabe von {file} entfernt", "Share for file {file} with {user} expired" : "Freigabe für die Datei {file} mit {user} abgelaufen", "Share for file {file} expired" : "Freigabe für die Datei {file} abgelaufen", - "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder Ordner wurde <strong>heruntergeladen</strong>", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder geteilter Ordner wurde <strong>heruntergeladen</strong>", "Files have been <strong>uploaded</strong> to a folder shared by mail or by public link" : "Dateien wurden in einen per E-Mail oder über einen öffentlichen Link freigegebenen Ordner <strong>hochgeladen</strong>", "A file or folder was shared from <strong>another server</strong>" : "Eine Datei oder ein Ordner wurde von <strong>einem anderen Server</strong> geteilt", "Sharing" : "Teilen", @@ -182,7 +182,7 @@ OC.L10N.register( "Choose a default folder for accepted shares" : "Einen Standardordner für akzeptierte Freigaben wählen", "Invalid path selected" : "Ungültigen Pfad ausgewählt", "Unknown error" : "Unbekannter Fehler", - "Set default folder for accepted shares" : "Standardordner für akzeptierte Freigaben wählen", + "Set default folder for accepted shares" : "Standardordner für angenommene Freigaben", "Reset" : "Zurücksetzen", "Reset folder to system default" : "Ordner auf Systemstandard zurücksetzen", "Share expiration: " : "Freigabe-Ablaufdatum:", @@ -356,10 +356,10 @@ OC.L10N.register( "List of files that you shared with others." : "Liste der Dateien, die du mit anderen geteilt hast", "Nothing shared yet" : "Noch nichts geteilt", "Files and folders you shared will show up here" : "Von dir geteilte Dateien und Ordner werden hier angezeigt", - "Shared by link" : "Geteilt über einen Link", + "Shared by link" : "Über einen Link geteilt", "List of files that are shared by link." : "Liste der Dateien, die mittels Link geteilt wurden.", "No shared links" : "Keine geteilten Links", - "Files and folders you shared by link will show up here" : "Von dir per Link geteilte Dateien werden hier angezeigt", + "Files and folders you shared by link will show up here" : "Von dir mittels Link geteilte Dateien und Ordner werden hier angezeigt werden", "File requests" : "Dateianfragen", "List of file requests." : "Liste der Dateianfragen.", "No file requests" : "Keine Dateianfragen", diff --git a/apps/files_sharing/l10n/de.json b/apps/files_sharing/l10n/de.json index ec1399b28fa..a797c90fe56 100644 --- a/apps/files_sharing/l10n/de.json +++ b/apps/files_sharing/l10n/de.json @@ -52,7 +52,7 @@ "{actor} removed you from the share named {file}" : "{actor} hat dich aus der Freigabe von {file} entfernt", "Share for file {file} with {user} expired" : "Freigabe für die Datei {file} mit {user} abgelaufen", "Share for file {file} expired" : "Freigabe für die Datei {file} abgelaufen", - "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder Ordner wurde <strong>heruntergeladen</strong>", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder geteilter Ordner wurde <strong>heruntergeladen</strong>", "Files have been <strong>uploaded</strong> to a folder shared by mail or by public link" : "Dateien wurden in einen per E-Mail oder über einen öffentlichen Link freigegebenen Ordner <strong>hochgeladen</strong>", "A file or folder was shared from <strong>another server</strong>" : "Eine Datei oder ein Ordner wurde von <strong>einem anderen Server</strong> geteilt", "Sharing" : "Teilen", @@ -180,7 +180,7 @@ "Choose a default folder for accepted shares" : "Einen Standardordner für akzeptierte Freigaben wählen", "Invalid path selected" : "Ungültigen Pfad ausgewählt", "Unknown error" : "Unbekannter Fehler", - "Set default folder for accepted shares" : "Standardordner für akzeptierte Freigaben wählen", + "Set default folder for accepted shares" : "Standardordner für angenommene Freigaben", "Reset" : "Zurücksetzen", "Reset folder to system default" : "Ordner auf Systemstandard zurücksetzen", "Share expiration: " : "Freigabe-Ablaufdatum:", @@ -354,10 +354,10 @@ "List of files that you shared with others." : "Liste der Dateien, die du mit anderen geteilt hast", "Nothing shared yet" : "Noch nichts geteilt", "Files and folders you shared will show up here" : "Von dir geteilte Dateien und Ordner werden hier angezeigt", - "Shared by link" : "Geteilt über einen Link", + "Shared by link" : "Über einen Link geteilt", "List of files that are shared by link." : "Liste der Dateien, die mittels Link geteilt wurden.", "No shared links" : "Keine geteilten Links", - "Files and folders you shared by link will show up here" : "Von dir per Link geteilte Dateien werden hier angezeigt", + "Files and folders you shared by link will show up here" : "Von dir mittels Link geteilte Dateien und Ordner werden hier angezeigt werden", "File requests" : "Dateianfragen", "List of file requests." : "Liste der Dateianfragen.", "No file requests" : "Keine Dateianfragen", diff --git a/apps/files_sharing/l10n/de_DE.js b/apps/files_sharing/l10n/de_DE.js index b8928cb36b9..608e60101c9 100644 --- a/apps/files_sharing/l10n/de_DE.js +++ b/apps/files_sharing/l10n/de_DE.js @@ -54,7 +54,7 @@ OC.L10N.register( "{actor} removed you from the share named {file}" : "{actor} hat Sie aus der Freigabe von {file} entfernt", "Share for file {file} with {user} expired" : "Freigabe der Datei {file} für {user} abgelaufen", "Share for file {file} expired" : "Freigabe für die Datei {file} abgelaufen", - "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei / Ordner wurde <strong>heruntergeladen</strong>", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder geteilter Ordner wurde <strong>heruntergeladen</strong>", "Files have been <strong>uploaded</strong> to a folder shared by mail or by public link" : "Dateien wurden in einen per E-Mail oder über einen öffentlichen Link freigegebenen Ordner <strong>hochgeladen</strong>", "A file or folder was shared from <strong>another server</strong>" : "Eine Datei oder ein Ordner wurde von <strong>einem anderen Server</strong> geteilt", "Sharing" : "Teilen", @@ -182,7 +182,7 @@ OC.L10N.register( "Choose a default folder for accepted shares" : "Wählen Sie einen Standardordner für akzeptierte Freigaben", "Invalid path selected" : "Ungültiger Pfad ausgewählt", "Unknown error" : "Unbekannter Fehler", - "Set default folder for accepted shares" : "Standardordner für akzeptierte Freigaben wählen", + "Set default folder for accepted shares" : "Standardordner für angenommene Freigaben", "Reset" : "Zurücksetzen", "Reset folder to system default" : "Ordner auf Systemstandard zurücksetzen", "Share expiration: " : "Freigabe-Ablaufdatum:", @@ -356,7 +356,7 @@ OC.L10N.register( "List of files that you shared with others." : "Liste der Dateien, die Sie mit anderen geteilt haben.", "Nothing shared yet" : "Noch nichts geteilt", "Files and folders you shared will show up here" : "Von Ihnen geteilte Dateien und Ordner werden hier angezeigt werden", - "Shared by link" : "Geteilt über einen Link", + "Shared by link" : "Über einen Link geteilt", "List of files that are shared by link." : "Liste der Dateien, die mittels Link geteilt wurden.", "No shared links" : "Keine geteilten Links", "Files and folders you shared by link will show up here" : "Von Ihnen mittels Link geteilte Dateien und Ordner werden hier angezeigt werden", diff --git a/apps/files_sharing/l10n/de_DE.json b/apps/files_sharing/l10n/de_DE.json index 1a2c0380c70..97c1ac18a7c 100644 --- a/apps/files_sharing/l10n/de_DE.json +++ b/apps/files_sharing/l10n/de_DE.json @@ -52,7 +52,7 @@ "{actor} removed you from the share named {file}" : "{actor} hat Sie aus der Freigabe von {file} entfernt", "Share for file {file} with {user} expired" : "Freigabe der Datei {file} für {user} abgelaufen", "Share for file {file} expired" : "Freigabe für die Datei {file} abgelaufen", - "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei / Ordner wurde <strong>heruntergeladen</strong>", + "A file or folder shared by mail or by public link was <strong>downloaded</strong>" : "Öffentlich oder per E-Mail geteilte Datei oder geteilter Ordner wurde <strong>heruntergeladen</strong>", "Files have been <strong>uploaded</strong> to a folder shared by mail or by public link" : "Dateien wurden in einen per E-Mail oder über einen öffentlichen Link freigegebenen Ordner <strong>hochgeladen</strong>", "A file or folder was shared from <strong>another server</strong>" : "Eine Datei oder ein Ordner wurde von <strong>einem anderen Server</strong> geteilt", "Sharing" : "Teilen", @@ -180,7 +180,7 @@ "Choose a default folder for accepted shares" : "Wählen Sie einen Standardordner für akzeptierte Freigaben", "Invalid path selected" : "Ungültiger Pfad ausgewählt", "Unknown error" : "Unbekannter Fehler", - "Set default folder for accepted shares" : "Standardordner für akzeptierte Freigaben wählen", + "Set default folder for accepted shares" : "Standardordner für angenommene Freigaben", "Reset" : "Zurücksetzen", "Reset folder to system default" : "Ordner auf Systemstandard zurücksetzen", "Share expiration: " : "Freigabe-Ablaufdatum:", @@ -354,7 +354,7 @@ "List of files that you shared with others." : "Liste der Dateien, die Sie mit anderen geteilt haben.", "Nothing shared yet" : "Noch nichts geteilt", "Files and folders you shared will show up here" : "Von Ihnen geteilte Dateien und Ordner werden hier angezeigt werden", - "Shared by link" : "Geteilt über einen Link", + "Shared by link" : "Über einen Link geteilt", "List of files that are shared by link." : "Liste der Dateien, die mittels Link geteilt wurden.", "No shared links" : "Keine geteilten Links", "Files and folders you shared by link will show up here" : "Von Ihnen mittels Link geteilte Dateien und Ordner werden hier angezeigt werden", diff --git a/apps/files_sharing/l10n/ga.js b/apps/files_sharing/l10n/ga.js index 0d41d4d1235..f8ddae9a8ea 100644 --- a/apps/files_sharing/l10n/ga.js +++ b/apps/files_sharing/l10n/ga.js @@ -313,7 +313,9 @@ OC.L10N.register( "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Bain úsáid as an modh seo chun comhaid a roinnt le daoine aonair nó le foirne laistigh de d'eagraíocht. Má tá rochtain ag an bhfaighteoir ar an sciar cheana féin ach nach féidir leis í a aimsiú, is féidir leat an nasc scaire inmheánach a sheoladh chucu le go mbeidh rochtain éasca air.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Bain úsáid as an modh seo chun comhaid a roinnt le daoine aonair nó le heagraíochtaí lasmuigh de d'eagraíocht. Is féidir comhaid agus fillteáin a roinnt trí naisc scaireanna poiblí agus seoltaí ríomhphoist. Is féidir leat a roinnt freisin le cuntais Nextcloud eile arna óstáil ar chásanna éagsúla ag baint úsáide as a n-ID néil cónasctha.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Scaireanna nach cuid de na scaireanna inmheánacha nó seachtracha iad. Is féidir gur scaireanna iad seo ó aipeanna nó ó fhoinsí eile.", + "Share with accounts, teams, federated cloud IDs" : "Comhroinn le cuntais, foirne, agus aitheantóirí scamall cónaidhme", "Share with accounts and teams" : "Roinn le cuntais agus foirne", + "Email, federated cloud ID" : "Ríomhphost, ID scamall cónaidhme", "Unable to load the shares list" : "Ní féidir an liosta scaireanna a lódáil", "Expires {relativetime}" : "In éag {relativetime}", "this share just expired." : "tá an sciar seo díreach imithe in éag.", @@ -422,6 +424,7 @@ OC.L10N.register( "You are not allowed to edit link shares that you don't own" : "Níl cead agat scaireanna naisc nach leatsa a chur in eagar", "_1 email address already added_::_{count} email addresses already added_" : ["1 seoladh ríomhphoist curtha leis cheana féin","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana"], "_1 email address added_::_{count} email addresses added_" : ["Cuireadh 1 seoladh ríomhphoist leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis"], + "Share with accounts, teams, federated cloud id" : "Comhroinn le cuntais, foirne, aitheantas scamall cónaidhme", "Email, federated cloud id" : "Ríomhphost, aitheantas scamall cónaidhme" }, "nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);"); diff --git a/apps/files_sharing/l10n/ga.json b/apps/files_sharing/l10n/ga.json index 418aa49ccc3..f556e802f52 100644 --- a/apps/files_sharing/l10n/ga.json +++ b/apps/files_sharing/l10n/ga.json @@ -311,7 +311,9 @@ "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Bain úsáid as an modh seo chun comhaid a roinnt le daoine aonair nó le foirne laistigh de d'eagraíocht. Má tá rochtain ag an bhfaighteoir ar an sciar cheana féin ach nach féidir leis í a aimsiú, is féidir leat an nasc scaire inmheánach a sheoladh chucu le go mbeidh rochtain éasca air.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Bain úsáid as an modh seo chun comhaid a roinnt le daoine aonair nó le heagraíochtaí lasmuigh de d'eagraíocht. Is féidir comhaid agus fillteáin a roinnt trí naisc scaireanna poiblí agus seoltaí ríomhphoist. Is féidir leat a roinnt freisin le cuntais Nextcloud eile arna óstáil ar chásanna éagsúla ag baint úsáide as a n-ID néil cónasctha.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Scaireanna nach cuid de na scaireanna inmheánacha nó seachtracha iad. Is féidir gur scaireanna iad seo ó aipeanna nó ó fhoinsí eile.", + "Share with accounts, teams, federated cloud IDs" : "Comhroinn le cuntais, foirne, agus aitheantóirí scamall cónaidhme", "Share with accounts and teams" : "Roinn le cuntais agus foirne", + "Email, federated cloud ID" : "Ríomhphost, ID scamall cónaidhme", "Unable to load the shares list" : "Ní féidir an liosta scaireanna a lódáil", "Expires {relativetime}" : "In éag {relativetime}", "this share just expired." : "tá an sciar seo díreach imithe in éag.", @@ -420,6 +422,7 @@ "You are not allowed to edit link shares that you don't own" : "Níl cead agat scaireanna naisc nach leatsa a chur in eagar", "_1 email address already added_::_{count} email addresses already added_" : ["1 seoladh ríomhphoist curtha leis cheana féin","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana","{count} seoladh ríomhphoist curtha leis cheana"], "_1 email address added_::_{count} email addresses added_" : ["Cuireadh 1 seoladh ríomhphoist leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis","{count} seoladh ríomhphoist curtha leis"], + "Share with accounts, teams, federated cloud id" : "Comhroinn le cuntais, foirne, aitheantas scamall cónaidhme", "Email, federated cloud id" : "Ríomhphost, aitheantas scamall cónaidhme" },"pluralForm" :"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);" }
\ No newline at end of file diff --git a/apps/files_sharing/l10n/ja.js b/apps/files_sharing/l10n/ja.js index 062614d2fe3..dfbb41c95cc 100644 --- a/apps/files_sharing/l10n/ja.js +++ b/apps/files_sharing/l10n/ja.js @@ -313,7 +313,9 @@ OC.L10N.register( "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "組織内の個人またはチームとファイルを共有するには、この方法を使用します。受信者がすでに共有にアクセスできるが、その場所を見つけられない場合は、簡単にアクセスできるように内部共有リンクを送信できます。", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "組織外の個人や組織とファイルを共有するには、この方法を使用します。ファイルやフォルダは、パブリック共有リンクやメールアドレスで共有できます。また、連携クラウドIDを使用して、異なるインスタンスにホストされている他のNextcloudアカウントと共有することもできます。", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "内部または外部共有に含まれない共有。これはアプリや他のソースからの共有になります。", + "Share with accounts, teams, federated cloud IDs" : "アカウント、チーム、連携クラウドIDとの共有", "Share with accounts and teams" : "アカウントとチームで共有", + "Email, federated cloud ID" : "電子メール、連携クラウドID", "Unable to load the shares list" : "共有リストを読み込めません", "Expires {relativetime}" : "有効期限 {relativetime}", "this share just expired." : "この共有は期限切れになりました。", @@ -422,6 +424,7 @@ OC.L10N.register( "You are not allowed to edit link shares that you don't own" : "あなたが所有していない共有リンクを編集することは許可されていません", "_1 email address already added_::_{count} email addresses already added_" : ["{count} メールアドレスはすでに追加されています"], "_1 email address added_::_{count} email addresses added_" : ["{count} メールアドレスが追加されました"], + "Share with accounts, teams, federated cloud id" : "アカウント、チーム、連携クラウドIDで共有", "Email, federated cloud id" : "電子メール、連携クラウドID" }, "nplurals=1; plural=0;"); diff --git a/apps/files_sharing/l10n/ja.json b/apps/files_sharing/l10n/ja.json index c2657abce02..67b977bbe3b 100644 --- a/apps/files_sharing/l10n/ja.json +++ b/apps/files_sharing/l10n/ja.json @@ -311,7 +311,9 @@ "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "組織内の個人またはチームとファイルを共有するには、この方法を使用します。受信者がすでに共有にアクセスできるが、その場所を見つけられない場合は、簡単にアクセスできるように内部共有リンクを送信できます。", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "組織外の個人や組織とファイルを共有するには、この方法を使用します。ファイルやフォルダは、パブリック共有リンクやメールアドレスで共有できます。また、連携クラウドIDを使用して、異なるインスタンスにホストされている他のNextcloudアカウントと共有することもできます。", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "内部または外部共有に含まれない共有。これはアプリや他のソースからの共有になります。", + "Share with accounts, teams, federated cloud IDs" : "アカウント、チーム、連携クラウドIDとの共有", "Share with accounts and teams" : "アカウントとチームで共有", + "Email, federated cloud ID" : "電子メール、連携クラウドID", "Unable to load the shares list" : "共有リストを読み込めません", "Expires {relativetime}" : "有効期限 {relativetime}", "this share just expired." : "この共有は期限切れになりました。", @@ -420,6 +422,7 @@ "You are not allowed to edit link shares that you don't own" : "あなたが所有していない共有リンクを編集することは許可されていません", "_1 email address already added_::_{count} email addresses already added_" : ["{count} メールアドレスはすでに追加されています"], "_1 email address added_::_{count} email addresses added_" : ["{count} メールアドレスが追加されました"], + "Share with accounts, teams, federated cloud id" : "アカウント、チーム、連携クラウドIDで共有", "Email, federated cloud id" : "電子メール、連携クラウドID" },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/files_sharing/l10n/ko.js b/apps/files_sharing/l10n/ko.js index 6c6967c59a8..d946d802981 100644 --- a/apps/files_sharing/l10n/ko.js +++ b/apps/files_sharing/l10n/ko.js @@ -311,7 +311,7 @@ OC.L10N.register( "Link shares" : "링크 공유", "Shares" : "공유", "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "이 방법을 사용하여 조직 내 개인 또는 팀과 파일을 공유하세요. 수신자가 이미 공유 폴더에 접근할 수 있지만 위치를 찾을 수 없는 경우, 쉽게 접근할 수 있도록 내부 공유 링크를 보낼 수 있습니다.", - "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "이 방법을 사용하면 조직 외부의 조직이나 개인과 파일을 공유할 수 있습니다. 파일과 폴더는 공개 공유 링크와 이메일 주소를 통해 공유할 수 있습니다. 또한, 다른 인스턴스에 소속된 다른 Nextcloud 계정과도 연합 클라우드 ID를 사용하여 공유할 수 있습니다.", + "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "이 방법을 사용하여 이 조직 외부의 개인이나 조직과 파일을 공유하세요. 파일과 폴더는 공개 공유 링크와 이메일 주소를 통해 공유할 수 있습니다. 다른 인스턴스에 소속된 다른 Nextcloud 계정과도 연합 클라우드 ID를 사용하여 공유할 수 있습니다.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "내부 또는 외부 공유에 포함되지 않은 공유입니다. 앱이나 다른 소스에서 공유된 내용이 여기에 해당할 수 있습니다.", "Share with accounts, teams, federated cloud IDs" : "계정, 팀 및 연합 클라우드 ID와 공유", "Share with accounts and teams" : "계정 및 팀과 공유", diff --git a/apps/files_sharing/l10n/ko.json b/apps/files_sharing/l10n/ko.json index d08e914da29..4d9e598e1b5 100644 --- a/apps/files_sharing/l10n/ko.json +++ b/apps/files_sharing/l10n/ko.json @@ -309,7 +309,7 @@ "Link shares" : "링크 공유", "Shares" : "공유", "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "이 방법을 사용하여 조직 내 개인 또는 팀과 파일을 공유하세요. 수신자가 이미 공유 폴더에 접근할 수 있지만 위치를 찾을 수 없는 경우, 쉽게 접근할 수 있도록 내부 공유 링크를 보낼 수 있습니다.", - "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "이 방법을 사용하면 조직 외부의 조직이나 개인과 파일을 공유할 수 있습니다. 파일과 폴더는 공개 공유 링크와 이메일 주소를 통해 공유할 수 있습니다. 또한, 다른 인스턴스에 소속된 다른 Nextcloud 계정과도 연합 클라우드 ID를 사용하여 공유할 수 있습니다.", + "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "이 방법을 사용하여 이 조직 외부의 개인이나 조직과 파일을 공유하세요. 파일과 폴더는 공개 공유 링크와 이메일 주소를 통해 공유할 수 있습니다. 다른 인스턴스에 소속된 다른 Nextcloud 계정과도 연합 클라우드 ID를 사용하여 공유할 수 있습니다.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "내부 또는 외부 공유에 포함되지 않은 공유입니다. 앱이나 다른 소스에서 공유된 내용이 여기에 해당할 수 있습니다.", "Share with accounts, teams, federated cloud IDs" : "계정, 팀 및 연합 클라우드 ID와 공유", "Share with accounts and teams" : "계정 및 팀과 공유", diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php index 91dead57e80..16886e930fa 100644 --- a/apps/files_sharing/lib/Controller/PublicPreviewController.php +++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php @@ -11,6 +11,7 @@ use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\FileDisplayResponse; +use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\PublicShareController; use OCP\Constants; use OCP\Files\Folder; @@ -18,6 +19,7 @@ use OCP\Files\NotFoundException; use OCP\IPreview; use OCP\IRequest; use OCP\ISession; +use OCP\Preview\IMimeIconProvider; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager as ShareManager; use OCP\Share\IShare; @@ -33,6 +35,7 @@ class PublicPreviewController extends PublicShareController { private ShareManager $shareManager, ISession $session, private IPreview $previewManager, + private IMimeIconProvider $mimeIconProvider, ) { parent::__construct($appName, $request, $session); } @@ -63,9 +66,11 @@ class PublicPreviewController extends PublicShareController { * @param int $x Width of the preview * @param int $y Height of the preview * @param bool $a Whether to not crop the preview - * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, list<empty>, array{}> + * @param bool $mimeFallback Whether to fallback to the mime icon if no preview is available + * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, list<empty>, array{}>|RedirectResponse<Http::STATUS_SEE_OTHER, array{}> * * 200: Preview returned + * 303: Redirect to the mime icon url if mimeFallback is true * 400: Getting preview is not possible * 403: Getting preview is not allowed * 404: Share or preview not found @@ -79,6 +84,7 @@ class PublicPreviewController extends PublicShareController { int $x = 32, int $y = 32, $a = false, + bool $mimeFallback = false, ) { $cacheForSeconds = 60 * 60 * 24; // 1 day @@ -124,6 +130,12 @@ class PublicPreviewController extends PublicShareController { $response->cacheFor($cacheForSeconds); return $response; } catch (NotFoundException $e) { + // If we have no preview enabled, we can redirect to the mime icon if any + if ($mimeFallback) { + if ($url = $this->mimeIconProvider->getMimeIconUrl($file->getMimeType())) { + return new RedirectResponse($url); + } + } return new DataResponse([], Http::STATUS_NOT_FOUND); } catch (\InvalidArgumentException $e) { return new DataResponse([], Http::STATUS_BAD_REQUEST); diff --git a/apps/files_sharing/lib/External/Scanner.php b/apps/files_sharing/lib/External/Scanner.php index e45d3723923..2b0741b4b96 100644 --- a/apps/files_sharing/lib/External/Scanner.php +++ b/apps/files_sharing/lib/External/Scanner.php @@ -6,6 +6,7 @@ */ namespace OCA\Files_Sharing\External; +use OC\Files\Cache\CacheEntry; use OC\ForbiddenException; use OCP\Files\NotFoundException; use OCP\Files\StorageInvalidException; @@ -29,7 +30,7 @@ class Scanner extends \OC\Files\Cache\Scanner { * @param string $file file to scan * @param int $reuseExisting * @param int $parentId - * @param \OC\Files\Cache\CacheEntry|array|null|false $cacheData existing data in the cache for the file to be scanned + * @param CacheEntry|array|null|false $cacheData existing data in the cache for the file to be scanned * @param bool $lock set to false to disable getting an additional read lock during scanning * @param array|null $data the metadata for the file, as returned by the storage * @return array|null an array of metadata of the scanned file diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json index e70764a59f2..68420dde80e 100644 --- a/apps/files_sharing/openapi.json +++ b/apps/files_sharing/openapi.json @@ -1477,6 +1477,19 @@ 1 ] } + }, + { + "name": "mimeFallback", + "in": "query", + "description": "Whether to fallback to the mime icon if no preview is available", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } } ], "responses": { @@ -1514,6 +1527,16 @@ "schema": {} } } + }, + "303": { + "description": "Redirect to the mime icon url if mimeFallback is true", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } } } } diff --git a/apps/files_sharing/src/files_filters/AccountFilter.ts b/apps/files_sharing/src/files_filters/AccountFilter.ts index 56bcef07200..4f185d9fd9c 100644 --- a/apps/files_sharing/src/files_filters/AccountFilter.ts +++ b/apps/files_sharing/src/files_filters/AccountFilter.ts @@ -10,6 +10,7 @@ import { ShareType } from '@nextcloud/sharing' import Vue from 'vue' import FileListFilterAccount from '../components/FileListFilterAccount.vue' +import { isPublicShare } from '@nextcloud/sharing/public' export interface IAccountData { uid: string @@ -152,5 +153,10 @@ class AccountFilter extends FileListFilter { * Register the file list filter by owner or sharees */ export function registerAccountFilter() { + if (isPublicShare()) { + // We do not show the filter on public pages - it makes no sense + return + } + registerFileListFilter(new AccountFilter()) } diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 5b778223c8b..8912ff340b7 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -905,8 +905,9 @@ export default { this.advancedSectionAccordionExpanded = true } - if (this.share.note) { + if (this.isValidShareAttribute(this.share.note)) { this.writeNoteToRecipientIsChecked = true + this.advancedSectionAccordionExpanded = true } }, diff --git a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php index bd64cfc60b4..9750274ff62 100644 --- a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php +++ b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php @@ -18,6 +18,7 @@ use OCP\Files\SimpleFS\ISimpleFile; use OCP\IPreview; use OCP\IRequest; use OCP\ISession; +use OCP\Preview\IMimeIconProvider; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IAttributes; use OCP\Share\IManager; @@ -52,7 +53,8 @@ class PublicPreviewControllerTest extends TestCase { $this->request, $this->shareManager, $this->createMock(ISession::class), - $this->previewManager + $this->previewManager, + $this->createMock(IMimeIconProvider::class), ); } diff --git a/apps/files_sharing/tests/EncryptedSizePropagationTest.php b/apps/files_sharing/tests/EncryptedSizePropagationTest.php index 1430e5f17ac..a416cd14715 100644 --- a/apps/files_sharing/tests/EncryptedSizePropagationTest.php +++ b/apps/files_sharing/tests/EncryptedSizePropagationTest.php @@ -17,13 +17,22 @@ use Test\Traits\EncryptionTrait; class EncryptedSizePropagationTest extends SizePropagationTest { use EncryptionTrait; + protected function setUp(): void { + parent::setUp(); + $this->config->setAppValue('encryption', 'useMasterKey', '0'); + } + protected function setupUser($name, $password = '') { $this->createUser($name, $password); $tmpFolder = Server::get(ITempManager::class)->getTemporaryFolder(); $this->registerMount($name, '\OC\Files\Storage\Local', '/' . $name, ['datadir' => $tmpFolder]); - $this->config->setAppValue('encryption', 'useMasterKey', '0'); $this->setupForUser($name, $password); $this->loginWithEncryption($name); return new View('/' . $name . '/files'); } + + protected function loginHelper($user, $create = false, $password = false) { + $this->setupForUser($user, $password); + parent::loginHelper($user, $create, $password); + } } diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index 647a591db8d..34e2d71fb02 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -108,7 +108,7 @@ abstract class TestCase extends \Test\TestCase { Server::get(DisplayNameCache::class)->clear(); //login as user1 - self::loginHelper(self::TEST_FILES_SHARING_API_USER1); + $this->loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->data = 'foobar'; $this->view = new View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files'); @@ -173,7 +173,7 @@ abstract class TestCase extends \Test\TestCase { * @param bool $create * @param bool $password */ - protected static function loginHelper($user, $create = false, $password = false) { + protected function loginHelper($user, $create = false, $password = false) { if ($password === false) { $password = $user; } |