mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 02:09:24 +02:00
Fix #563: unplayable radios for anonymous users
This commit is contained in:
parent
1a639a8fde
commit
0be93ec05b
8 changed files with 42 additions and 16 deletions
|
@ -47,6 +47,6 @@ class OwnerPermission(BasePermission):
|
|||
|
||||
owner_field = getattr(view, "owner_field", "user")
|
||||
owner = operator.attrgetter(owner_field)(obj)
|
||||
if owner != request.user:
|
||||
if not owner or not request.user.is_authenticated or owner != request.user:
|
||||
raise Http404
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue