public function deleteAction(Paper $paper)
    {
        $this->assertHasPermission('MANAGE_PAPERS', $paper->getExercise());

        try {
            $this->paperManager->delete($paper);
        } catch (InvalidDataException $e) {
            return new JsonResponse($e->getErrors(), 422);
        }

        return new JsonResponse(null, 204);
    }