mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 10:49:15 +02:00
Audio federation
This commit is contained in:
parent
6992c567fb
commit
e49a460203
85 changed files with 2598 additions and 1204 deletions
|
@ -9,7 +9,9 @@ from funkwhale_api.common import preferences
|
|||
class ConditionalAuthentication(BasePermission):
|
||||
def has_permission(self, request, view):
|
||||
if preferences.get("common__api_authentication_required"):
|
||||
return request.user and request.user.is_authenticated
|
||||
return (request.user and request.user.is_authenticated) or (
|
||||
hasattr(request, "actor") and request.actor
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue