Merge branch '1210-auth' into 'develop'
Fix #1210: Enforce authentication when viewing remote channels, profiles and libraries Closes #1210 See merge request funkwhale/funkwhale!1218
This commit is contained in:
commit
bae2a5f637
|
@ -429,7 +429,7 @@ def fetch(fetch_obj):
|
|||
)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
"Error while fetching actor outbox: %s", obj.actor.outbox.url
|
||||
"Error while fetching actor outbox: %s", obj.actor.outbox_url
|
||||
)
|
||||
else:
|
||||
if result.get("next_page"):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Enforce authentication when viewing remote channels, profiles and libraries (#1210)
|
|
@ -93,7 +93,12 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.fetch()
|
||||
let authenticated = this.$store.state.auth.authenticated
|
||||
if (!authenticated && this.domain && this.$store.getters['instance/domain'] != this.domain) {
|
||||
this.$router.push({name: 'login', query: {next: this.$route.fullPath}})
|
||||
} else {
|
||||
this.fetch()
|
||||
}
|
||||
},
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
to.meta.preserveScrollPosition = true
|
||||
|
|
|
@ -270,6 +270,10 @@ export default {
|
|||
},
|
||||
async created() {
|
||||
await this.fetchData()
|
||||
let authenticated = this.$store.state.auth.authenticated
|
||||
if (!authenticated && this.$store.getters['instance/domain'] != this.object.actor.domain) {
|
||||
this.$router.push({name: 'login', query: {next: this.$route.fullPath}})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fetchData() {
|
||||
|
|
|
@ -148,6 +148,10 @@ export default {
|
|||
},
|
||||
async created() {
|
||||
await this.fetchData()
|
||||
let authenticated = this.$store.state.auth.authenticated
|
||||
if (!authenticated && this.$store.getters['instance/domain'] != this.object.actor.domain) {
|
||||
this.$router.push({name: 'login', query: {next: this.$route.fullPath}})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async fetchData() {
|
||||
|
|
Loading…
Reference in New Issue