

def perform_create(self, serializer):
    if (not self.request.user.is_staff):
        raise PermissionDenied('You do not have permission to perform this action.')
    super(AlertViewSet, self).perform_create(serializer)

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/logging/views.py AlertViewSet.perform_create/original