permissions.py 241 Bytes Raw Blame History Permalink 1 2 3 4 5 6 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