Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
482647da
Commit
482647da
authored
Aug 28, 2020
by
Agate
💬
Browse files
Fix #1210: Enforce authentication when viewing remote channels, profiles and libraries
parent
b1ae13ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/federation/tasks.py
View file @
482647da
...
...
@@ -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"
):
...
...
changes/changelog.d/1210.enhancement
0 → 100644
View file @
482647da
Enforce authentication when viewing remote channels, profiles and libraries (#1210)
\ No newline at end of file
front/src/views/auth/ProfileBase.vue
View file @
482647da
...
...
@@ -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
...
...
front/src/views/channels/DetailBase.vue
View file @
482647da
...
...
@@ -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
()
{
...
...
front/src/views/library/DetailBase.vue
View file @
482647da
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment