async def has_permission(self, scope, consumer, action, **kwargs):
user = scope.get("user")
if not user:
return False
return user.pk and user.is_authenticated
consumers.py
class PostConsumer(GenericAsyncAPIConsumer, ListModelMixin, CreateModelMixin, DeleteModelMixin):
when i extend from djangochannelsrestframework.permissions.BasePermission and use it as permission_classes i get a weird error and the error is seems to be an library issue
permissions.py
class WSIsAuthenticated(BasePermission):
consumers.py
class PostConsumer(GenericAsyncAPIConsumer, ListModelMixin, CreateModelMixin, DeleteModelMixin):
when i extend from djangochannelsrestframework.permissions.BasePermission and use it as permission_classes i get a weird error and the error is seems to be an library issue