mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 00:49:16 +02:00
See #186: moved federation settings to preferences
This commit is contained in:
parent
7222f7b710
commit
6100b106c0
10 changed files with 103 additions and 59 deletions
|
@ -2,13 +2,14 @@ from django.conf import settings
|
|||
|
||||
from rest_framework.permissions import BasePermission
|
||||
|
||||
from funkwhale_api.common import preferences
|
||||
from . import actors
|
||||
|
||||
|
||||
class LibraryFollower(BasePermission):
|
||||
|
||||
def has_permission(self, request, view):
|
||||
if not settings.FEDERATION_MUSIC_NEEDS_APPROVAL:
|
||||
if not preferences.get('federation__music_needs_approval'):
|
||||
return True
|
||||
|
||||
actor = getattr(request, 'actor', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue