public function showAction($id, User $currentUser = null)
    {
        /** @var ResourceNode $resourceNode */
        $resourceNode = $this->om->find(ResourceNode::class, $id);
        if (!$resourceNode) {
            throw new ResourceNotFoundException();
        }

        // TODO : not pretty, but might want on some case to download files instead ?
        // TODO : find a way to do it in the link plugin
        if ('shortcut' === $resourceNode->getResourceType()->getName()) {
            $shortcut = $this->manager->getResourceFromNode($resourceNode);
            $resourceNode = $shortcut->getTarget();
        }

        // do a minimal security check to redirect user which are not authenticated if needed.
        if (empty($currentUser) && 0 >= $this->rightsRepo->findMaximumRights([], $resourceNode)) {
            // user is not authenticated and the current node is not opened to anonymous
            throw new AccessDeniedException();
        }

        return [
            'resourceNode' => $resourceNode,
        ];
    }