7 lines
199 B
Python
7 lines
199 B
Python
from rest_framework.permissions import BasePermission
|
|
|
|
|
|
class ReadOnlyOrDeny(BasePermission):
|
|
def has_permission(self, request, view):
|
|
return request.method in ("GET", "HEAD", "OPTIONS")
|