public function listAction(Exercise $exercise, User $user, Request $request)
    {
        $this->assertHasPermission('OPEN', $exercise);

        $params = $request->query->all();

        $params['hiddenFilters'] = [];
        $params['hiddenFilters']['exercise'] = $exercise->getId();
        $serializationOptions = [];

        $collection = new ResourceCollection([$exercise->getResourceNode()]);
        if (!$this->authorization->isGranted('ADMINISTRATE', $collection) &&
            !$this->authorization->isGranted('MANAGE_PAPERS', $collection)
        ) {
            $params['hiddenFilters']['user'] = $user->getId();
        } elseif (ShowScoreAt::NEVER !== $exercise->getMarkMode()) {
            $serializationOptions[] = Transfer::INCLUDE_USER_SCORE;
        }

        return new JsonResponse(
            $this->finder->search(Paper::class, $params, $serializationOptions)
        );
    }