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

User does not have access to 'urltranslator' 'content' event if he has Content/Urltranslator policy added

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • None
    • 2.3.2, 2.4.0
    • None

    Description

      Steps:

      1. Create a role with policies:

      • Content/Read
      • User/Login
      • Url/*
      • Content/Urltranslator
        and Assignments: Subtree of location: /eZ Platform
        2. Create a user and assign him the role from step 1
        3. Log in as a new user
        4. Go to Content/Content structure
        5. Go to URL table
        6. Click [+] to add new url alias
        7. Fill required fields and click Create
      Actual result:

      Url alias is not added. There is a message: `User does not have access to 'urltranslator' 'content'`

      Expected result:

      Url alias is added.

      Hint:

      Kernel allows now to create url alias only when user hasn't got any limitations:

              if ($this->repository->getPermissionResolver()->hasAccess('content', 'urltranslator') !== true) {
                  throw new UnauthorizedException('content', 'urltranslator');
              }
      

      canUser() could be used instead of hasAccess()

      Attachments

        Activity

          People

            Unassigned Unassigned
            barbara.grajczyk@ez.no Barbara Grajczyk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: