mediacms/files/permissions.py

11 lines
269 B
Python
Raw Normal View History

2020-12-15 22:33:43 +01:00
from rest_framework import permissions
2021-05-26 17:35:21 +02:00
2020-12-15 22:33:43 +01:00
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