7 lines
194 B
Python
7 lines
194 B
Python
from rest_framework.permissions import BasePermission
|
|
|
|
|
|
class IsAdministrator(BasePermission):
|
|
def has_permission(self, request, view):
|
|
return request.user and request.user.is_staff
|