Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5637

User without read permissions to Product Catalog cannot browse the Content Tree

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.5.0-rc1
    • 4.5.x-dev
    • None
    • Ibexa Commerce, Ibexa Experience

    Description

      When a User does not have permissions to read the Product Catalog location (for example: a user with content/read with a Subtree limitation) then the Content Tree does not load.

      Steps to reproduce:
      1. Create a Role "TestRole" with permissions as on the Screen

      2. Create a UserGroup "TestUserGroup"
      3. In the "TestUserGroup" create a "TestUser"
      4. Assign the Role to "TestUserGroup" with *Subtree Limitation*: Ibexa DIgital Experience Platform (the root location)

      5. Login as created User
      6. Go to Content -> Content Structure

      Expected:
      Content Structure loads correctly

      Actual:
      Exception:

      Ibexa\Core\Base\Exceptions\UnauthorizedException:
      The User does not have the 'read' 'content' permission with: locationId '60'
      
        at vendor/ibexa/core/src/lib/Repository/LocationService.php:254
        at Ibexa\Core\Repository\LocationService->loadLocationByRemoteId('ibexa_product_catalog_root', array('eng-GB'), true)
           (var/cache/behat/Container1i4x3FJ/LocationService_770eb8d.php:50)
        at Container1i4x3FJ\LocationService_770eb8d->loadLocationByRemoteId('ibexa_product_catalog_root', array('eng-GB'), true)
           (vendor/ibexa/core/src/contracts/Repository/Decorator/LocationServiceDecorator.php:58)
        at Ibexa\Contracts\Core\Repository\Decorator\LocationServiceDecorator->loadLocationByRemoteId('ibexa_product_catalog_root', array('eng-GB'), true)
           (vendor/ibexa/core/src/contracts/Repository/Decorator/LocationServiceDecorator.php:58)
        at Ibexa\Contracts\Core\Repository\Decorator\LocationServiceDecorator->loadLocationByRemoteId('ibexa_product_catalog_root', array('eng-GB'), true)
           (vendor/ibexa/core/src/lib/Repository/SiteAccessAware/LocationService.php:76)
        at Ibexa\Core\Repository\SiteAccessAware\LocationService->loadLocationByRemoteId('ibexa_product_catalog_root')
           (vendor/ibexa/product-catalog/src/lib/SiteAccess/ProductCatalogSiteAccessPreviewVoter.php:43)
        at Ibexa\ProductCatalog\SiteAccess\ProductCatalogSiteAccessPreviewVoter->getRootLocationIds('import')
           (vendor/ibexa/admin-ui/src/lib/Siteaccess/AbstractSiteaccessPreviewVoter.php:40)
        at Ibexa\AdminUi\Siteaccess\AbstractSiteaccessPreviewVoter->vote(object(SiteaccessPreviewVoterContext))
           (vendor/ibexa/admin-ui/src/lib/Siteaccess/SiteaccessResolver.php:91)
        at Ibexa\AdminUi\Siteaccess\SiteaccessResolver->getSiteAccessesListForLocation(object(Location))
           (vendor/ibexa/admin-ui/src/lib/Form/Type/ChoiceList/Loader/SiteAccessChoiceLoader.php:44)
        at Ibexa\AdminUi\Form\Type\ChoiceList\Loader\SiteAccessChoiceLoader->getChoiceList()
           (vendor/ibexa/admin-ui/src/lib/Form/Type/ChoiceList/Loader/SiteAccessChoiceLoader.php:57)
        at Ibexa\AdminUi\Form\Type\ChoiceList\Loader\SiteAccessChoiceLoader->loadChoiceList(null)
           (vendor/symfony/form/ChoiceList/LazyChoiceList.php:61)
        at Symfony\Component\Form\ChoiceList\LazyChoiceList->getChoices()
           (vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php:81)
        at Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory->createView(object(LazyChoiceList), array(), null, null, null, null, array())
      

      Started happening after https://github.com/ibexa/product-catalog/pull/945

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              marek.nocon@ibexa.co Marek Nocoń
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: