Skip to content

Commit

Permalink
Show error if trying to open a file on session credential based exter…
Browse files Browse the repository at this point in the history
…nal storage

Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jan 8, 2021
1 parent 614e198 commit fd27586
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd27586

Please sign in to comment.