You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flyapps/fir_ser/api/utils/permission.py

20 lines
421 B

from django.core.cache import cache
import datetime
from rest_framework.authentication import BaseAuthentication
from rest_framework import exceptions
from api.models import Token
from rest_framework.permissions import BasePermission
4 years ago
class LoginUserPermission(BaseAuthentication):
4 years ago
def has_permission(self, request, view):
if request.user:
return True
else:
return False