permissions.py 241 Bytes
from rest_framework import permissions


class IsAdminOrAuthorized(permissions.BasePermission):
    def has_permission(self, request, view):
        return request.user.is_staff or request.user.is_authenticated or request.user.is_authorized