mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-21 15:53:21 +01:00
11 lines
269 B
Python
11 lines
269 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
|