from rest_framework.permissions import BasePermission


class EditTaskPermission(BasePermission):
    def has_permission(self, request, view):
        return request.user and request.user.has_perm(
            'django_intranet_stuff.can_edit_celery_task'
        )
