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

SiteAccess built for CLI commands is missing some information

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 3.3.29
    • Open Source
    • Ibexa Open Source

    Description

      Discovered while testing IBX-4581
      In \eZ\Bundle\EzPublishCoreBundle\EventListener\ConsoleCommandListener::onConsoleCommand:

      $this->siteAccess->name = $event->getInput()->getParameterOption('--siteaccess', $this->defaultSiteAccessName);
      $this->siteAccess->matchingType = 'cli';
        

      The above code doesn't really set SiteAccess based on the passed --siteaccess option, but just changes it's name. So, if passed SiteAccess has different group, the information set is going to be incorrect.

      Steps to reproduce:

      1. Create a CLI Symfony Command and inject SiteAccessServiceInterface
      2. In the command execute method dump contents of $this->siteAccessService->getCurrent() method.
      3. Call the command with --siteaccess=admin switch

      Actual result:
      Observe that groups are either empty (pre IBX-4581 fix) or contain site group coming from default SiteAccess.

      Expected result
      Observe that groups contain admin_group

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              andrew.longosz@ibexa.co Andrew Longosz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: