Skip to content

Commit

Permalink
Fix mediaviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Apr 2, 2020
1 parent 6e6a704 commit fb1c979
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/media-viewer/src/Mediaviewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
}
},
headers () {
if (!this.publicPage()) {
if (!this.isPublicContext()) {
return null
}
Expand All @@ -105,7 +105,7 @@ export default {
a: 1
})
if (this.publicPage()) {
if (this.isPublicContext()) {
const path = [
'..',
'dav',
Expand Down Expand Up @@ -164,6 +164,12 @@ export default {
},
methods: {
isPublicContext () {
// TODO: Can we rely on not being "authenticated" while viewing a public link?
// Currently it works. We cannot use publicPage() because that will still return
// true when opening the mediaviewer from authenticated routes
return !this.isAuthenticated
},
loadImage () {
this.loading = true
Expand Down
5 changes: 5 additions & 0 deletions changelog/unreleased/fix_media_viewer_on_private_pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: fix media-viewer on private pages

media-viewer incorrectly assumed it was on a public page when opened from a private page.

https://github.com/owncloud/phoenix/pull/3288

0 comments on commit fb1c979

Please sign in to comment.