<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Paweł Jędrzejewski

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <service id="sylius.security.shop_user_impersonator" class="Sylius\Bundle\CoreBundle\Security\UserImpersonator" public="false">
            <argument type="service" id="session" />
            <argument type="string">%sylius_shop.firewall_context_name%</argument>
        </service>

        <service id="sylius.controller.impersonate_user" class="Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController">
            <argument type="service" id="sylius.security.shop_user_impersonator" />
            <argument type="service" id="security.authorization_checker" />
            <argument type="service" id="sylius.shop_user_provider.email_or_name_based" />
            <argument type="service" id="router" />
            <argument type="string">ROLE_ADMINISTRATION_ACCESS</argument>
        </service>
    </services>
</container>

<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Paweł Jędrzejewski

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <service id="sylius.security.shop_user_impersonator" class="Sylius\Bundle\CoreBundle\Security\UserImpersonator" public="false">
            <argument type="service" id="session" />
            <argument type="string">%sylius_shop.firewall_context_name%</argument>
            <argument type="service" id="event_dispatcher" />
        </service>

        <service id="sylius.controller.impersonate_user" class="Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController">
            <argument type="service" id="sylius.security.shop_user_impersonator" />
            <argument type="service" id="security.authorization_checker" />
            <argument type="service" id="sylius.shop_user_provider.email_or_name_based" />
            <argument type="service" id="router" />
            <argument type="string">ROLE_ADMINISTRATION_ACCESS</argument>
        </service>
    </services>
</container>

Add listener to resolve cart of an impersonated customer
[Admin] Add listener to resolve cart of an impersonated customer
