Skip to content

Commit

Permalink
Merge pull request #1178 from nextcloud/enh/handle-session-credentials
Browse files Browse the repository at this point in the history
Show error if trying to open a file on session credential based external storage
  • Loading branch information
juliushaertl authored Jan 8, 2021
2 parents 614e198 + fd27586 commit bea6d05
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 bea6d05

Please sign in to comment.