When using ez_content:embedAction to display the embed view of a content, we have an permission error if the user only have view_embed access to the the content. For example, I want to display an embed view of a Image from the Media library and I want the Anonymous user to have only view_embed acces to it.
The problem comes from eZ\Publish\Core\MVC\Symfony\View\Builder\ContentViewBuilder::buildView() method. In the line :
$content = $view->isEmbed() ? $this->loadContent($contentId) : $this->loadEmbeddedContent($contentId, $location);
The loadContent and loadEmbeddedContent must be switched.