From fd27586ca0ce54b2fc408788085a8b357f271a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 7 Oct 2020 15:28:55 +0200 Subject: [PATCH] Show error if trying to open a file on session credential based external storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/files.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/files.js b/src/files.js index dbeeecf216..54123615bf 100644 --- a/src/files.js +++ b/src/files.js @@ -72,6 +72,13 @@ const odfViewer = { } odfViewer.open = true if (context) { + if (context.$file.attr('data-mounttype') === 'external-session') { + OCP.Toast.error(t('richdocuments', 'Opening the file is not supported, since the credentials for the external storage are not available without a session'), { + timeout: 0 + }) + odfViewer.open = false + return + } var fileDir = context.dir var fileId = context.fileId || context.$file.attr('data-id') var templateId = context.templateId