Skip to content

Commit

Permalink
Fix detection of public pages
Browse files Browse the repository at this point in the history
When opening public links while a session exists, we should still
consider the page a public page whenever the route is not requiring
auth. The latter is the case for public files and files drop pages.
  • Loading branch information
Vincent Petry committed Sep 30, 2019
1 parent c3621b9 commit 0179187
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/phoenix.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default {
...mapActions(['showMessage']),

publicPage () {
return !this.isAuthenticated
// public page is either when not authenticated
// but also when accessing pages that require no auth even when authenticated
return !this.isAuthenticated || this.$route.meta.auth === false
},
downloadFile (file) {
this.addFileToProgress(file)
Expand Down

0 comments on commit 0179187

Please sign in to comment.