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

Improve resolving admin Site Access in Page Builder's `SiteaccessService` in multi-admin scenario

    XMLWordPrintable

Details

    • Ibexa Experience
    • Yes

    Description

      Steps to reproduce:

      1. Clean installation of Ibexa DXP v3.3.34.
      2. Use the following configuration:
            siteaccess:
                list: [site, site2, test]
                groups:
                    site_group: [site, site2, test]
        
        ezplatform:
            siteaccess:
                list: [admintest, admintwo, admin]
                groups:
                    admin_group: [admintest, admintwo, admin]
            system:
                admintest:
                    page_builder:
                        siteaccess_list: [ test ]
                admintwo:
                    page_builder:
                        siteaccess_list: [ site2 ]
                admin:
                    page_builder:
                        siteaccess_list: [ site ]
        
      3. In vendor/ezsystems/ezplatform-page-builder/src/lib/Siteaccess/SiteaccessService.php in the resolveSiteAccessForLocation method, add the following lines under $availableSiteAccesses definition:
                $prioritizedSiteAccess = 'test';
                $availableSiteAccesses = ['site'];
        
      4. The final resolved Site Access should be site, because it's defined in $availableSiteAccesses variable.
        This override will replicate an edge-case scenario.
      5. Edit the default Landing Page.
      6. Observe the log, one should find the following entry:

        app.WARNING: Cannot resolve siteaccess for language: eng-GB. Fallback to test [] []

      7. Dump the final Site Access in the resolveSiteAccessBasedOnLanguage method.

      Expected result:
      test Site Access is resolved (outside of admin Site Access) scope.

      Result:
      site Site Access should be resolved.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: