1 from rest_framework.permissions import BasePermission
2 from .rest import user_is_subscribed
5 class IsSubscribed(BasePermission):
6 def has_permission(self, request, view):
7 return request.user.is_authenticated and user_is_subscribed(request.user)