Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26790

Using embedAction does not use view_embed policy

    Details

    • Type: Bug Bug
    • Status: Backlog
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.6.1, 1.7.0
    • Fix Version/s: None
    • Component/s: Permissions
    • Environment:

      Debian, PHP 5.6

      Description

      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.

        Activity

        Hide
        Bertrand Dunogier added a comment -

        This does sound valid, thank you for reporting it !

        Show
        Bertrand Dunogier added a comment - This does sound valid, thank you for reporting it !

          People

          • Assignee:
            Unassigned
            Reporter:
            Dominique De Vasconcelos
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: