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

The command "ezrecommendation:export:run" is dependent on Anonymous User permissions

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • Customer request, 2.5.15
    • 2.5.13
    • None
    • None

    Description

      If Anonymous User don't have read permission for some Content, ezrecommendation:export:run may fail with

      User does not have access to 'read' 'content' with: locationId '2' 
      

      Exception.

      Steps to reproduce:
      1. Clean installation of eZ Platform EE Demo 2.5
      2. In parameters.yml set

          env(RECOMMENDATION_CUSTOMER_ID): <your-customer-id>
          env(RECOMMENDATION_LICENSE_KEY): <your-license-key>
      

      3. In BackOffice remove content/read permission from the Anonymous User
      4. Run:

      php bin/console ezrecommendation:export:run --contentTypeIdList=14 --webHook=https://admin.yoochoose.net/api/<your-customer-id>/items --hidden=1 --host=https://somepublicurl
      

      Result

      Exporting 1 content types
      15:07:47 ERROR     [ezrecommendation] Error while generating export: User does not have access to 'read' 'content' with: locationId '2'
      15:07:47 ERROR     [ezrecommendation] User does not have access to 'read' 'content' with: locationId '2'
      
      In LocationService.php line 193:
                                                                            
        User does not have access to 'read' 'content' with: locationId '2'  
                                                                           
      

      Expected result
      The command completes successfully.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: