9d0865b0e850552e77fdce59bcac99ce78dd9b75
[wolnelektury.git] / src / paypal / permissions.py
1 from rest_framework.permissions import BasePermission
2 from .rest import user_is_subscribed
3
4
5 class IsSubscribed(BasePermission):
6     def has_permission(self, request, view):
7         return request.user.is_authenticated and user_is_subscribed(request.user)