ah450/django-jwt

View on GitHub
django_jwt/drf/authenticated.py

Summary

Maintainability
A
0 mins
Test Coverage
from rest_framework import permissions

class AuthenticatedPermission(permissions.BasePermission):
    """
    Permission that only allows authenticated users.
    Author: Ahmed H. Ismail
    """

    def has_permission(self, request, *args, **kwargs):
        return not request.user.is_anonymous()