mediacms/files/permissions.py
2020-12-15 23:33:43 +02:00

10 lines
268 B
Python

from rest_framework import permissions
from .methods import is_mediacms_editor
class IsMediacmsEditor(permissions.BasePermission):
def has_permission(self, request, view):
if is_mediacms_editor(request.user):
return True
return False