examtest/test_server/crm/permission.py

6 lines
183 B
Python

from rest_framework.permissions import IsAuthenticated
class IsConsumerAuthenticated(IsAuthenticated):
def has_permission(self, request, view):
return bool(request.user)