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

[Rest API] Get current version with anonymous user spec don't correspond to behaviour

    XMLWordPrintable

Details

    Description

      With an anonymous user when attempt to get the

      Resource: /content/objects/<ID>/currentversion
      

      it will throw an 401 Not Authorized

      "errorCode": 401,
      "errorMessage": "Unauthorized",
      "errorDescription": "User does not have access to 'versionread' 'content'",
      

      @see https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#1324managing-versions

      How to reproduce:

          Scenario:Get content current version of a published content
              Given I am logged as anonymous user
               And I have content of type "folder"
               And I have value "Test folder" in field "name"
               And I have content in "Publish" state
              When I load "Test folder" current version
              Then I see no errors
               And I see a content version of type "Published"
               And I see value "Test folder" in field "name"
               And I see value "1" in field "version number"
      

      Notice: that to test with anonymous user in REST (basic auth) need to actually create an anonymous user

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no Marcos Loureiro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Time Spent - 5 hours, 10 minutes Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - 5 hours, 10 minutes Remaining Estimate - 15 minutes
                5h 10m